Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d46652a2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use value from XML for Secure.NOTIFICATION_BADGING."

parents af5a66bf b4df8bc5
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -3017,7 +3017,7 @@ public class SettingsProvider extends ContentProvider {
        }

        private final class UpgradeController {
            private static final int SETTINGS_VERSION = 153;
            private static final int SETTINGS_VERSION = 154;

            private final int mUserId;

@@ -3627,6 +3627,23 @@ public class SettingsProvider extends ContentProvider {
                    currentVersion = 153;
                }

                if (currentVersion == 153) {
                    // Version 154: Read notification badge configuration from config.
                    // If user has already set the value, don't do anything.
                    final SettingsState systemSecureSettings = getSecureSettingsLocked(userId);
                    final Setting showNotificationBadges = systemSecureSettings.getSettingLocked(
                            Settings.Secure.NOTIFICATION_BADGING);
                    if (showNotificationBadges.isNull()) {
                        final boolean defaultValue = getContext().getResources().getBoolean(
                                com.android.internal.R.bool.config_notificationBadging);
                        systemSecureSettings.insertSettingLocked(
                                Secure.NOTIFICATION_BADGING,
                                defaultValue ? "1" : "0",
                                null, true, SettingsState.SYSTEM_PACKAGE_NAME);
                    }
                    currentVersion = 154;
                }

                // vXXX: Add new settings above this point.

                if (currentVersion != newVersion) {