Loading quickstep/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -292,6 +292,8 @@ <dimen name="taskbar_stashed_small_screen">108dp</dimen> <dimen name="taskbar_unstash_input_area">316dp</dimen> <dimen name="taskbar_stashed_handle_height">4dp</dimen> <dimen name="taskbar_stashed_screen_edge_hover_deadzone_height">10dp</dimen> <dimen name="taskbar_stashed_below_hover_deadzone_height">1dp</dimen> <dimen name="taskbar_edu_horizontal_margin">112dp</dimen> <dimen name="taskbar_nav_buttons_width_kids">88dp</dimen> <dimen name="taskbar_nav_buttons_height_kids">40dp</dimen> Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +26 −1 Original line number Diff line number Diff line Loading @@ -928,6 +928,13 @@ public class TaskbarActivityContext extends BaseTaskbarContext { } } /** * Returns whether the taskbar is currently visually stashed. */ public boolean isTaskbarStashed() { return mControllers.taskbarStashController.isStashed(); } /** * Called when we detect a long press in the nav region before passing the gesture slop. * @return Whether taskbar handled the long press, and thus should cancel the gesture. Loading Loading @@ -972,10 +979,23 @@ public class TaskbarActivityContext extends BaseTaskbarContext { /** * Called when we detect a motion down or up/cancel in the nav region while stashed. * * @param animateForward Whether to animate towards the unstashed hint state or back to stashed. */ public void startTaskbarUnstashHint(boolean animateForward) { mControllers.taskbarStashController.startUnstashHint(animateForward); // TODO(b/270395798): Clean up forceUnstash after removing long-press unstashing code. startTaskbarUnstashHint(animateForward, /* forceUnstash = */ false); } /** * Called when we detect a motion down or up/cancel in the nav region while stashed. * * @param animateForward Whether to animate towards the unstashed hint state or back to stashed. * @param forceUnstash Whether we force the unstash hint. */ public void startTaskbarUnstashHint(boolean animateForward, boolean forceUnstash) { // TODO(b/270395798): Clean up forceUnstash after removing long-press unstashing code. mControllers.taskbarStashController.startUnstashHint(animateForward, forceUnstash); } /** Loading Loading @@ -1123,4 +1143,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext { public int getTaskbarAllAppsScroll() { return mControllers.taskbarAllAppsController.getTaskbarAllAppsScroll(); } @VisibleForTesting public float getStashedTaskbarScale() { return mControllers.stashedHandleViewController.getStashedHandleHintScale().value; } } quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +5 −2 Original line number Diff line number Diff line Loading @@ -856,15 +856,18 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Creates and starts a partial unstash animation, hinting at the new state that will trigger * when long press is detected. * * @param animateForward Whether we are going towards the new unstashed state or returning to * the stashed state. * @param forceUnstash Whether we force the unstash hint to animate. */ public void startUnstashHint(boolean animateForward) { protected void startUnstashHint(boolean animateForward, boolean forceUnstash) { if (!isStashed()) { // Already unstashed, no need to hint in that direction. return; } if (!canCurrentlyManuallyUnstash()) { // TODO(b/270395798): Clean up after removing long-press unstashing code path. if (!canCurrentlyManuallyUnstash() && !forceUnstash) { // If any other flags are causing us to be stashed, long press won't cause us to // unstash, so don't hint that it will. return; Loading quickstep/src/com/android/launcher3/taskbar/TaskbarStashViaTouchController.kt +2 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_NEGATIVE import com.android.launcher3.touch.SingleAxisSwipeDetector.VERTICAL import com.android.launcher3.util.DisplayController import com.android.launcher3.util.TouchController import com.android.quickstep.inputconsumers.TaskbarStashInputConsumer import com.android.quickstep.inputconsumers.TaskbarUnstashInputConsumer /** * A helper [TouchController] for [TaskbarDragLayerController], specifically to handle touch events Loading @@ -34,7 +34,7 @@ import com.android.quickstep.inputconsumers.TaskbarStashInputConsumer * or [MotionEvent.ACTION_OUTSIDE]. * - Touches inside Transient Taskbar bounds will stash if it is detected as a swipe down gesture. * * Note: touches to *unstash* Taskbar are handled by [TaskbarStashInputConsumer]. * Note: touches to *unstash* Taskbar are handled by [TaskbarUnstashInputConsumer]. */ class TaskbarStashViaTouchController(val controllers: TaskbarControllers) : TouchController { Loading quickstep/src/com/android/quickstep/InputConsumer.java +2 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public interface InputConsumer { int TYPE_ONE_HANDED = 1 << 11; int TYPE_TASKBAR_STASH = 1 << 12; int TYPE_STATUS_BAR = 1 << 13; int TYPE_CURSOR_HOVER = 1 << 14; String[] NAMES = new String[] { "TYPE_NO_OP", // 0 Loading @@ -57,6 +58,7 @@ public interface InputConsumer { "TYPE_ONE_HANDED", // 11 "TYPE_TASKBAR_STASH", // 12 "TYPE_STATUS_BAR", // 13 "TYPE_CURSOR_HOVER", // 14 }; InputConsumer NO_OP = () -> TYPE_NO_OP; Loading Loading
quickstep/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -292,6 +292,8 @@ <dimen name="taskbar_stashed_small_screen">108dp</dimen> <dimen name="taskbar_unstash_input_area">316dp</dimen> <dimen name="taskbar_stashed_handle_height">4dp</dimen> <dimen name="taskbar_stashed_screen_edge_hover_deadzone_height">10dp</dimen> <dimen name="taskbar_stashed_below_hover_deadzone_height">1dp</dimen> <dimen name="taskbar_edu_horizontal_margin">112dp</dimen> <dimen name="taskbar_nav_buttons_width_kids">88dp</dimen> <dimen name="taskbar_nav_buttons_height_kids">40dp</dimen> Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +26 −1 Original line number Diff line number Diff line Loading @@ -928,6 +928,13 @@ public class TaskbarActivityContext extends BaseTaskbarContext { } } /** * Returns whether the taskbar is currently visually stashed. */ public boolean isTaskbarStashed() { return mControllers.taskbarStashController.isStashed(); } /** * Called when we detect a long press in the nav region before passing the gesture slop. * @return Whether taskbar handled the long press, and thus should cancel the gesture. Loading Loading @@ -972,10 +979,23 @@ public class TaskbarActivityContext extends BaseTaskbarContext { /** * Called when we detect a motion down or up/cancel in the nav region while stashed. * * @param animateForward Whether to animate towards the unstashed hint state or back to stashed. */ public void startTaskbarUnstashHint(boolean animateForward) { mControllers.taskbarStashController.startUnstashHint(animateForward); // TODO(b/270395798): Clean up forceUnstash after removing long-press unstashing code. startTaskbarUnstashHint(animateForward, /* forceUnstash = */ false); } /** * Called when we detect a motion down or up/cancel in the nav region while stashed. * * @param animateForward Whether to animate towards the unstashed hint state or back to stashed. * @param forceUnstash Whether we force the unstash hint. */ public void startTaskbarUnstashHint(boolean animateForward, boolean forceUnstash) { // TODO(b/270395798): Clean up forceUnstash after removing long-press unstashing code. mControllers.taskbarStashController.startUnstashHint(animateForward, forceUnstash); } /** Loading Loading @@ -1123,4 +1143,9 @@ public class TaskbarActivityContext extends BaseTaskbarContext { public int getTaskbarAllAppsScroll() { return mControllers.taskbarAllAppsController.getTaskbarAllAppsScroll(); } @VisibleForTesting public float getStashedTaskbarScale() { return mControllers.stashedHandleViewController.getStashedHandleHintScale().value; } }
quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +5 −2 Original line number Diff line number Diff line Loading @@ -856,15 +856,18 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Creates and starts a partial unstash animation, hinting at the new state that will trigger * when long press is detected. * * @param animateForward Whether we are going towards the new unstashed state or returning to * the stashed state. * @param forceUnstash Whether we force the unstash hint to animate. */ public void startUnstashHint(boolean animateForward) { protected void startUnstashHint(boolean animateForward, boolean forceUnstash) { if (!isStashed()) { // Already unstashed, no need to hint in that direction. return; } if (!canCurrentlyManuallyUnstash()) { // TODO(b/270395798): Clean up after removing long-press unstashing code path. if (!canCurrentlyManuallyUnstash() && !forceUnstash) { // If any other flags are causing us to be stashed, long press won't cause us to // unstash, so don't hint that it will. return; Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarStashViaTouchController.kt +2 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ import com.android.launcher3.touch.SingleAxisSwipeDetector.DIRECTION_NEGATIVE import com.android.launcher3.touch.SingleAxisSwipeDetector.VERTICAL import com.android.launcher3.util.DisplayController import com.android.launcher3.util.TouchController import com.android.quickstep.inputconsumers.TaskbarStashInputConsumer import com.android.quickstep.inputconsumers.TaskbarUnstashInputConsumer /** * A helper [TouchController] for [TaskbarDragLayerController], specifically to handle touch events Loading @@ -34,7 +34,7 @@ import com.android.quickstep.inputconsumers.TaskbarStashInputConsumer * or [MotionEvent.ACTION_OUTSIDE]. * - Touches inside Transient Taskbar bounds will stash if it is detected as a swipe down gesture. * * Note: touches to *unstash* Taskbar are handled by [TaskbarStashInputConsumer]. * Note: touches to *unstash* Taskbar are handled by [TaskbarUnstashInputConsumer]. */ class TaskbarStashViaTouchController(val controllers: TaskbarControllers) : TouchController { Loading
quickstep/src/com/android/quickstep/InputConsumer.java +2 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ public interface InputConsumer { int TYPE_ONE_HANDED = 1 << 11; int TYPE_TASKBAR_STASH = 1 << 12; int TYPE_STATUS_BAR = 1 << 13; int TYPE_CURSOR_HOVER = 1 << 14; String[] NAMES = new String[] { "TYPE_NO_OP", // 0 Loading @@ -57,6 +58,7 @@ public interface InputConsumer { "TYPE_ONE_HANDED", // 11 "TYPE_TASKBAR_STASH", // 12 "TYPE_STATUS_BAR", // 13 "TYPE_CURSOR_HOVER", // 14 }; InputConsumer NO_OP = () -> TYPE_NO_OP; Loading