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

Commit cc72a143 authored by Angela Wang's avatar Angela Wang Committed by Automerger Merge Worker
Browse files

Merge "Adds system settings related to flash notifications in settings...

Merge "Adds system settings related to flash notifications in settings provider" into udc-dev am: 2c86b407

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21517335



Change-Id: Ie2736f539bb964ef624ec9bfb447eaf70c4c9f74
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a800649a 2c86b407
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
@@ -5677,6 +5677,36 @@ public final class Settings {
         */
        public static final String LOCALE_PREFERENCES = "locale_preferences";
        /**
         * Setting to enable camera flash notification feature.
         * <ul>
         *     <li> 0 = Off
         *     <li> 1 = On
         * </ul>
         * @hide
         */
        public static final String CAMERA_FLASH_NOTIFICATION = "camera_flash_notification";
        /**
         * Setting to enable screen flash notification feature.
         * <ul>
         *     <li> 0 = Off
         *     <li> 1 = On
         * </ul>
         *  @hide
         */
        public static final String SCREEN_FLASH_NOTIFICATION = "screen_flash_notification";
        /**
         * Integer property that specifes the color for screen flash notification as a
         * packed 32-bit color.
         *
         * @see android.graphics.Color#argb
         * @hide
         */
        public static final String SCREEN_FLASH_NOTIFICATION_COLOR =
                "screen_flash_notification_color_global";
        /**
         * IMPORTANT: If you add a new public settings you also have to add it to
         * PUBLIC_SETTINGS below. If the new setting is hidden you have to add
@@ -5810,6 +5840,9 @@ public final class Settings {
            PRIVATE_SETTINGS.add(TOUCHPAD_NATURAL_SCROLLING);
            PRIVATE_SETTINGS.add(TOUCHPAD_TAP_TO_CLICK);
            PRIVATE_SETTINGS.add(TOUCHPAD_RIGHT_CLICK_ZONE);
            PRIVATE_SETTINGS.add(CAMERA_FLASH_NOTIFICATION);
            PRIVATE_SETTINGS.add(SCREEN_FLASH_NOTIFICATION);
            PRIVATE_SETTINGS.add(SCREEN_FLASH_NOTIFICATION_COLOR);
        }
        /**
+3 −0
Original line number Diff line number Diff line
@@ -115,6 +115,9 @@ message SystemSettingsProto {
        optional SettingProto sound_cache = 2;
        optional SettingProto light_pulse = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto vibration_intensity = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto camera_flash_notification = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto screen_flash_notification = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto screen_flash_notification_color_global = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional Notification notification = 17;

+3 −0
Original line number Diff line number Diff line
@@ -97,5 +97,8 @@ public class SystemSettings {
        Settings.System.TOUCHPAD_NATURAL_SCROLLING,
        Settings.System.TOUCHPAD_TAP_TO_CLICK,
        Settings.System.TOUCHPAD_RIGHT_CLICK_ZONE,
        Settings.System.CAMERA_FLASH_NOTIFICATION,
        Settings.System.SCREEN_FLASH_NOTIFICATION,
        Settings.System.SCREEN_FLASH_NOTIFICATION_COLOR,
    };
}
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.provider.settings.validators;

import static android.provider.settings.validators.SettingsValidators.ANY_INTEGER_VALIDATOR;
import static android.provider.settings.validators.SettingsValidators.ANY_STRING_VALIDATOR;
import static android.provider.settings.validators.SettingsValidators.BOOLEAN_VALIDATOR;
import static android.provider.settings.validators.SettingsValidators.COMPONENT_NAME_VALIDATOR;
@@ -215,5 +216,8 @@ public class SystemSettingsValidators {
        VALIDATORS.put(System.UNREAD_NOTIFICATION_DOT_INDICATOR, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.AUTO_LAUNCH_MEDIA_CONTROLS, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.LOCALE_PREFERENCES, ANY_STRING_VALIDATOR);
        VALIDATORS.put(System.CAMERA_FLASH_NOTIFICATION, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.SCREEN_FLASH_NOTIFICATION, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.SCREEN_FLASH_NOTIFICATION_COLOR, ANY_INTEGER_VALIDATOR);
    }
}
+9 −0
Original line number Diff line number Diff line
@@ -2835,6 +2835,15 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.System.NOTIFICATION_VIBRATION_INTENSITY,
                SystemSettingsProto.Notification.VIBRATION_INTENSITY);
        dumpSetting(s, p,
                Settings.System.CAMERA_FLASH_NOTIFICATION,
                SystemSettingsProto.Notification.CAMERA_FLASH_NOTIFICATION);
        dumpSetting(s, p,
                Settings.System.SCREEN_FLASH_NOTIFICATION,
                SystemSettingsProto.Notification.SCREEN_FLASH_NOTIFICATION);
        dumpSetting(s, p,
                Settings.System.SCREEN_FLASH_NOTIFICATION_COLOR,
                SystemSettingsProto.Notification.SCREEN_FLASH_NOTIFICATION_COLOR_GLOBAL);
        // Settings.System.NOTIFICATIONS_USE_RING_VOLUME intentionally excluded since it's deprecated.
        p.end(notificationToken);