Merge "Change bubbles to be off by default" into qt-dev

This commit is contained in:
Mady Mellor
2019-05-13 18:18:31 +00:00
committed by Android (Google) Code Review
2 changed files with 15 additions and 2 deletions

View File

@@ -225,7 +225,7 @@
<bool name="def_charging_sounds_enabled">true</bool>
<!-- Default for Settings.Secure.NOTIFICATION_BUBBLES -->
<bool name="def_notification_bubbles">true</bool>
<bool name="def_notification_bubbles">false</bool>
<!-- Default for Settings.Secure.AWARE_ENABLED -->
<bool name="def_aware_enabled">false</bool>

View File

@@ -3237,7 +3237,7 @@ public class SettingsProvider extends ContentProvider {
}
private final class UpgradeController {
private static final int SETTINGS_VERSION = 179;
private static final int SETTINGS_VERSION = 180;
private final int mUserId;
@@ -4387,6 +4387,19 @@ public class SettingsProvider extends ContentProvider {
currentVersion = 179;
}
if (currentVersion == 179) {
// Version 178: Reset the default for Secure Settings: NOTIFICATION_BUBBLES
// This is originally set in version 173, however, the default value changed
// so this step is to ensure the value is updated to the correct defaulte
final SettingsState secureSettings = getSecureSettingsLocked(userId);
secureSettings.insertSettingLocked(Secure.NOTIFICATION_BUBBLES,
getContext().getResources().getBoolean(
R.bool.def_notification_bubbles) ? "1" : "0", null,
true, SettingsState.SYSTEM_PACKAGE_NAME);
currentVersion = 180;
}
// vXXX: Add new settings above this point.