diff options
author | David van Tonder <david.vantonder@gmail.com> | 2013-07-02 10:54:38 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-07-02 10:54:38 -0700 |
commit | 5aacfcbbe55f638d1f69933acb0821492c354b48 (patch) | |
tree | e5e13dc0d34475d924949e3996f92a89fac9613f /src/com/android | |
parent | 7c2666af7732d33d216b6ca2725896f82b6f3607 (diff) | |
parent | b59c3557999a9b85f8361641c0cf947580d3aa9c (diff) | |
download | packages_apps_settings-5aacfcbbe55f638d1f69933acb0821492c354b48.zip packages_apps_settings-5aacfcbbe55f638d1f69933acb0821492c354b48.tar.gz packages_apps_settings-5aacfcbbe55f638d1f69933acb0821492c354b48.tar.bz2 |
Merge "Add option to hide music controls in lockscreen." into cm-10.1
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/settings/cyanogenmod/LockscreenInterface.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/settings/cyanogenmod/LockscreenInterface.java b/src/com/android/settings/cyanogenmod/LockscreenInterface.java index 740182e..37d56e8 100644 --- a/src/com/android/settings/cyanogenmod/LockscreenInterface.java +++ b/src/com/android/settings/cyanogenmod/LockscreenInterface.java @@ -60,12 +60,14 @@ public class LockscreenInterface extends SettingsPreferenceFragment implements private static final String KEY_LOCKSCREEN_BUTTONS = "lockscreen_buttons"; private static final String KEY_LOCK_CLOCK = "lock_clock"; private static final String KEY_LOCKSCREEN_MAXIMIZE_WIDGETS = "lockscreen_maximize_widgets"; + private static final String KEY_LOCKSCREEN_MUSIC_CONTROLS = "lockscreen_music_controls"; private static final String KEY_BACKGROUND = "lockscreen_background"; private static final String KEY_SCREEN_SECURITY = "screen_security"; private ListPreference mCustomBackground; private ListPreference mBatteryStatus; private CheckBoxPreference mMaximizeWidgets; + private CheckBoxPreference mMusicControls; private File mWallpaperImage; private File mWallpaperTemporary; @@ -99,6 +101,9 @@ public class LockscreenInterface extends SettingsPreferenceFragment implements mMaximizeWidgets.setOnPreferenceChangeListener(this); } + mMusicControls = (CheckBoxPreference) findPreference(KEY_LOCKSCREEN_MUSIC_CONTROLS); + mMusicControls.setOnPreferenceChangeListener(this); + PreferenceScreen lockscreenButtons = (PreferenceScreen) findPreference(KEY_LOCKSCREEN_BUTTONS); if (!hasButtons()) { getPreferenceScreen().removePreference(lockscreenButtons); @@ -158,6 +163,10 @@ public class LockscreenInterface extends SettingsPreferenceFragment implements mMaximizeWidgets.setChecked(Settings.System.getInt(cr, Settings.System.LOCKSCREEN_MAXIMIZE_WIDGETS, 0) == 1); } + if (mMusicControls != null) { + mMusicControls.setChecked(Settings.System.getInt(cr, + Settings.System.LOCKSCREEN_MUSIC_CONTROLS, 1) == 1); + } } } @@ -200,6 +209,10 @@ public class LockscreenInterface extends SettingsPreferenceFragment implements boolean value = (Boolean) objValue; Settings.System.putInt(cr, Settings.System.LOCKSCREEN_MAXIMIZE_WIDGETS, value ? 1 : 0); return true; + } else if (preference == mMusicControls) { + boolean value = (Boolean) objValue; + Settings.System.putInt(cr, Settings.System.LOCKSCREEN_MUSIC_CONTROLS, value ? 1 : 0); + return true; } else if (preference == mCustomBackground) { int selection = mCustomBackground.findIndexOfValue(objValue.toString()); return handleBackgroundSelection(selection); |