summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2013-06-30 14:53:10 +0200
committerDanny Baumann <dannybaumann@web.de>2013-06-30 14:53:10 +0200
commitb59c3557999a9b85f8361641c0cf947580d3aa9c (patch)
tree34e516ee536742c9364c15ae9b136bb168749098 /src
parent765742df4c111ed7cad8c2b2798c748d7bd14cc5 (diff)
downloadpackages_apps_settings-b59c3557999a9b85f8361641c0cf947580d3aa9c.zip
packages_apps_settings-b59c3557999a9b85f8361641c0cf947580d3aa9c.tar.gz
packages_apps_settings-b59c3557999a9b85f8361641c0cf947580d3aa9c.tar.bz2
Add option to hide music controls in lockscreen.
Change-Id: I736df60139f1b977838c16136c0c30198633fcb2
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/cyanogenmod/LockscreenInterface.java13
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);