From aa33027c92bc5cd178e4ca89adc841168bf67442 Mon Sep 17 00:00:00 2001 From: Angela Wang Date: Sat, 25 Mar 2023 10:27:17 +0000 Subject: [PATCH] Handles Flash Notifications intro if there's no valid camera If there is no valid camera found on the device, the camera flash option will be hidden by default. It seems weired if the intro still mentions the camera light will flash while there's no camera flash option at all. Updates the intro string without mentioning camera light if there's no valid camera found. Bug: 274565006 Test: check the string on device without valid camera manually Change-Id: I93b1fe372fe9f9e2634e56b19b30898847d68c9c --- res/values/strings.xml | 2 + res/xml/flash_notifications_settings.xml | 4 +- ...otificationsIntroPreferenceController.java | 51 +++++++++++++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 src/com/android/settings/accessibility/FlashNotificationsIntroPreferenceController.java diff --git a/res/values/strings.xml b/res/values/strings.xml index 44f65034c70..1f1ecc820d3 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -11970,6 +11970,8 @@ On / Camera and screen flash Flash the camera light or the screen when you receive notifications or when alarms sound + + Flash the screen when you receive notifications or when alarms sound Use flash notifications with caution if you\u0027re light sensitive diff --git a/res/xml/flash_notifications_settings.xml b/res/xml/flash_notifications_settings.xml index 0017fa605f5..243fffc02a8 100644 --- a/res/xml/flash_notifications_settings.xml +++ b/res/xml/flash_notifications_settings.xml @@ -21,12 +21,12 @@ + settings:controller="com.android.settings.accessibility.FlashNotificationsIntroPreferenceController" /> + settings:lottie_rawRes="@drawable/flash_notifications_illustration" />