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

Commit a6314da2 authored by Brian Colonna's avatar Brian Colonna Committed by Android (Google) Code Review
Browse files

Merge "FUL being unsuppressed when screen turns off fixes b/7453702" into jb-mr1-lockscreen-dev

parents c4842c11 078f5919
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -421,8 +421,8 @@ public class KeyguardHostView extends KeyguardViewBase {
    void showPrimarySecurityScreen(boolean turningOff) {
        SecurityMode securityMode = mSecurityModel.getSecurityMode();
        if (DEBUG) Log.v(TAG, "showPrimarySecurityScreen(turningOff=" + turningOff + ")");
        if (!turningOff && KeyguardUpdateMonitor.getInstance(mContext).isAlternateUnlockEnabled()
                && !KeyguardUpdateMonitor.getInstance(mContext).getIsFirstBoot()) {
        if (!turningOff &&
                KeyguardUpdateMonitor.getInstance(mContext).isAlternateUnlockEnabled()) {
            // If we're not turning off, then allow biometric alternate.
            // We'll reload it when the device comes back on.
            securityMode = mSecurityModel.getAlternateFor(securityMode);
@@ -498,7 +498,6 @@ public class KeyguardHostView extends KeyguardViewBase {
            // If the alternate unlock was suppressed, it can now be safely
            // enabled because the user has left keyguard.
            KeyguardUpdateMonitor.getInstance(mContext).setAlternateUnlockEnabled(true);
            KeyguardUpdateMonitor.getInstance(mContext).setIsFirstBoot(false);

            // If there's a pending runnable because the user interacted with a widget
            // and we're leaving keyguard, then run it.
@@ -710,6 +709,9 @@ public class KeyguardHostView extends KeyguardViewBase {
    @Override
    public void onScreenTurnedOff() {
        if (DEBUG) Log.d(TAG, "screen off, instance " + Integer.toHexString(hashCode()));
        // Once the screen turns off, we no longer consider this to be first boot and we want the
        // biometric unlock to start next time keyguard is shown.
        KeyguardUpdateMonitor.getInstance(mContext).setAlternateUnlockEnabled(true);
        saveStickyWidgetIndex();
        showPrimarySecurityScreen(true);
        getSecurityView(mCurrentSecuritySelection).onPause();
+0 −9
Original line number Diff line number Diff line
@@ -200,7 +200,6 @@ public class KeyguardUpdateMonitor {
            }
        }
    };
    private boolean mIsFirstBoot;

    /**
     * When we receive a
@@ -778,12 +777,4 @@ public class KeyguardUpdateMonitor {
                || simState == IccCardConstants.State.PUK_REQUIRED
                || simState == IccCardConstants.State.PERM_DISABLED);
    }

    public void setIsFirstBoot(boolean b) {
        mIsFirstBoot = b;
    }
    
    public boolean getIsFirstBoot() {
        return mIsFirstBoot;
    }
}
+0 −1
Original line number Diff line number Diff line
@@ -522,7 +522,6 @@ public class KeyguardViewMediator {

            // Disable alternate unlock right after boot until things have settled.
            mUpdateMonitor.setAlternateUnlockEnabled(false);
            mUpdateMonitor.setIsFirstBoot(true);

            doKeyguardLocked();
        }