Revert to passing mIsStashed to StashedHandleViewController again

- Fixes case where handle is initially invisible but will be stashed
  and visible, e.g. when launching an app from home screen
- To fix the original issue of sampling happening unnecessarily for
  three button nav, also check supportsVisualStashing()

Fixes: 321257120
Flag: None
Test: Launch an app from home in gesture nav mode
Test: testThreeButtonsTaskbarBoundsAfterConfigChangeDuringIme
Change-Id: I1f26436de3081fd00f75a5921010e361e9a9f34e
This commit is contained in:
Tony Wickham
2024-01-19 20:04:59 +00:00
parent f00c59e2f4
commit c4df8c2ec6
2 changed files with 8 additions and 7 deletions
@@ -590,7 +590,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
mAnimator.addListener(AnimatorListeners.forEndCallback(() -> {
mAnimator = null;
mIsStashed = isStashed;
onIsStashedChanged();
onIsStashedChanged(mIsStashed);
}));
return;
}
@@ -605,7 +605,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
@Override
public void onAnimationStart(Animator animation) {
mIsStashed = isStashed;
onIsStashedChanged();
onIsStashedChanged(mIsStashed);
cancelTimeoutIfExists();
}
@@ -830,9 +830,10 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
.setDuration(TASKBAR_HINT_STASH_DURATION).start();
}
private void onIsStashedChanged() {
private void onIsStashedChanged(boolean isStashed) {
mControllers.runAfterInit(() -> {
mControllers.stashedHandleViewController.onIsStashedChanged();
mControllers.stashedHandleViewController.onIsStashedChanged(
isStashed && supportsVisualStashing());
mControllers.taskbarInsetsController.onTaskbarOrBubblebarWindowHeightOrInsetsChanged();
});
}