Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88a4c6dc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Prevent re-entrant calls to onPause" into tm-dev am: d39f0f7c am:...

Merge "Prevent re-entrant calls to onPause" into tm-dev am: d39f0f7c am: afc8080c am: 6544b587

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19034153



Change-Id: Ib4718522f2321b8b5b0bbfdb8df26e9bdf4b6880
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 961b5d99 6544b587
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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();
        }
@@ -223,6 +225,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();