Add option to disable lockscreen by default
Bug: 27502832 Change-Id: I3e5d024c07a69f3fea1c0450040898c53b732183
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user