Merge "Fix live tile regression in quick switch mode" into ub-launcher3-master
diff --git a/quickstep/src/com/android/quickstep/QuickScrubController.java b/quickstep/src/com/android/quickstep/QuickScrubController.java
index db0150e..ab5fce1 100644
--- a/quickstep/src/com/android/quickstep/QuickScrubController.java
+++ b/quickstep/src/com/android/quickstep/QuickScrubController.java
@@ -267,6 +267,10 @@
return mWaitingForTaskLaunch;
}
+ public boolean hasFinishedTransitionToQuickScrub() {
+ return mFinishedTransitionToQuickScrub;
+ }
+
/**
* Attempts to go to normal overview or back to home, so UI doesn't prevent user interaction.
*/
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index bc4e094..b089381 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -700,7 +700,9 @@
}
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
- if (mRecentsAnimationWrapper.getController() != null && mLayoutListener != null) {
+ if (mRecentsAnimationWrapper.getController() != null && mLayoutListener != null &&
+ (mInteractionType == INTERACTION_NORMAL
+ || !mQuickScrubController.hasFinishedTransitionToQuickScrub())) {
mLayoutListener.open();
mLayoutListener.update(mCurrentShift.value > 1, mLongSwipeMode,
mClipAnimationHelper.getCurrentRectWithInsets(),
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index 5c8f53c..ba4aadc 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -216,7 +216,11 @@
int offsetY = (int) (mTaskHeight * taskView.getScaleY() * getScaleY()
- mTempRect.height());
if (((mCurrentPage != 0) || mightNeedToRefill) && offsetX > 0) {
- mTempRect.right += offsetX;
+ if (mTempRect.left - offsetX < 0) {
+ mTempRect.left -= offsetX;
+ } else {
+ mTempRect.right += offsetX;
+ }
}
if (mightNeedToRefill && offsetY > 0) {
mTempRect.top -= offsetY;