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

Commit 986e8b53 authored by ktanojo's avatar ktanojo Committed by Kiara Patricia
Browse files

Add Settings key and value for phone switching request source

Bug: 355736198
Test: manual build
Flag: EXEMPT changes that use this key will be flag guarded from SetupWizard

Change-Id: I043758dcec9b933bc19372fab52a6f3e60feaea8
parent 0e03926c
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -20171,6 +20171,36 @@ public final class Settings {
             */
            public static final int PHONE_SWITCHING_STATUS_IN_PROGRESS_MIGRATION_SUCCESS = 11;
            /**
             * Phone switching request source
             * @hide
             */
            public static final String PHONE_SWITCHING_REQUEST_SOURCE =
                    "phone_switching_request_source";
            /**
             * No phone switching request source
             * @hide
             */
            public static final int PHONE_SWITCHING_REQUEST_SOURCE_NONE = 0;
            /**
             * Phone switching triggered by watch
             * @hide
             */
            public static final int PHONE_SWITCHING_REQUEST_SOURCE_WATCH = 1;
            /**
             * Phone switching triggered by companion, user confirmation required
             * @hide
             */
            public static final int PHONE_SWITCHING_REQUEST_SOURCE_COMPANION_USER_CONFIRMATION = 2;
            /**
             * Phone switching triggered by companion, user confirmation not required
             * @hide
             */
            public static final int PHONE_SWITCHING_REQUEST_SOURCE_COMPANION = 3;
            /**
             * Whether the device has enabled the feature to reduce motion and animation
+5 −0
Original line number Diff line number Diff line
@@ -457,5 +457,10 @@ public class GlobalSettingsValidators {
        VALIDATORS.put(Global.ADD_USERS_WHEN_LOCKED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.REMOVE_GUEST_ON_EXIT, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.USER_SWITCHER_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.Wearable.PHONE_SWITCHING_REQUEST_SOURCE,
            new InclusiveIntegerRangeValidator(
                Global.Wearable.PHONE_SWITCHING_REQUEST_SOURCE_NONE,
                Global.Wearable.PHONE_SWITCHING_REQUEST_SOURCE_COMPANION
        ));
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -633,7 +633,8 @@ public class SettingsBackupTest {
                    Settings.Global.Wearable.WEAR_MEDIA_CONTROLS_PACKAGE,
                    Settings.Global.Wearable.WEAR_MEDIA_SESSIONS_PACKAGE,
                    Settings.Global.Wearable.WEAR_POWER_ANOMALY_SERVICE_ENABLED,
                    Settings.Global.Wearable.CONNECTIVITY_KEEP_DATA_ON);
                    Settings.Global.Wearable.CONNECTIVITY_KEEP_DATA_ON,
                    Settings.Global.Wearable.PHONE_SWITCHING_REQUEST_SOURCE);

    private static final Set<String> BACKUP_DENY_LIST_SECURE_SETTINGS =
             newHashSet(