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

Commit ecc0a169 authored by Danesh M's avatar Danesh M
Browse files

Lockscreen : Widgets before secure lockscreen fix

Due to user profiles, the lockscreen settings were moved and a check added to force
queries for such matter to go via LockPatternUtils.
Add a getter in order to abide by this for querying this preference.

Change-Id: If9ac2b29e33cd2183fd67af22a8db280c0c6e1a4
parent 8d91ddef
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1300,4 +1300,12 @@ public class LockPatternUtils {
        setBoolean(Settings.Secure.LOCK_BEFORE_UNLOCK, enabled);
    }

    /**
     * @hide
     * Get the lock-before-unlock option (show widgets before the secure
     * unlock screen).
     */
    public boolean getLockBeforeUnlock() {
        return getBoolean(Settings.Secure.LOCK_BEFORE_UNLOCK, false);
    }
}
+2 −4
Original line number Diff line number Diff line
@@ -702,8 +702,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
    protected void onConfigurationChanged(Configuration newConfig) {
        Resources resources = getResources();
        mShowLockBeforeUnlock = resources.getBoolean(R.bool.config_enableLockBeforeUnlockScreen) ||
                        (Settings.Secure.getInt(mContext.getContentResolver(),
                        Settings.Secure.LOCK_BEFORE_UNLOCK, 0) != 0);
                mLockPatternUtils.getLockBeforeUnlock();;
        mConfiguration = newConfig;
        if (DEBUG_CONFIGURATION) Log.v(TAG, "**** re-creating lock screen since config changed");
        saveWidgetState();
@@ -1067,8 +1066,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
        final IccCard.State simState = mUpdateMonitor.getSimState();

        mShowLockBeforeUnlock = mContext.getResources().getBoolean(R.bool.config_enableLockBeforeUnlockScreen) ||
                        (Settings.Secure.getInt(mContext.getContentResolver(),
                        Settings.Secure.LOCK_BEFORE_UNLOCK, 0) != 0);
                mLockPatternUtils.getLockBeforeUnlock();

        if (stuckOnLockScreenBecauseSimMissing() ||
                (simState == IccCard.State.PUK_REQUIRED &&