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

Commit e1436f7a authored by YoungJoon Yang's avatar YoungJoon Yang
Browse files

DND access packages migration

Packages in config_defaultDndDeniedPackages are removed,
packages in config_defaultDndAccessPackages are added.

Bug: 268737818
Test: FrameworksUiServicesTests:NotificationManagerServiceTest
 FrameworksUiServicesTests:ConditionProvidersTest
Change-Id: I2a63d81c0aa8a537d06470eb9ab0b9a110882d2c
parent 8db6f584
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -11835,6 +11835,13 @@ public final class Settings {
        public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_EDGE_HAPTIC_ENABLED =
        public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_EDGE_HAPTIC_ENABLED =
                "accessibility_display_magnification_edge_haptic_enabled";
                "accessibility_display_magnification_edge_haptic_enabled";
        /**
         * If 1, DND default allowed packages have been updated
         *
         *  @hide
         */
        public static final String DND_CONFIGS_MIGRATED = "dnd_settings_migrated";
        /**
        /**
         * These entries are considered common between the personal and the managed profile,
         * These entries are considered common between the personal and the managed profile,
         * since the managed profile doesn't get to change them.
         * since the managed profile doesn't get to change them.
+3 −0
Original line number Original line Diff line number Diff line
@@ -4288,6 +4288,9 @@
    <!-- Colon separated list of package names that should be granted DND access -->
    <!-- Colon separated list of package names that should be granted DND access -->
    <string name="config_defaultDndAccessPackages" translatable="false">com.android.camera2</string>
    <string name="config_defaultDndAccessPackages" translatable="false">com.android.camera2</string>


    <!-- Colon separated list of package names that should be removed from DND access packages -->
    <string name="config_defaultDndDeniedPackages" translatable="false"></string>

    <!-- User restrictions set on the SYSTEM user when it is first created.
    <!-- User restrictions set on the SYSTEM user when it is first created.
         Note: Also update appropriate overlay files. -->
         Note: Also update appropriate overlay files. -->
    <string-array translatable="false" name="config_defaultFirstUserRestrictions">
    <string-array translatable="false" name="config_defaultFirstUserRestrictions">
+2 −0
Original line number Original line Diff line number Diff line
@@ -3383,6 +3383,8 @@


  <!-- Colon separated list of package names that should be granted DND access -->
  <!-- Colon separated list of package names that should be granted DND access -->
  <java-symbol type="string" name="config_defaultDndAccessPackages" />
  <java-symbol type="string" name="config_defaultDndAccessPackages" />
  <!-- Colon separated list of package names that should be removed from DND access packages -->
  <java-symbol type="string" name="config_defaultDndDeniedPackages" />


  <!-- For NetworkPolicyManagerService -->
  <!-- For NetworkPolicyManagerService -->
  <java-symbol type="string" name="config_networkOverLimitComponent" />
  <java-symbol type="string" name="config_networkOverLimitComponent" />
+1 −0
Original line number Original line Diff line number Diff line
@@ -385,5 +385,6 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_EDGE_HAPTIC_ENABLED,
        VALIDATORS.put(Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_EDGE_HAPTIC_ENABLED,
                BOOLEAN_VALIDATOR);
                BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.DND_CONFIGS_MIGRATED, BOOLEAN_VALIDATOR);
    }
    }
}
}
+2 −1
Original line number Original line Diff line number Diff line
@@ -857,7 +857,8 @@ public class SettingsBackupTest {
                 Settings.Secure.UI_TRANSLATION_ENABLED,
                 Settings.Secure.UI_TRANSLATION_ENABLED,
                 Settings.Secure.CREDENTIAL_SERVICE,
                 Settings.Secure.CREDENTIAL_SERVICE,
                 Settings.Secure.CREDENTIAL_SERVICE_PRIMARY,
                 Settings.Secure.CREDENTIAL_SERVICE_PRIMARY,
                 Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_EDGE_HAPTIC_ENABLED);
                 Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_EDGE_HAPTIC_ENABLED,
                 Settings.Secure.DND_CONFIGS_MIGRATED);


    @Test
    @Test
    public void systemSettingsBackedUpOrDenied() {
    public void systemSettingsBackedUpOrDenied() {
Loading