[media] Separate ringtones for managed profiles
Separate the default system ringtone settings for managed profiles,
which previously used the same default ringtones as the personal profile
they belong to
Bug: 30658854
Change-Id: I22c69c7b8d31c7c424f5e00a3d9febac98b93d74
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 5bc50ca..2c02cfa 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3817,6 +3817,26 @@
}
/**
+ * These entries should be cloned from this profile's parent only if the dependency's
+ * value is true ("1")
+ *
+ * Note: the dependencies must be Secure settings
+ *
+ * @hide
+ */
+ public static final Map<String, String> CLONE_FROM_PARENT_ON_VALUE = new ArrayMap<>();
+ static {
+ CLONE_FROM_PARENT_ON_VALUE.put(RINGTONE, Secure.SYNC_PARENT_SOUNDS);
+ CLONE_FROM_PARENT_ON_VALUE.put(NOTIFICATION_SOUND, Secure.SYNC_PARENT_SOUNDS);
+ CLONE_FROM_PARENT_ON_VALUE.put(ALARM_ALERT, Secure.SYNC_PARENT_SOUNDS);
+ }
+
+ /** @hide */
+ public static void getCloneFromParentOnValueSettings(Map<String, String> outMap) {
+ outMap.putAll(CLONE_FROM_PARENT_ON_VALUE);
+ }
+
+ /**
* When to use Wi-Fi calling
*
* @see android.telephony.TelephonyManager.WifiCallingChoices