Skip to content

Commit 4246c40

Browse files
author
Adnan Begovic
committed
Settings: Remove "Make pattern visible" regardless.
- Previous logic depended on all pattern lock elements to be null prior to removing the preferences. Remove them one by one if they exist now. - PS daproy#3: Add braces. Change-Id: If34bc305eddda2985b37bd55349e4bb5d9b63154
1 parent bf1577e commit 4246c40

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/com/android/settings/SecuritySettings.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,16 @@ private PreferenceScreen createPreferenceHierarchy() {
287287
DevicePolicyManager.PASSWORD_QUALITY_SOMETHING) {
288288
PreferenceGroup securityCategory = (PreferenceGroup)
289289
root.findPreference(KEY_SECURITY_CATEGORY);
290-
if (securityCategory != null && mVisiblePattern != null &&
291-
mVisibleErrorPattern != null && mVisibleDots != null) {
292-
securityCategory.removePreference(mVisiblePattern);
293-
securityCategory.removePreference(mVisibleErrorPattern);
294-
securityCategory.removePreference(mVisibleDots);
290+
if (securityCategory != null) {
291+
if (mVisiblePattern != null) {
292+
securityCategory.removePreference(mVisiblePattern);
293+
}
294+
if (mVisibleErrorPattern != null) {
295+
securityCategory.removePreference(mVisibleErrorPattern);
296+
}
297+
if (mVisibleDots != null) {
298+
securityCategory.removePreference(mVisibleDots);
299+
}
295300
}
296301
}
297302

0 commit comments

Comments
 (0)