Fix onIsStashedChanged() not called in 3 button mode

Calling this ensures we update touchableRegion accordingly.

Since this will also start the stashed handle region sampling,
which we don't need for 3 button mode, also adjust logic to
check that the StashedHandleView is actually visible.

Flag: None
Test: Lock screen, run `adb shell cmd uimode night yes`, unlock
Test: Lock screen, rotate, unlock
  In both cases, verify touchableRegion is accurate
Fixes: 315393203
Change-Id: I951af6b97cad0ee0f362dc22f3996cfd9286a21e
This commit is contained in:
Tony Wickham
2024-01-05 19:19:57 +00:00
parent 710634b192
commit 438e6c90af
2 changed files with 8 additions and 7 deletions
@@ -590,6 +590,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
mAnimator.addListener(AnimatorListeners.forEndCallback(() -> {
mAnimator = null;
mIsStashed = isStashed;
onIsStashedChanged();
}));
return;
}
@@ -604,7 +605,7 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
@Override
public void onAnimationStart(Animator animation) {
mIsStashed = isStashed;
onIsStashedChanged(mIsStashed);
onIsStashedChanged();
cancelTimeoutIfExists();
}
@@ -829,9 +830,9 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba
.setDuration(TASKBAR_HINT_STASH_DURATION).start();
}
private void onIsStashedChanged(boolean isStashed) {
private void onIsStashedChanged() {
mControllers.runAfterInit(() -> {
mControllers.stashedHandleViewController.onIsStashedChanged(isStashed);
mControllers.stashedHandleViewController.onIsStashedChanged();
mControllers.taskbarInsetsController.onTaskbarOrBubblebarWindowHeightOrInsetsChanged();
});
}