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

Commit b19ad29b authored by Oli Thompson's avatar Oli Thompson Committed by Android (Google) Code Review
Browse files

Merge "Backup connected apps" into main

parents b5b9d9c5 607918e9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -327,6 +327,13 @@ flag {
    }
}

flag {
    name: "backup_connected_apps_settings"
    namespace: "enterprise"
    description: "backup and restore connected work and personal apps user settings across devices"
    bug: "175067666"
}

flag {
    name: "headless_single_user_compatibility_fix"
    namespace: "enterprise"
+22 −0
Original line number Diff line number Diff line
@@ -17032,6 +17032,28 @@ public final class Settings {
         */
        public static final String ENABLE_BACK_ANIMATION = "enable_back_animation";
        /**
         * An allow list of packages for which the user has granted the permission to communicate
         * across profiles.
         *
         * @hide
         */
        @Readable
        @FlaggedApi(android.app.admin.flags.Flags.FLAG_BACKUP_CONNECTED_APPS_SETTINGS)
        public static final String CONNECTED_APPS_ALLOWED_PACKAGES =
                "connected_apps_allowed_packages";
        /**
         * A block list of packages for which the user has denied the permission to communicate
         * across profiles.
         *
         * @hide
         */
        @Readable
        @FlaggedApi(android.app.admin.flags.Flags.FLAG_BACKUP_CONNECTED_APPS_SETTINGS)
        public static final String CONNECTED_APPS_DISALLOWED_PACKAGES =
                "connected_apps_disallowed_packages";
        /** @hide */ public static String zenModeToString(int mode) {
            if (mode == ZEN_MODE_IMPORTANT_INTERRUPTIONS) return "ZEN_MODE_IMPORTANT_INTERRUPTIONS";
            if (mode == ZEN_MODE_ALARMS) return "ZEN_MODE_ALARMS";
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ public class GlobalSettings {
     * NOTE: All settings which are backed up should have a corresponding validator.
     */
    public static final String[] SETTINGS_TO_BACKUP = {
        Settings.Global.CONNECTED_APPS_ALLOWED_PACKAGES,
        Settings.Global.CONNECTED_APPS_DISALLOWED_PACKAGES,
        Settings.Global.APPLY_RAMPING_RINGER,
        Settings.Global.BUGREPORT_IN_POWER_MENU,                        // moved to secure
        Settings.Global.STAY_ON_WHILE_PLUGGED_IN,
+3 −0
Original line number Diff line number Diff line
@@ -51,6 +51,9 @@ public class GlobalSettingsValidators {
    public static final Map<String, Validator> VALIDATORS = new ArrayMap<>();

    static {
        VALIDATORS.put(Global.CONNECTED_APPS_ALLOWED_PACKAGES, new PackageNameListValidator((",")));
        VALIDATORS.put(Global.CONNECTED_APPS_DISALLOWED_PACKAGES,
                new PackageNameListValidator((",")));
        VALIDATORS.put(Global.APPLY_RAMPING_RINGER, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.BUGREPORT_IN_POWER_MENU, BOOLEAN_VALIDATOR);
        VALIDATORS.put(