Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +5 −0 Original line number Diff line number Diff line Loading @@ -887,6 +887,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext { return mControllers.taskbarStashController.isStashed(); } /** Returns {@code true} if taskbar All Apps is open. */ public boolean isTaskbarAllAppsOpen() { return mControllers.taskbarAllAppsController.isOpen(); } /** * Called to start the taskbar translation spring to its settled translation (0). */ Loading quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +10 −2 Original line number Diff line number Diff line Loading @@ -87,7 +87,8 @@ public class TaskbarUIController { * Manually closes the overlay window. */ public void hideOverlayWindow() { if (!DisplayController.isTransientTaskbar(mControllers.taskbarActivityContext)) { if (!DisplayController.isTransientTaskbar(mControllers.taskbarActivityContext) || mControllers.taskbarAllAppsController.isOpen()) { mControllers.taskbarOverlayController.hideWindow(); } } Loading @@ -104,12 +105,19 @@ public class TaskbarUIController { } /** * Returns true iff taskbar is stashed. * Returns {@code true} iff taskbar is stashed. */ public boolean isTaskbarStashed() { return mControllers.taskbarStashController.isStashed(); } /** * Returns {@code true} iff taskbar All Apps is open. */ public boolean isTaskbarAllAppsOpen() { return mControllers.taskbarAllAppsController.isOpen(); } /** * Called at the end of the swipe gesture on Transient taskbar. */ Loading quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +11 −5 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import java.util.List; public final class TaskbarAllAppsController { private TaskbarControllers mControllers; private @Nullable TaskbarAllAppsSlideInView mSlideInView; private @Nullable TaskbarAllAppsContainerView mAppsView; // Application data models. Loading Loading @@ -107,6 +108,11 @@ public final class TaskbarAllAppsController { show(true); } /** Returns {@code true} if All Apps is open. */ public boolean isOpen() { return mSlideInView != null && mSlideInView.isOpen(); } private void show(boolean animate) { if (mAppsView != null) { return; Loading @@ -117,15 +123,15 @@ public final class TaskbarAllAppsController { TaskbarOverlayContext overlayContext = mControllers.taskbarOverlayController.requestWindow(); TaskbarAllAppsSlideInView slideInView = (TaskbarAllAppsSlideInView) overlayContext.getLayoutInflater().inflate( mSlideInView = (TaskbarAllAppsSlideInView) overlayContext.getLayoutInflater().inflate( R.layout.taskbar_all_apps, overlayContext.getDragLayer(), false); slideInView.addOnCloseListener(() -> { mSlideInView.addOnCloseListener(() -> { mControllers.getSharedState().allAppsVisible = false; mSlideInView = null; mAppsView = null; }); TaskbarAllAppsViewController viewController = new TaskbarAllAppsViewController( overlayContext, slideInView, mControllers); overlayContext, mSlideInView, mControllers); viewController.show(animate); mAppsView = overlayContext.getAppsView(); Loading quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java +7 −10 Original line number Diff line number Diff line Loading @@ -15,8 +15,6 @@ */ package com.android.launcher3.taskbar.allapps; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_STASHED_IN_APP_AUTO; import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_STASHED_IN_TASKBAR_ALL_APPS; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.OnboardingPrefs.ALL_APPS_VISITED_COUNT; Loading Loading @@ -90,20 +88,19 @@ final class TaskbarAllAppsViewController { } private void setUpTaskbarStashing() { mTaskbarStashController.updateStateForFlag( DisplayController.isTransientTaskbar(mContext) ? FLAG_STASHED_IN_APP_AUTO : FLAG_STASHED_IN_TASKBAR_ALL_APPS, true); mTaskbarStashController.applyState( ALL_APPS.getTransitionDuration(mContext, true /* isToState */)); mTaskbarStashController.updateStateForFlag(FLAG_STASHED_IN_TASKBAR_ALL_APPS, true); mTaskbarStashController.applyState(mOverlayController.getOpenDuration()); mNavbarButtonsViewController.setSlideInViewVisible(true); mSlideInView.setOnCloseBeginListener(() -> { mNavbarButtonsViewController.setSlideInViewVisible(false); AbstractFloatingView.closeOpenContainer( mContext, AbstractFloatingView.TYPE_ACTION_POPUP); if (!DisplayController.isTransientTaskbar(mContext)) { if (DisplayController.isTransientTaskbar(mContext)) { mTaskbarStashController.updateStateForFlag(FLAG_STASHED_IN_TASKBAR_ALL_APPS, false); mTaskbarStashController.applyState(mOverlayController.getCloseDuration()); } else { // Post in case view is closing due to gesture navigation. If a gesture is in // progress, wait to unstash until after the gesture is finished. MAIN_EXECUTOR.post(() -> mTaskbarStashController.resetFlagIfNoGestureInProgress( Loading quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +4 −2 Original line number Diff line number Diff line Loading @@ -318,7 +318,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, private final int mTaskbarAppWindowThreshold; private final int mTaskbarHomeOverviewThreshold; private final int mTaskbarCatchUpThreshold; private boolean mTaskbarAlreadyOpen; private final boolean mTaskbarAlreadyOpen; private final boolean mIsTaskbarAllAppsOpen; private final boolean mIsTransientTaskbar; // May be set to false when mIsTransientTaskbar is true. private boolean mCanSlowSwipeGoHome = true; Loading Loading @@ -359,6 +360,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, && DisplayController.isTransientTaskbar(mActivity); TaskbarUIController controller = mActivityInterface.getTaskbarController(); mTaskbarAlreadyOpen = controller != null && !controller.isTaskbarStashed(); mIsTaskbarAllAppsOpen = controller != null && controller.isTaskbarAllAppsOpen(); mTaskbarAppWindowThreshold = res .getDimensionPixelSize(ENABLE_TASKBAR_REVISED_THRESHOLDS.get() ? R.dimen.taskbar_app_window_threshold_v2 Loading Loading @@ -2264,7 +2266,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, return displacement; } if (mTaskbarAlreadyOpen) { if (mTaskbarAlreadyOpen || mIsTaskbarAllAppsOpen) { return displacement; } Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +5 −0 Original line number Diff line number Diff line Loading @@ -887,6 +887,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext { return mControllers.taskbarStashController.isStashed(); } /** Returns {@code true} if taskbar All Apps is open. */ public boolean isTaskbarAllAppsOpen() { return mControllers.taskbarAllAppsController.isOpen(); } /** * Called to start the taskbar translation spring to its settled translation (0). */ Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +10 −2 Original line number Diff line number Diff line Loading @@ -87,7 +87,8 @@ public class TaskbarUIController { * Manually closes the overlay window. */ public void hideOverlayWindow() { if (!DisplayController.isTransientTaskbar(mControllers.taskbarActivityContext)) { if (!DisplayController.isTransientTaskbar(mControllers.taskbarActivityContext) || mControllers.taskbarAllAppsController.isOpen()) { mControllers.taskbarOverlayController.hideWindow(); } } Loading @@ -104,12 +105,19 @@ public class TaskbarUIController { } /** * Returns true iff taskbar is stashed. * Returns {@code true} iff taskbar is stashed. */ public boolean isTaskbarStashed() { return mControllers.taskbarStashController.isStashed(); } /** * Returns {@code true} iff taskbar All Apps is open. */ public boolean isTaskbarAllAppsOpen() { return mControllers.taskbarAllAppsController.isOpen(); } /** * Called at the end of the swipe gesture on Transient taskbar. */ Loading
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +11 −5 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import java.util.List; public final class TaskbarAllAppsController { private TaskbarControllers mControllers; private @Nullable TaskbarAllAppsSlideInView mSlideInView; private @Nullable TaskbarAllAppsContainerView mAppsView; // Application data models. Loading Loading @@ -107,6 +108,11 @@ public final class TaskbarAllAppsController { show(true); } /** Returns {@code true} if All Apps is open. */ public boolean isOpen() { return mSlideInView != null && mSlideInView.isOpen(); } private void show(boolean animate) { if (mAppsView != null) { return; Loading @@ -117,15 +123,15 @@ public final class TaskbarAllAppsController { TaskbarOverlayContext overlayContext = mControllers.taskbarOverlayController.requestWindow(); TaskbarAllAppsSlideInView slideInView = (TaskbarAllAppsSlideInView) overlayContext.getLayoutInflater().inflate( mSlideInView = (TaskbarAllAppsSlideInView) overlayContext.getLayoutInflater().inflate( R.layout.taskbar_all_apps, overlayContext.getDragLayer(), false); slideInView.addOnCloseListener(() -> { mSlideInView.addOnCloseListener(() -> { mControllers.getSharedState().allAppsVisible = false; mSlideInView = null; mAppsView = null; }); TaskbarAllAppsViewController viewController = new TaskbarAllAppsViewController( overlayContext, slideInView, mControllers); overlayContext, mSlideInView, mControllers); viewController.show(animate); mAppsView = overlayContext.getAppsView(); Loading
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java +7 −10 Original line number Diff line number Diff line Loading @@ -15,8 +15,6 @@ */ package com.android.launcher3.taskbar.allapps; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_STASHED_IN_APP_AUTO; import static com.android.launcher3.taskbar.TaskbarStashController.FLAG_STASHED_IN_TASKBAR_ALL_APPS; import static com.android.launcher3.util.Executors.MAIN_EXECUTOR; import static com.android.launcher3.util.OnboardingPrefs.ALL_APPS_VISITED_COUNT; Loading Loading @@ -90,20 +88,19 @@ final class TaskbarAllAppsViewController { } private void setUpTaskbarStashing() { mTaskbarStashController.updateStateForFlag( DisplayController.isTransientTaskbar(mContext) ? FLAG_STASHED_IN_APP_AUTO : FLAG_STASHED_IN_TASKBAR_ALL_APPS, true); mTaskbarStashController.applyState( ALL_APPS.getTransitionDuration(mContext, true /* isToState */)); mTaskbarStashController.updateStateForFlag(FLAG_STASHED_IN_TASKBAR_ALL_APPS, true); mTaskbarStashController.applyState(mOverlayController.getOpenDuration()); mNavbarButtonsViewController.setSlideInViewVisible(true); mSlideInView.setOnCloseBeginListener(() -> { mNavbarButtonsViewController.setSlideInViewVisible(false); AbstractFloatingView.closeOpenContainer( mContext, AbstractFloatingView.TYPE_ACTION_POPUP); if (!DisplayController.isTransientTaskbar(mContext)) { if (DisplayController.isTransientTaskbar(mContext)) { mTaskbarStashController.updateStateForFlag(FLAG_STASHED_IN_TASKBAR_ALL_APPS, false); mTaskbarStashController.applyState(mOverlayController.getCloseDuration()); } else { // Post in case view is closing due to gesture navigation. If a gesture is in // progress, wait to unstash until after the gesture is finished. MAIN_EXECUTOR.post(() -> mTaskbarStashController.resetFlagIfNoGestureInProgress( Loading
quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +4 −2 Original line number Diff line number Diff line Loading @@ -318,7 +318,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, private final int mTaskbarAppWindowThreshold; private final int mTaskbarHomeOverviewThreshold; private final int mTaskbarCatchUpThreshold; private boolean mTaskbarAlreadyOpen; private final boolean mTaskbarAlreadyOpen; private final boolean mIsTaskbarAllAppsOpen; private final boolean mIsTransientTaskbar; // May be set to false when mIsTransientTaskbar is true. private boolean mCanSlowSwipeGoHome = true; Loading Loading @@ -359,6 +360,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, && DisplayController.isTransientTaskbar(mActivity); TaskbarUIController controller = mActivityInterface.getTaskbarController(); mTaskbarAlreadyOpen = controller != null && !controller.isTaskbarStashed(); mIsTaskbarAllAppsOpen = controller != null && controller.isTaskbarAllAppsOpen(); mTaskbarAppWindowThreshold = res .getDimensionPixelSize(ENABLE_TASKBAR_REVISED_THRESHOLDS.get() ? R.dimen.taskbar_app_window_threshold_v2 Loading Loading @@ -2264,7 +2266,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, return displacement; } if (mTaskbarAlreadyOpen) { if (mTaskbarAlreadyOpen || mIsTaskbarAllAppsOpen) { return displacement; } Loading