From 0d7dc94d2ed41cdd3ddf0af9adc0f1d5df046bea Mon Sep 17 00:00:00 2001 From: Tony Huang Date: Fri, 16 Dec 2022 07:23:01 +0000 Subject: [PATCH 1/5] Fix divider visibility issue on transient taskbar On legacy case, we hide divider bar when gesture start, but this might cause divider hidden when transient taskbar case. We should follow the timing it actually start entering overview then hide divider. Fix: 261376202 Test: manual Test: pass existing tests Change-Id: Iae1339ae0b42033075dd840fc071ba28a7d3e13a --- .../com/android/quickstep/AbsSwipeUpHandler.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java index 47dafabacb..eadf323656 100644 --- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java @@ -323,6 +323,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; public AbsSwipeUpHandler(Context context, RecentsAnimationDeviceState deviceState, TaskAnimationManager taskAnimationManager, GestureState gestureState, @@ -762,6 +763,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); } @@ -1656,7 +1661,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() { @@ -2288,6 +2295,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); } From c5985751c433c26f87d2023766a4e164222ddd91 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Sun, 8 Jan 2023 00:29:37 -0800 Subject: [PATCH 2/5] Swipe-up from the bar area on the home screen should pull up overview Bug: 254783214 Test: swipe-up from the bar takes the user to overview; swipe-up from everywhere else on the home screen takes the user to all-apps Change-Id: Ic244c580d6828261c0369cb5c812a9eb8cbec7fe --- .../android/quickstep/RotationTouchHelper.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 From c15e2a3a5d9765c9a737c5b7ec51782cf82d6354 Mon Sep 17 00:00:00 2001 From: David Saff Date: Tue, 10 Jan 2023 19:06:27 +0000 Subject: [PATCH 3/5] Assign default bug component for Launcher3 This is the "Pixel Launcher" component, let me know if another would be more appropriate. See go/android-codereviews#buganizer-component-links-in-owners for how this is (I believe) used. Change-Id: I85ff57211616315e08f8e3913707ee34f6055e8a --- tests/OWNERS | 1 + 1 file changed, 1 insertion(+) 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 From ef35e84d1940cc9fcf9f17cf0df2fc138986f19e Mon Sep 17 00:00:00 2001 From: Jagrut Desai Date: Tue, 3 Jan 2023 15:50:54 -0500 Subject: [PATCH 4/5] Checking can start system gesture before creation of TaskbarStashInputConsumer, so that taskbar does not show up when user performs swipe up from lock screen or notification panel. Test: visual(video in buganizer) Fix:261524189, 262589756 Change-Id: I5252281025953753f9184f1b19c534513b5800fa --- .../src/com/android/quickstep/TouchInteractionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 5d17cc77f4..08a0ab3fb8 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -800,7 +800,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) From 50f1e8dfc2fd115c3c0e1b7602a3e18a4f516f8e Mon Sep 17 00:00:00 2001 From: Jagrut Desai Date: Mon, 9 Jan 2023 11:17:53 -0600 Subject: [PATCH 5/5] Adding margin height for transient taskbar to allow users to stash taskbar from full height. Test: visual(video in buganizer) Fix: 263526574 Change-Id: I21fd1273b83a4e5efdf7aeacae1303513b9b4d97 --- .../android/launcher3/taskbar/TaskbarStashController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } /**