Remove usages of LPU.savedPatternExists

The correct method to call is isLockPatternEnabled, which
also checks whether we've actually selected a pattern.

Also removes the code for the obsolete pattern enabled setting.

Bug: 18931518
Change-Id: I6f369eb60f8f6bb1e33384cd06534c713ab52e79
This commit is contained in:
Adrian Roos
2015-01-08 16:20:00 +01:00
parent f788718f21
commit 6b879f50f6
4 changed files with 4 additions and 8 deletions

View File

@@ -72,7 +72,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
// Lock Settings
private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";
private static final String KEY_LOCK_ENABLED = "lockenabled";
private static final String KEY_VISIBLE_PATTERN = "visiblepattern";
private static final String KEY_SECURITY_CATEGORY = "security_category";
private static final String KEY_DEVICE_ADMIN_CATEGORY = "device_admin_category";
@@ -99,8 +98,8 @@ public class SecuritySettings extends SettingsPreferenceFragment
// These switch preferences need special handling since they're not all stored in Settings.
private static final String SWITCH_PREFERENCE_KEYS[] = { KEY_LOCK_AFTER_TIMEOUT,
KEY_LOCK_ENABLED, KEY_VISIBLE_PATTERN,
KEY_POWER_INSTANTLY_LOCKS, KEY_SHOW_PASSWORD, KEY_TOGGLE_INSTALL_APPLICATIONS };
KEY_VISIBLE_PATTERN, KEY_POWER_INSTANTLY_LOCKS, KEY_SHOW_PASSWORD,
KEY_TOGGLE_INSTALL_APPLICATIONS };
// Only allow one trust agent on the platform.
private static final boolean ONLY_ONE_TRUST_AGENT = true;
@@ -610,8 +609,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
Log.e("SecuritySettings", "could not persist lockAfter timeout setting", e);
}
updateLockAfterPreferenceSummary();
} else if (KEY_LOCK_ENABLED.equals(key)) {
lockPatternUtils.setLockPatternEnabled((Boolean) value);
} else if (KEY_VISIBLE_PATTERN.equals(key)) {
lockPatternUtils.setVisiblePatternEnabled((Boolean) value);
} else if (KEY_POWER_INSTANTLY_LOCKS.equals(key)) {