Loading quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +14 −6 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ public class TaskbarStashController { // Evaluate whether the handle should be stashed private final StatePropertyHolder mStatePropertyHolder = new StatePropertyHolder( flags -> { if (!supportsStashing()) { if (!supportsVisualStashing()) { return false; } boolean inApp = (flags & FLAG_IN_APP) != 0; Loading Loading @@ -141,7 +141,7 @@ public class TaskbarStashController { mTaskbarStashedHandleAlpha = stashedHandleController.getStashedHandleAlpha(); mTaskbarStashedHandleHintScale = stashedHandleController.getStashedHandleHintScale(); mIsStashedInApp = supportsStashing() mIsStashedInApp = supportsManualStashing() && mPrefs.getBoolean(SHARED_PREFS_STASHED_KEY, DEFAULT_STASHED_PREF); updateStateForFlag(FLAG_STASHED_IN_APP, mIsStashedInApp); Loading @@ -149,11 +149,19 @@ public class TaskbarStashController { .notifyTaskbarStatus(/* visible */ true, /* stashed */ mIsStashedInApp); } /** * Returns whether the taskbar can visually stash into a handle based on the current device * state. */ private boolean supportsVisualStashing() { return !mActivity.isThreeButtonNav(); } /** * Returns whether the user can manually stash the taskbar based on the current device state. */ private boolean supportsStashing() { return !mActivity.isThreeButtonNav() private boolean supportsManualStashing() { return supportsVisualStashing() && (!Utilities.IS_RUNNING_IN_TEST_HARNESS || supportsStashingForTests()); } Loading Loading @@ -206,7 +214,7 @@ public class TaskbarStashController { * @return Whether we started an animation to either be newly stashed or unstashed. */ public boolean updateAndAnimateIsStashedInApp(boolean isStashedInApp) { if (!supportsStashing()) { if (!supportsManualStashing()) { return false; } if (mIsStashedInApp != isStashedInApp) { Loading Loading @@ -307,7 +315,7 @@ public class TaskbarStashController { * unstashed state. */ public void startStashHint(boolean animateForward) { if (isStashed() || !supportsStashing()) { if (isStashed() || !supportsManualStashing()) { // Already stashed, no need to hint in that direction. return; } Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +14 −6 Original line number Diff line number Diff line Loading @@ -107,7 +107,7 @@ public class TaskbarStashController { // Evaluate whether the handle should be stashed private final StatePropertyHolder mStatePropertyHolder = new StatePropertyHolder( flags -> { if (!supportsStashing()) { if (!supportsVisualStashing()) { return false; } boolean inApp = (flags & FLAG_IN_APP) != 0; Loading Loading @@ -141,7 +141,7 @@ public class TaskbarStashController { mTaskbarStashedHandleAlpha = stashedHandleController.getStashedHandleAlpha(); mTaskbarStashedHandleHintScale = stashedHandleController.getStashedHandleHintScale(); mIsStashedInApp = supportsStashing() mIsStashedInApp = supportsManualStashing() && mPrefs.getBoolean(SHARED_PREFS_STASHED_KEY, DEFAULT_STASHED_PREF); updateStateForFlag(FLAG_STASHED_IN_APP, mIsStashedInApp); Loading @@ -149,11 +149,19 @@ public class TaskbarStashController { .notifyTaskbarStatus(/* visible */ true, /* stashed */ mIsStashedInApp); } /** * Returns whether the taskbar can visually stash into a handle based on the current device * state. */ private boolean supportsVisualStashing() { return !mActivity.isThreeButtonNav(); } /** * Returns whether the user can manually stash the taskbar based on the current device state. */ private boolean supportsStashing() { return !mActivity.isThreeButtonNav() private boolean supportsManualStashing() { return supportsVisualStashing() && (!Utilities.IS_RUNNING_IN_TEST_HARNESS || supportsStashingForTests()); } Loading Loading @@ -206,7 +214,7 @@ public class TaskbarStashController { * @return Whether we started an animation to either be newly stashed or unstashed. */ public boolean updateAndAnimateIsStashedInApp(boolean isStashedInApp) { if (!supportsStashing()) { if (!supportsManualStashing()) { return false; } if (mIsStashedInApp != isStashedInApp) { Loading Loading @@ -307,7 +315,7 @@ public class TaskbarStashController { * unstashed state. */ public void startStashHint(boolean animateForward) { if (isStashed() || !supportsStashing()) { if (isStashed() || !supportsManualStashing()) { // Already stashed, no need to hint in that direction. return; } Loading