summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2022-06-23 14:54:51 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-06-23 14:54:51 +0000
commitd39f0f7cfdb71f7bfa527b709008bbf731d2beec (patch)
tree470f7bddfca2f592a41cdb81909cb39f6434d7f5
parente8a08386489fb8b249e2d22c3d1d0e2dc738dd36 (diff)
parent6c1d067e9a31265c70c079f598cc9557470ff7ea (diff)
downloadbase-d39f0f7cfdb71f7bfa527b709008bbf731d2beec.tar.gz
Merge "Prevent re-entrant calls to onPause" into tm-dev
-rw-r--r--packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java
index 8f44e97ef231..bfacc590dc52 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordViewController.java
@@ -59,6 +59,7 @@ public class KeyguardPasswordViewController
private final boolean mShowImeAtScreenOn;
private EditText mPasswordEntry;
private ImageView mSwitchImeButton;
+ private boolean mPaused;
private final OnEditorActionListener mOnEditorActionListener = (v, actionId, event) -> {
// Check if this was the result of hitting the enter key
@@ -202,6 +203,7 @@ public class KeyguardPasswordViewController
@Override
public void onResume(int reason) {
super.onResume(reason);
+ mPaused = false;
if (reason != KeyguardSecurityView.SCREEN_ON || mShowImeAtScreenOn) {
showInput();
}
@@ -222,6 +224,11 @@ public class KeyguardPasswordViewController
@Override
public void onPause() {
+ if (mPaused) {
+ return;
+ }
+ mPaused = true;
+
if (!mPasswordEntry.isVisibleToUser()) {
// Reset all states directly and then hide IME when the screen turned off.
super.onPause();