diff options
author | d34d <clark@cyngn.com> | 2016-03-31 10:58:15 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-04-01 08:36:06 -0700 |
commit | c932de51d42a70989a9c93b5e6fd0fb7fcc82333 (patch) | |
tree | b80bb0f08d4bced8036c2e953f5981f672739670 /src/com | |
parent | 2703eb717e542ff225611cb9e0217815ee14661c (diff) | |
download | packages_apps_Settings-c932de51d42a70989a9c93b5e6fd0fb7fcc82333.zip packages_apps_Settings-c932de51d42a70989a9c93b5e6fd0fb7fcc82333.tar.gz packages_apps_Settings-c932de51d42a70989a9c93b5e6fd0fb7fcc82333.tar.bz2 |
LLS: Add config for showing LLS settings at top
This config allows the live lock screen settings to be displayed
at the top of the Lock screen settings when set to true, by default
it is false
Change-Id: I051f07c4d7b05e89f4efdc018ce833190a4e14af
TICKET: CYNGNOS-2242
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index d311134..2652e8c 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -349,12 +349,16 @@ public class SecuritySettings extends SettingsPreferenceFragment PreferenceGroup generalCategory = (PreferenceGroup) root.findPreference(KEY_GENERAL_CATEGORY); if (pm.hasSystemFeature(LIVE_LOCK_SCREEN_FEATURE) && generalCategory != null) { + boolean moveToTop = getResources().getBoolean( + R.bool.config_showLiveLockScreenSettingsFirst); + + PreferenceGroup groupToAddTo = moveToTop ? root : generalCategory; Preference liveLockPreference = new Preference(getContext(), null); liveLockPreference.setIntent(new Intent(ACTION_OPEN_LIVE_LOCKSCREEN_SETTINGS)); - liveLockPreference.setOrder(0); + liveLockPreference.setOrder(-1); liveLockPreference.setTitle(R.string.live_lock_screen_title); liveLockPreference.setSummary(R.string.live_lock_screen_summary); - generalCategory.addPreference(liveLockPreference); + groupToAddTo.addPreference(liveLockPreference); } } |