Merge "By default, all notifications can be bubbled"
This commit is contained in:
@@ -1859,6 +1859,7 @@ package android.provider {
|
||||
field @Deprecated public static final String ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES = "enabled_notification_policy_access_packages";
|
||||
field public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS = "location_access_check_delay_millis";
|
||||
field public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = "location_access_check_interval_millis";
|
||||
field public static final String NOTIFICATION_BADGING = "notification_badging";
|
||||
field public static final String NOTIFICATION_BUBBLES = "notification_bubbles";
|
||||
field @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static final String SYNC_PARENT_SOUNDS = "sync_parent_sounds";
|
||||
field public static final String USER_SETUP_COMPLETE = "user_setup_complete";
|
||||
|
||||
@@ -8289,6 +8289,7 @@ public final class Settings {
|
||||
* The value is boolean (1 or 0).
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public static final String NOTIFICATION_BADGING = "notification_badging";
|
||||
|
||||
private static final Validator NOTIFICATION_BADGING_VALIDATOR = BOOLEAN_VALIDATOR;
|
||||
|
||||
@@ -220,4 +220,7 @@
|
||||
|
||||
<!-- Default for Settings.Secure.CHARGING_SOUNDS_ENABLED -->
|
||||
<bool name="def_charging_sounds_enabled">true</bool>
|
||||
|
||||
<!-- Default for Settings.Secure.NOTIFICATION_BUBBLES -->
|
||||
<bool name="def_notification_bubbles">true</bool>
|
||||
</resources>
|
||||
|
||||
@@ -3232,7 +3232,7 @@ public class SettingsProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
private final class UpgradeController {
|
||||
private static final int SETTINGS_VERSION = 173;
|
||||
private static final int SETTINGS_VERSION = 174;
|
||||
|
||||
private final int mUserId;
|
||||
|
||||
@@ -4252,6 +4252,24 @@ public class SettingsProvider extends ContentProvider {
|
||||
currentVersion = 173;
|
||||
}
|
||||
|
||||
if (currentVersion == 173) {
|
||||
// Version 173: Set the default value for Secure Settings: NOTIFICATION_BUBBLES
|
||||
|
||||
final SettingsState secureSettings = getSecureSettingsLocked(userId);
|
||||
|
||||
final Setting bubblesSetting = secureSettings.getSettingLocked(
|
||||
Secure.NOTIFICATION_BUBBLES);
|
||||
|
||||
if (bubblesSetting.isNull()) {
|
||||
secureSettings.insertSettingLocked(Secure.NOTIFICATION_BUBBLES,
|
||||
getContext().getResources().getBoolean(
|
||||
R.bool.def_notification_bubbles) ? "1" : "0", null,
|
||||
true, SettingsState.SYSTEM_PACKAGE_NAME);
|
||||
}
|
||||
|
||||
currentVersion = 174;
|
||||
}
|
||||
|
||||
// vXXX: Add new settings above this point.
|
||||
|
||||
if (currentVersion != newVersion) {
|
||||
|
||||
Reference in New Issue
Block a user