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

Commit 214beace authored by helen cheuk's avatar helen cheuk
Browse files

[Action Corner Setting] Add action corner constants to Settings

Add action corner constants to Settings file so it could be used by
Setting page and SysUI.

Bug: 412558312
Flag: com.android.settings.flags.action_corner_customization
Test: SettingsBackupTest
Change-Id: If61cd9b02dc9ea3f530f455fb83cd4df2e91d120
parent 21caf040
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
@@ -13257,6 +13257,60 @@ public final class Settings {
        public static final String DEVICE_STATE_ROTATION_LOCK =
                "device_state_rotation_lock";
        /** @hide */
        public static final int ACTION_CORNER_ACTION_NONE = 0;
        /** @hide */
        public static final int ACTION_CORNER_ACTION_HOME = 1;
        /** @hide */
        public static final int ACTION_CORNER_ACTION_OVERVIEW = 2;
        /** @hide */
        public static final int ACTION_CORNER_ACTION_NOTIFICATIONS = 3;
        /** @hide */
        public static final int ACTION_CORNER_ACTION_QUICK_SETTINGS = 4;
        /**
         * The different actions that can be used for action corners
         * @hide
         */
        @IntDef(prefix = {"ACTION_CORNER_ACTION_"}, value = {
                ACTION_CORNER_ACTION_NONE,
                ACTION_CORNER_ACTION_HOME,
                ACTION_CORNER_ACTION_OVERVIEW,
                ACTION_CORNER_ACTION_NOTIFICATIONS,
                ACTION_CORNER_ACTION_QUICK_SETTINGS,
        })
        @Retention(RetentionPolicy.SOURCE)
        public @interface ActionCornerActionType {
        }
        /**
         * Action Corner type configured for top left corner of display.
         * @hide
         */
        public static final String ACTION_CORNER_TOP_LEFT_ACTION =
                "action_corner_top_left_action";
        /**
         * Action Corner type configured for top right corner of display.
         * @hide
         */
        public static final String ACTION_CORNER_TOP_RIGHT_ACTION =
                "action_corner_top_right_action";
        /**
         * Action Corner type configured for bottom left corner of display.
         * @hide
         */
        public static final String ACTION_CORNER_BOTTOM_LEFT_ACTION =
                "action_corner_bottom_left_action";
        /**
         * Action Corner type configured for bottom right corner of display.
         * @hide
         */
        public static final String ACTION_CORNER_BOTTOM_RIGHT_ACTION =
                "action_corner_bottom_right_action";
        /**
         * Control whether communal mode is allowed on this device.
         *
+4 −0
Original line number Diff line number Diff line
@@ -246,6 +246,10 @@ public class SecureSettings {
        Settings.Secure.ACCESSIBILITY_MOUSE_KEYS_MAX_SPEED,
        Settings.Secure.ACCESSIBILITY_PINCH_TO_ZOOM_ANYWHERE_ENABLED,
        Settings.Secure.ACCESSIBILITY_SINGLE_FINGER_PANNING_ENABLED,
        Settings.Secure.ACTION_CORNER_TOP_LEFT_ACTION,
        Settings.Secure.ACTION_CORNER_TOP_RIGHT_ACTION,
        Settings.Secure.ACTION_CORNER_BOTTOM_LEFT_ACTION,
        Settings.Secure.ACTION_CORNER_BOTTOM_RIGHT_ACTION,
        Settings.Secure.ODI_CAPTIONS_VOLUME_UI_ENABLED,
        Settings.Secure.NOTIFICATION_BUBBLES,
        Settings.Secure.LOCATION_TIME_ZONE_DETECTION_ENABLED,
+4 −0
Original line number Diff line number Diff line
@@ -355,6 +355,10 @@ public class SecureSettingsValidators {
                Secure.ACCESSIBILITY_KEY_GESTURE_TARGETS,
                ACCESSIBILITY_SHORTCUT_TARGET_LIST_VALIDATOR);
        VALIDATORS.put(Secure.ACCESSIBILITY_FORCE_INVERT_COLOR_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ACTION_CORNER_TOP_LEFT_ACTION, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.ACTION_CORNER_TOP_RIGHT_ACTION, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.ACTION_CORNER_BOTTOM_LEFT_ACTION, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.ACTION_CORNER_BOTTOM_RIGHT_ACTION, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.ONE_HANDED_MODE_ACTIVATED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ONE_HANDED_MODE_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.ONE_HANDED_MODE_TIMEOUT, ANY_INTEGER_VALIDATOR);