Loading quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -308,6 +308,9 @@ public class TaskbarManager { } } mOldConfig = new Configuration(newConfig); // reset taskbar was pinned value, so we don't automatically unstash taskbar upon // user unfolding the device. mSharedState.setTaskbarWasPinned(false); } @Override Loading Loading @@ -468,7 +471,7 @@ public class TaskbarManager { * In other case (folding/unfolding) we don't need to remove and add window. */ @VisibleForTesting public void recreateTaskbar() { public synchronized void recreateTaskbar() { Trace.beginSection("recreateTaskbar"); try { DeviceProfile dp = mUserUnlocked ? Loading quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +30 −27 Original line number Diff line number Diff line Loading @@ -198,6 +198,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba * by not scaling the height of the taskbar background. */ private static final int TRANSITION_UNSTASH_SUW_MANUAL = 3; @Retention(RetentionPolicy.SOURCE) @IntDef(value = { TRANSITION_DEFAULT, Loading @@ -205,7 +206,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba TRANSITION_HANDLE_FADE, TRANSITION_UNSTASH_SUW_MANUAL, }) private @interface StashAnimation {} private @interface StashAnimation { } private final TaskbarActivityContext mActivity; private final int mStashedHeight; Loading Loading @@ -310,15 +312,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba boolean isTransientTaskbar = DisplayController.isTransientTaskbar(mActivity); boolean isInSetup = !mActivity.isUserSetupComplete() || setupUIVisible; boolean taskbarWasPinned = mTaskbarSharedState.getTaskbarWasPinned(); boolean isStashedInAppAuto = isTransientTaskbar && !taskbarWasPinned; // now that we know we need to keep transient taskbar unstashed after unpinning animation // we need to reset the shared state, so everytime user recreates taskbar we don't unstash // transient taskbar by default. if (mTaskbarSharedState.getTaskbarWasPinned()) { mTaskbarSharedState.setTaskbarWasPinned(false); } boolean isStashedInAppAuto = isTransientTaskbar && !mTaskbarSharedState.getTaskbarWasPinned(); if (ENABLE_TASKBAR_NAVBAR_UNIFICATION) { isStashedInAppAuto = isStashedInAppAuto && mTaskbarSharedState.taskbarWasStashedAuto; Loading @@ -332,7 +327,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba // us that we're paused until a bit later. This avoids flickering upon recreating taskbar. updateStateForFlag(FLAG_IN_APP, true); applyState(/* duration = */ 0); if (taskbarWasPinned || !mTaskbarSharedState.taskbarWasStashedAuto) { if (mTaskbarSharedState.getTaskbarWasPinned() || !mTaskbarSharedState.taskbarWasStashedAuto) { tryStartTaskbarTimeout(); } notifyStashChange(/* visible */ false, /* stashed */ isStashedInApp()); Loading Loading @@ -426,6 +422,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Returns the height that taskbar will inset when inside apps. * * @see android.view.WindowInsets.Type#navigationBars() * @see android.view.WindowInsets.Type#systemBars() */ Loading Loading @@ -460,6 +457,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Returns the height that taskbar will inset when inside apps. * * @see android.view.WindowInsets.Type#tappableElement() */ public int getTappableHeightToReportToApps() { Loading @@ -481,6 +479,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Stash or unstashes the transient taskbar. * * @param stash whether transient taskbar should be stashed. * @param shouldBubblesFollow whether bubbles should match taskbars behavior. */ Loading Loading @@ -565,6 +564,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Create a stash animation and save to {@link #mAnimator}. * * @param isStashed whether it's a stash animation or an unstash animation * @param duration duration of the animation * @param animationType what transition type to play. Loading Loading @@ -1018,6 +1018,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Called after updateStateForFlag() and applyState() have been called. * * @param changedFlags The flags that have changed. */ private void onStateChangeApplied(int changedFlags) { Loading Loading @@ -1091,6 +1092,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Updates the status of the taskbar timeout. * * @param isAutohideSuspended If true, cancels any existing timeout * If false, attempts to re/start the timeout */ Loading Loading @@ -1181,6 +1183,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Creates an animator (stored in mAnimator) which applies the latest state, potentially * creating a new animation (stored in mAnimator). * * @param flags The latest flags to apply (see the top of this file). * @param duration The length of the animation. * @return mAnimator if mIsStashed changed, or {@code null} otherwise. Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarManager.java +4 −1 Original line number Diff line number Diff line Loading @@ -308,6 +308,9 @@ public class TaskbarManager { } } mOldConfig = new Configuration(newConfig); // reset taskbar was pinned value, so we don't automatically unstash taskbar upon // user unfolding the device. mSharedState.setTaskbarWasPinned(false); } @Override Loading Loading @@ -468,7 +471,7 @@ public class TaskbarManager { * In other case (folding/unfolding) we don't need to remove and add window. */ @VisibleForTesting public void recreateTaskbar() { public synchronized void recreateTaskbar() { Trace.beginSection("recreateTaskbar"); try { DeviceProfile dp = mUserUnlocked ? Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +30 −27 Original line number Diff line number Diff line Loading @@ -198,6 +198,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba * by not scaling the height of the taskbar background. */ private static final int TRANSITION_UNSTASH_SUW_MANUAL = 3; @Retention(RetentionPolicy.SOURCE) @IntDef(value = { TRANSITION_DEFAULT, Loading @@ -205,7 +206,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba TRANSITION_HANDLE_FADE, TRANSITION_UNSTASH_SUW_MANUAL, }) private @interface StashAnimation {} private @interface StashAnimation { } private final TaskbarActivityContext mActivity; private final int mStashedHeight; Loading Loading @@ -310,15 +312,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba boolean isTransientTaskbar = DisplayController.isTransientTaskbar(mActivity); boolean isInSetup = !mActivity.isUserSetupComplete() || setupUIVisible; boolean taskbarWasPinned = mTaskbarSharedState.getTaskbarWasPinned(); boolean isStashedInAppAuto = isTransientTaskbar && !taskbarWasPinned; // now that we know we need to keep transient taskbar unstashed after unpinning animation // we need to reset the shared state, so everytime user recreates taskbar we don't unstash // transient taskbar by default. if (mTaskbarSharedState.getTaskbarWasPinned()) { mTaskbarSharedState.setTaskbarWasPinned(false); } boolean isStashedInAppAuto = isTransientTaskbar && !mTaskbarSharedState.getTaskbarWasPinned(); if (ENABLE_TASKBAR_NAVBAR_UNIFICATION) { isStashedInAppAuto = isStashedInAppAuto && mTaskbarSharedState.taskbarWasStashedAuto; Loading @@ -332,7 +327,8 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba // us that we're paused until a bit later. This avoids flickering upon recreating taskbar. updateStateForFlag(FLAG_IN_APP, true); applyState(/* duration = */ 0); if (taskbarWasPinned || !mTaskbarSharedState.taskbarWasStashedAuto) { if (mTaskbarSharedState.getTaskbarWasPinned() || !mTaskbarSharedState.taskbarWasStashedAuto) { tryStartTaskbarTimeout(); } notifyStashChange(/* visible */ false, /* stashed */ isStashedInApp()); Loading Loading @@ -426,6 +422,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Returns the height that taskbar will inset when inside apps. * * @see android.view.WindowInsets.Type#navigationBars() * @see android.view.WindowInsets.Type#systemBars() */ Loading Loading @@ -460,6 +457,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Returns the height that taskbar will inset when inside apps. * * @see android.view.WindowInsets.Type#tappableElement() */ public int getTappableHeightToReportToApps() { Loading @@ -481,6 +479,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Stash or unstashes the transient taskbar. * * @param stash whether transient taskbar should be stashed. * @param shouldBubblesFollow whether bubbles should match taskbars behavior. */ Loading Loading @@ -565,6 +564,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Create a stash animation and save to {@link #mAnimator}. * * @param isStashed whether it's a stash animation or an unstash animation * @param duration duration of the animation * @param animationType what transition type to play. Loading Loading @@ -1018,6 +1018,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Called after updateStateForFlag() and applyState() have been called. * * @param changedFlags The flags that have changed. */ private void onStateChangeApplied(int changedFlags) { Loading Loading @@ -1091,6 +1092,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Updates the status of the taskbar timeout. * * @param isAutohideSuspended If true, cancels any existing timeout * If false, attempts to re/start the timeout */ Loading Loading @@ -1181,6 +1183,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba /** * Creates an animator (stored in mAnimator) which applies the latest state, potentially * creating a new animation (stored in mAnimator). * * @param flags The latest flags to apply (see the top of this file). * @param duration The length of the animation. * @return mAnimator if mIsStashed changed, or {@code null} otherwise. Loading