summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
diff options
context:
space:
mode:
authorMatt Pietal <mpietal@google.com>2020-12-30 08:32:15 -0500
committerMatt Pietal <mpietal@google.com>2020-12-30 08:32:15 -0500
commit9360c8e5ab705e2b8b2d478e89c9c0ad7e0905b5 (patch)
treef63e5d4fa84305a1741b467674e39351f6348804 /packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
parentcf7d074d2cdcbd475c38be2c60e1c8fd968cff48 (diff)
Password bouncer - Go back on first gesture
When using the bouncer with password security, it currently takes 2 swipes to go back: 1 to dimiss the IME, the 2nd to exit the bouncer. For this case, intercept the back key event and immediately close bouncer. Fixes: 174020768 Test: manual Change-Id: I85a650bb4a28d4209dc84461e69fb80824228a39
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java')
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
index 3fafa5c606bd..ea60f0d40369 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardHostViewController.java
@@ -375,6 +375,17 @@ public class KeyguardHostViewController extends ViewController<KeyguardHostView>
}
/**
+ * @return true if the current bouncer is password
+ */
+ public boolean dispatchBackKeyEventPreIme() {
+ if (mKeyguardSecurityContainerController.getCurrentSecurityMode()
+ == SecurityMode.Password) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
* Allows the media keys to work when the keyguard is showing.
* The media keys should be of no interest to the actual keyguard view(s),
* so intercepting them here should not be of any harm.