diff options
Diffstat (limited to 'src')
-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); |