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

Commit fbaa1ea1 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix 5027468: prevent screen from turning back on while lockscreen in password mode."

parents 2c41fa18 dcb93769
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen

    private StatusView mStatusView;
    private final boolean mUseSystemIME = true; // TODO: Make configurable
    private boolean mResuming; // used to prevent poking the wakelock during onResume()

    // To avoid accidental lockout due to events while the device in in the pocket, ignore
    // any passwords with length less than or equal to this length.
@@ -185,8 +186,10 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
            }

            public void afterTextChanged(Editable s) {
                if (!mResuming) {
                    mCallback.pokeWakelock();
                }
            }
        });
    }

@@ -208,6 +211,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen

    /** {@inheritDoc} */
    public void onResume() {
        mResuming = true;
        // reset status
        mStatusView.resetStatusInfo(mUpdateMonitor, mLockPatternUtils);

@@ -222,6 +226,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen
        if (deadline != 0) {
            handleAttemptLockout(deadline);
        }
        mResuming = false;
    }

    /** {@inheritDoc} */