From 1ee7293d38a6de03e5e310ca3cbebc0b60cb42c4 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Fri, 30 Jul 2021 10:11:07 -0400 Subject: [PATCH] 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 --- .../src/com/android/keyguard/KeyguardPasswordView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java index 90c1e402d248f..3a3d30861132c 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java @@ -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;