summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/cm_strings.xml3
-rw-r--r--res/xml/security_settings_chooser.xml5
-rw-r--r--res/xml/security_settings_password.xml5
-rw-r--r--res/xml/security_settings_pattern.xml5
-rw-r--r--res/xml/security_settings_pin.xml5
-rw-r--r--src/com/android/settings/SecuritySettings.java9
6 files changed, 32 insertions, 0 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index 27ca707..c02a8f8 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -1213,4 +1213,7 @@
<!-- Label for settings shortcut: carrier selection -->
<string name="shortcut_carrier_title">Network operators</string>
+
+ <!-- title for lock screen blur preference -->
+ <string name="lockscreen_blur_enabled_title">Lock screen blur</string>
</resources>
diff --git a/res/xml/security_settings_chooser.xml b/res/xml/security_settings_chooser.xml
index a097abf..cad2534 100644
--- a/res/xml/security_settings_chooser.xml
+++ b/res/xml/security_settings_chooser.xml
@@ -51,6 +51,11 @@
android:title="@string/lockscreen_visualizer_title"
android:defaultValue="true"/>
+ <com.android.settings.cyanogenmod.CMSecureSettingSwitchPreference
+ android:key="lock_screen_blur_enabled"
+ android:title="@string/lockscreen_blur_enabled_title"
+ android:defaultValue="true"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_password.xml b/res/xml/security_settings_password.xml
index 680a579..f926378 100644
--- a/res/xml/security_settings_password.xml
+++ b/res/xml/security_settings_password.xml
@@ -77,6 +77,11 @@
android:title="@string/lockscreen_visualizer_title"
android:defaultValue="true"/>
+ <com.android.settings.cyanogenmod.CMSecureSettingSwitchPreference
+ android:key="lock_screen_blur_enabled"
+ android:title="@string/lockscreen_blur_enabled_title"
+ android:defaultValue="true"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_pattern.xml b/res/xml/security_settings_pattern.xml
index 2576ea7..1e04839 100644
--- a/res/xml/security_settings_pattern.xml
+++ b/res/xml/security_settings_pattern.xml
@@ -93,6 +93,11 @@
android:title="@string/lockscreen_visualizer_title"
android:defaultValue="true"/>
+ <com.android.settings.cyanogenmod.CMSecureSettingSwitchPreference
+ android:key="lock_screen_blur_enabled"
+ android:title="@string/lockscreen_blur_enabled_title"
+ android:defaultValue="true"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_pin.xml b/res/xml/security_settings_pin.xml
index a378ef9..c5d849d 100644
--- a/res/xml/security_settings_pin.xml
+++ b/res/xml/security_settings_pin.xml
@@ -82,6 +82,11 @@
android:title="@string/lockscreen_visualizer_title"
android:defaultValue="true"/>
+ <com.android.settings.cyanogenmod.CMSecureSettingSwitchPreference
+ android:key="lock_screen_blur_enabled"
+ android:title="@string/lockscreen_blur_enabled_title"
+ android:defaultValue="true"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 6337800..35451d7 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) {