Password bouncer landscape fix

For the password security method, in order to provide a smoother
experience when closing the bouncer and transitioning to the home
screen, we tightly control ime insets animations. However, in
landscape mode, this request is denied which produces an immediate
call to onCancelled(). This leaves the bouncer up while unlocking the
phone (yikes), and leaves the user no way to get rid of the keyguard
until the screen is powered off.

If the call to control insets is denied, issue the finish callbacks to
ensure that downstream consumers know the bouncer is complete.

Fixes: 194782889
Test: manual - From lockscreen with password security method,
double-tap power to open camera, rotate to landscape, and hit the lock icon

Change-Id: Id34fb8932642b06b089f460713daed1d9a9fe6fa
This commit is contained in:
Matt Pietal
2021-07-30 10:11:07 -04:00
parent b8364adc23
commit 1ee7293d38

View File

@@ -209,6 +209,11 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView {
@Override
public void onCancelled(
@Nullable WindowInsetsAnimationController controller) {
// It is possible to be denied control of ime insets, which means onReady
// is never called. We still need to notify the runnables in order to
// complete the bouncer disappearing
runOnFinishImeAnimationRunnable();
finishRunnable.run();
}
});
return true;