From bc0fab1fc2db832ef86d8a33466ec4d68b103ca0 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Wed, 19 Sep 2012 11:24:41 -0700 Subject: Add multi user volume management Notification and Alarm volumes are per user: they are saved and restored when the foreground user changes. Media volume is global: it is still saved and restored per user for implentation reasons but is copied from one user to the next to ensure media playback volume continuity when switching users. Ringer mode (silent, vibrate...) is now a global setting. Bug 7128886. Change-Id: I9f4f5a0a3985552bca61c2cc3bbe5a144db755a6 --- core/java/android/provider/Settings.java | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'core/java/android') diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index a182234..804f57a 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -919,6 +919,7 @@ public final class Settings { MOVED_TO_GLOBAL.add(Settings.Global.POWER_SOUNDS_ENABLED); MOVED_TO_GLOBAL.add(Settings.Global.STAY_ON_WHILE_PLUGGED_IN); MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SLEEP_POLICY); + MOVED_TO_GLOBAL.add(Settings.Global.MODE_RINGER); } private static void lazyInitCache() { @@ -1482,6 +1483,12 @@ public final class Settings { @Deprecated public static final int WIFI_SLEEP_POLICY_NEVER = Global.WIFI_SLEEP_POLICY_NEVER; + /** + * @deprecated Use {@link android.provider.Settings.Global#MODE_RINGER} instead + */ + @Deprecated + public static final String MODE_RINGER = Global.MODE_RINGER; + //TODO: deprecate static IP constants /** * Whether to use static IP and other static network attributes. @@ -1651,13 +1658,6 @@ public final class Settings { public static final String ALWAYS_FINISH_ACTIVITIES = "always_finish_activities"; - - /** - * Ringer mode. This is used internally, changing this value will not - * change the ringer mode. See AudioManager. - */ - public static final String MODE_RINGER = "mode_ringer"; - /** * Determines which streams are affected by ringer mode changes. The * stream type's bit should be set to 1 if it should be muted when going @@ -5709,7 +5709,11 @@ public final class Settings { */ public static final String WTF_IS_FATAL = "wtf_is_fatal"; - + /** + * Ringer mode. This is used internally, changing this value will not + * change the ringer mode. See AudioManager. + */ + public static final String MODE_RINGER = "mode_ringer"; // Populated lazily, guarded by class object: -- cgit v1.1