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

Commit 4246c40d authored by Adnan Begovic's avatar Adnan Begovic
Browse files

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 #3: Add braces.

Change-Id: If34bc305eddda2985b37bd55349e4bb5d9b63154
parent bf1577e0
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -287,13 +287,18 @@ public class SecuritySettings extends RestrictedSettingsFragment
                DevicePolicyManager.PASSWORD_QUALITY_SOMETHING) {
            PreferenceGroup securityCategory = (PreferenceGroup)
                    root.findPreference(KEY_SECURITY_CATEGORY);
            if (securityCategory != null && mVisiblePattern != null &&
                    mVisibleErrorPattern != null && mVisibleDots != null) {
            if (securityCategory != null) {
                if (mVisiblePattern != null) {
                    securityCategory.removePreference(mVisiblePattern);
                }
                if (mVisibleErrorPattern != null) {
                    securityCategory.removePreference(mVisibleErrorPattern);
                }
                if (mVisibleDots != null) {
                    securityCategory.removePreference(mVisibleDots);
                }
            }
        }

        // Append the rest of the settings
        if (!isCmSecurity) {