From 5599680aa5c84f00a0ee148186e66e2476ce6184 Mon Sep 17 00:00:00 2001 From: d34d Date: Tue, 10 May 2016 09:25:31 -0700 Subject: Give user control over lock screen blur This will provide control over blurring since the current implementation assumes it is always on provided the device config specifies it supports blur. Change-Id: I7add45c607fcf47777d61629a3fc6245ffedb339 --- src/com/android/settings/SecuritySettings.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/com/android') diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index 63378009e..35451d73c 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -125,6 +125,7 @@ public class SecuritySettings extends SettingsPreferenceFragment private static final String KEY_SMS_SECURITY_CHECK_PREF = "sms_security_check_limit"; private static final String KEY_GENERAL_CATEGORY = "general_category"; private static final String KEY_LIVE_LOCK_SCREEN = "live_lock_screen"; + private static final String KEY_LOCK_SCREEN_BLUR = CMSettings.Secure.LOCK_SCREEN_BLUR_ENABLED; // 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, @@ -359,6 +360,14 @@ public class SecuritySettings extends SettingsPreferenceFragment setLiveLockScreenPreferenceTitleAndSummary(liveLockPreference); groupToAddTo.addPreference(liveLockPreference); } + + // only show blur setting for devices that support it + boolean blurSupported = getResources().getBoolean( + com.android.internal.R.bool.config_ui_blur_enabled); + if (!blurSupported) { + Preference blurEnabledPref = root.findPreference(KEY_LOCK_SCREEN_BLUR); + if (blurEnabledPref != null) root.removePreference(blurEnabledPref); + } } if (securityOrExternal) { -- cgit v1.2.3