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

Commit 2eff7450 authored by Evan Rosky's avatar Evan Rosky
Browse files

Add option to disable lockscreen by default

Bug: 27502832
Change-Id: I3e5d024c07a69f3fea1c0450040898c53b732183
parent 103bd9bf
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -589,8 +589,14 @@ public class LockPatternUtils {
     * @return true if lock screen is disabled
     */
    public boolean isLockScreenDisabled(int userId) {
        return !isSecure(userId) &&
                getBoolean(DISABLE_LOCKSCREEN_KEY, false, userId);
        if (isSecure(userId)) {
            return false;
        }
        boolean disabledByDefault = mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_disableLockscreenByDefault);
        boolean isSystemUser = UserManager.isSplitSystemUser() && userId == UserHandle.USER_SYSTEM;
        return getBoolean(DISABLE_LOCKSCREEN_KEY, false, userId)
                || (disabledByDefault && !isSystemUser);
    }

    /**
+3 −0
Original line number Diff line number Diff line
@@ -967,6 +967,9 @@
         If so, this should be set to 'false' in an overlay. -->
    <bool name="config_enable_emergency_call_while_sim_locked">true</bool>

    <!-- Is the lock-screen disabled for new users by default -->
    <bool name="config_disableLockscreenByDefault">false</bool>

    <!-- Control the behavior when the user long presses the home button.
            0 - Nothing
            1 - Recent apps view in SystemUI
+1 −0
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@
  <java-symbol type="bool" name="config_autoPowerModePrefetchLocation" />
  <java-symbol type="bool" name="config_enable_emergency_call_while_sim_locked" />
  <java-symbol type="bool" name="config_enable_puk_unlock_screen" />
  <java-symbol type="bool" name="config_disableLockscreenByDefault" />
  <java-symbol type="bool" name="config_enableBurnInProtection" />
  <java-symbol type="bool" name="config_hotswapCapable" />
  <java-symbol type="bool" name="config_mms_content_disposition_support" />