diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java index c269648f7d..6031b49874 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java @@ -364,7 +364,12 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba * Returns the height that taskbar will be touchable. */ public int getTouchableHeight() { - return mIsStashed ? mStashedHeight : mUnstashedHeight; + int bottomMargin = 0; + if (DisplayController.isTransientTaskbar(mActivity)) { + bottomMargin = mActivity.getResources().getDimensionPixelSize( + R.dimen.transient_taskbar_margin); + } + return mIsStashed ? mStashedHeight : (mUnstashedHeight + bottomMargin); } /** diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 340187552e..a3505fd40e 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -322,6 +322,7 @@ public abstract class AbsSwipeUpHandler, private final boolean mIsTransientTaskbar; // May be set to false when mIsTransientTaskbar is true. private boolean mCanSlowSwipeGoHome = true; + private boolean mHasReachedOverviewThreshold = false; @Nullable private RemoteAnimationTargets.ReleaseCheck mSwipePipToHomeReleaseCheck = null; @@ -764,6 +765,10 @@ public abstract class AbsSwipeUpHandler, private void setIsLikelyToStartNewTask(boolean isLikelyToStartNewTask, boolean animate) { if (mIsLikelyToStartNewTask != isLikelyToStartNewTask) { + if (isLikelyToStartNewTask && mIsTransientTaskbar) { + setDividerShown(false /* shown */, true /* immediate */); + } + mIsLikelyToStartNewTask = isLikelyToStartNewTask; maybeUpdateRecentsAttachedState(animate); } @@ -1666,7 +1671,9 @@ public abstract class AbsSwipeUpHandler, mRecentsAnimationController.enableInputConsumer(); // Start hiding the divider - setDividerShown(false /* shown */, true /* immediate */); + if (!mIsTransientTaskbar || mTaskbarAlreadyOpen || mIsTaskbarAllAppsOpen) { + setDividerShown(false /* shown */, true /* immediate */); + } } private void computeRecentsScrollIfInvisible() { @@ -2302,6 +2309,10 @@ public abstract class AbsSwipeUpHandler, // "Catch up" with the displacement at mTaskbarCatchUpThreshold. if (displacement < mTaskbarCatchUpThreshold) { + if (!mHasReachedOverviewThreshold) { + setDividerShown(false /* shown */, true /* immediate */); + mHasReachedOverviewThreshold = true; + } return Utilities.mapToRange(displacement, mTaskbarAppWindowThreshold, mTaskbarCatchUpThreshold, 0, mTaskbarCatchUpThreshold, ACCEL_DEACCEL); } diff --git a/quickstep/src/com/android/quickstep/RotationTouchHelper.java b/quickstep/src/com/android/quickstep/RotationTouchHelper.java index aab5703ae9..f75924b2c7 100644 --- a/quickstep/src/com/android/quickstep/RotationTouchHelper.java +++ b/quickstep/src/com/android/quickstep/RotationTouchHelper.java @@ -233,10 +233,15 @@ public class RotationTouchHelper implements DisplayInfoChangeListener { * @return whether the coordinates of the {@param event} is in the swipe up gesture region. */ public boolean isInSwipeUpTouchRegion(MotionEvent event, BaseActivityInterface activity) { + boolean inBarArea = mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(), + event.getY()); + if (inBarArea) { + return true; + } if (isTrackpadMotionEvent(event)) { return !activity.isResumed(); } - return mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(), event.getY()); + return false; } /** @@ -245,11 +250,15 @@ public class RotationTouchHelper implements DisplayInfoChangeListener { */ public boolean isInSwipeUpTouchRegion(MotionEvent event, int pointerIndex, BaseActivityInterface activity) { + boolean inBarArea = mOrientationTouchTransformer.touchInValidSwipeRegions( + event.getX(pointerIndex), event.getY(pointerIndex)); + if (inBarArea) { + return true; + } if (isTrackpadMotionEvent(event)) { return !activity.isResumed(); } - return mOrientationTouchTransformer.touchInValidSwipeRegions(event.getX(pointerIndex), - event.getY(pointerIndex)); + return false; } @Override diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index ffeadcdd60..4556fd41b5 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -802,7 +802,7 @@ public class TouchInteractionService extends Service // If Taskbar is present, we listen for long press to unstash it. TaskbarActivityContext tac = mTaskbarManager.getCurrentActivityContext(); - if (tac != null) { + if (tac != null && canStartSystemGesture) { reasonString.append(NEWLINE_PREFIX) .append(reasonPrefix) .append(SUBSTRING_PREFIX) diff --git a/tests/OWNERS b/tests/OWNERS index 02e8ebcaba..6b8643c220 100644 --- a/tests/OWNERS +++ b/tests/OWNERS @@ -1,3 +1,4 @@ +# Bug component: 164335 vadimt@google.com sunnygoyal@google.com winsonc@google.com