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

Commit f4b2b512 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "By default, all notifications can be bubbled"

parents 6ad5f0d3 4179f995
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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";
+1 −0
Original line number Diff line number Diff line
@@ -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;
+3 −0
Original line number Diff line number Diff line
@@ -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>
+19 −1
Original line number Diff line number Diff line
@@ -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) {