From b08853aad9f3ef2dc3ba1f1c7a513a16220d4d9e Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Wed, 13 Aug 2014 09:43:58 -0400 Subject: 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 --- src/com/android/settings/SecuritySettings.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/com/android/settings/SecuritySettings.java') diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index 1fb5e13..61daf8b 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -291,14 +291,10 @@ 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) { - 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); + 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)); } // Show password -- cgit v1.1