Loading core/java/android/util/FeatureFlagUtils.java +3 −3 Original line number Diff line number Diff line Loading @@ -164,10 +164,10 @@ public class FeatureFlagUtils { */ public static final String SETTINGS_AUDIO_ROUTING = "settings_audio_routing"; /** Flag to enable/disable flash alerts /** Flag to enable/disable flash notifications * @hide */ public static final String SETTINGS_FLASH_ALERTS = "settings_flash_alerts"; public static final String SETTINGS_FLASH_NOTIFICATIONS = "settings_flash_notifications"; /** * Flag to disable/enable showing udfps enroll view in settings. If it's disabled, udfps enroll Loading Loading @@ -232,7 +232,7 @@ public class FeatureFlagUtils { DEFAULT_FLAGS.put(SETTINGS_ACCESSIBILITY_HEARING_AID_PAGE, "false"); DEFAULT_FLAGS.put(SETTINGS_PREFER_ACCESSIBILITY_MENU_IN_SYSTEM, "false"); DEFAULT_FLAGS.put(SETTINGS_AUDIO_ROUTING, "false"); DEFAULT_FLAGS.put(SETTINGS_FLASH_ALERTS, "false"); DEFAULT_FLAGS.put(SETTINGS_FLASH_NOTIFICATIONS, "true"); DEFAULT_FLAGS.put(SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS, "true"); DEFAULT_FLAGS.put(SETTINGS_ENABLE_LOCKSCREEN_TRANSFER_API, "false"); DEFAULT_FLAGS.put(SETTINGS_REMOTE_DEVICE_CREDENTIAL_VALIDATION, "false"); Loading services/accessibility/java/com/android/server/accessibility/FlashNotificationsController.java +5 −2 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import android.os.RemoteException; import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; import android.util.FeatureFlagUtils; import android.util.Log; import android.view.Display; import android.view.View; Loading Loading @@ -342,10 +343,12 @@ class FlashNotificationsController { private void requestStartFlashNotification(FlashNotification flashNotification) { if (DEBUG) Log.d(LOG_TAG, "requestStartFlashNotification"); mIsCameraFlashNotificationEnabled = Settings.System.getIntForUser( boolean isFeatureOn = FeatureFlagUtils.isEnabled(mContext, FeatureFlagUtils.SETTINGS_FLASH_NOTIFICATIONS); mIsCameraFlashNotificationEnabled = isFeatureOn && Settings.System.getIntForUser( mContext.getContentResolver(), SETTING_KEY_CAMERA_FLASH_NOTIFICATION, 0, UserHandle.USER_CURRENT) != 0; mIsScreenFlashNotificationEnabled = Settings.System.getIntForUser( mIsScreenFlashNotificationEnabled = isFeatureOn && Settings.System.getIntForUser( mContext.getContentResolver(), SETTING_KEY_SCREEN_FLASH_NOTIFICATION, 0, UserHandle.USER_CURRENT) != 0; Loading Loading
core/java/android/util/FeatureFlagUtils.java +3 −3 Original line number Diff line number Diff line Loading @@ -164,10 +164,10 @@ public class FeatureFlagUtils { */ public static final String SETTINGS_AUDIO_ROUTING = "settings_audio_routing"; /** Flag to enable/disable flash alerts /** Flag to enable/disable flash notifications * @hide */ public static final String SETTINGS_FLASH_ALERTS = "settings_flash_alerts"; public static final String SETTINGS_FLASH_NOTIFICATIONS = "settings_flash_notifications"; /** * Flag to disable/enable showing udfps enroll view in settings. If it's disabled, udfps enroll Loading Loading @@ -232,7 +232,7 @@ public class FeatureFlagUtils { DEFAULT_FLAGS.put(SETTINGS_ACCESSIBILITY_HEARING_AID_PAGE, "false"); DEFAULT_FLAGS.put(SETTINGS_PREFER_ACCESSIBILITY_MENU_IN_SYSTEM, "false"); DEFAULT_FLAGS.put(SETTINGS_AUDIO_ROUTING, "false"); DEFAULT_FLAGS.put(SETTINGS_FLASH_ALERTS, "false"); DEFAULT_FLAGS.put(SETTINGS_FLASH_NOTIFICATIONS, "true"); DEFAULT_FLAGS.put(SETTINGS_SHOW_UDFPS_ENROLL_IN_SETTINGS, "true"); DEFAULT_FLAGS.put(SETTINGS_ENABLE_LOCKSCREEN_TRANSFER_API, "false"); DEFAULT_FLAGS.put(SETTINGS_REMOTE_DEVICE_CREDENTIAL_VALIDATION, "false"); Loading
services/accessibility/java/com/android/server/accessibility/FlashNotificationsController.java +5 −2 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import android.os.RemoteException; import android.os.SystemClock; import android.os.UserHandle; import android.provider.Settings; import android.util.FeatureFlagUtils; import android.util.Log; import android.view.Display; import android.view.View; Loading Loading @@ -342,10 +343,12 @@ class FlashNotificationsController { private void requestStartFlashNotification(FlashNotification flashNotification) { if (DEBUG) Log.d(LOG_TAG, "requestStartFlashNotification"); mIsCameraFlashNotificationEnabled = Settings.System.getIntForUser( boolean isFeatureOn = FeatureFlagUtils.isEnabled(mContext, FeatureFlagUtils.SETTINGS_FLASH_NOTIFICATIONS); mIsCameraFlashNotificationEnabled = isFeatureOn && Settings.System.getIntForUser( mContext.getContentResolver(), SETTING_KEY_CAMERA_FLASH_NOTIFICATION, 0, UserHandle.USER_CURRENT) != 0; mIsScreenFlashNotificationEnabled = Settings.System.getIntForUser( mIsScreenFlashNotificationEnabled = isFeatureOn && Settings.System.getIntForUser( mContext.getContentResolver(), SETTING_KEY_SCREEN_FLASH_NOTIFICATION, 0, UserHandle.USER_CURRENT) != 0; Loading