Allow none lockscreen with multiple users

Bug: 19962043
Change-Id: Ic7dcbd371d700bf8796f50469a7ac7d529ec491d
This commit is contained in:
Adrian Roos
2015-04-07 16:55:29 +02:00
parent e06c34464e
commit 591dc85017
2 changed files with 3 additions and 19 deletions

View File

@@ -157,12 +157,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
LockPatternUtils lockPatternUtils) {
int resid = 0;
if (!lockPatternUtils.isSecure()) {
// if there are multiple users, disable "None" setting
UserManager mUm = (UserManager) context. getSystemService(Context.USER_SERVICE);
List<UserInfo> users = mUm.getUsers(true);
final boolean singleUser = users.size() == 1;
if (singleUser && lockPatternUtils.isLockScreenDisabled()) {
if (lockPatternUtils.isLockScreenDisabled()) {
resid = R.xml.security_settings_lockscreen;
} else {
resid = R.xml.security_settings_chooser;