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

Commit b08853aa authored by Jason Monk's avatar Jason Monk
Browse files

Handle default properly to avoid scary logging.

Lock-to-app enabled should default to false and not bother logging
about it not being set yet.

Bug: 16958525
Change-Id: If0d595107d4d40a62ac5d2cc461a8aa18ff80e19
parent d58f0bd6
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -291,15 +291,11 @@ public class SecuritySettings extends SettingsPreferenceFragment
                root.findPreference(KEY_SIM_LOCK).setEnabled(false);
            }
        }
        try {
            if (Settings.System.getInt(getContentResolver(), Settings.System.LOCK_TO_APP_ENABLED)
                    != 0) {
        if (Settings.System.getInt(getContentResolver(),
                Settings.System.LOCK_TO_APP_ENABLED, 0) != 0) {
            root.findPreference(KEY_SCREEN_PINNING).setSummary(
                    getResources().getString(R.string.switch_on_text));
        }
        } catch (SettingNotFoundException e) {
            Log.w(TAG, "No Lock-to-app enabled setting", e);
        }

        // Show password
        mShowPassword = (CheckBoxPreference) root.findPreference(KEY_SHOW_PASSWORD);