From f1c6cf2a6ad866e9d87d27ebd6d7b59c5e42994b Mon Sep 17 00:00:00 2001 From: PMS22 Date: Tue, 19 Jun 2018 20:49:26 +0200 Subject: [PATCH] Cherish: Add Flashlight blink on incoming calls [3/3] - Thanks to @Shripal17 for suggesting list preference instead of a toggle - Add a device specific flashlight check @idoybh (DerpFest) edits: The current check is for isRingerAudiable and not for DND - change var names and strings so it'll not mislead any future developer or any user --- res/drawable/ic_flashlight.xml | 7 +++++++ res/values/cherish_arrays.xml | 15 +++++++++++++++ res/values/cherish_strings.xml | 6 ++++++ res/xml/cherish_settings_notifications.xml | 20 ++++++++++++++------ 4 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 res/drawable/ic_flashlight.xml diff --git a/res/drawable/ic_flashlight.xml b/res/drawable/ic_flashlight.xml new file mode 100644 index 0000000..fbd4187 --- /dev/null +++ b/res/drawable/ic_flashlight.xml @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/res/values/cherish_arrays.xml b/res/values/cherish_arrays.xml index 8927959..33ac1af 100644 --- a/res/values/cherish_arrays.xml +++ b/res/values/cherish_arrays.xml @@ -652,4 +652,19 @@ #FF00FF00 #FFFF0000 + + + + @string/flashlight_on_call_disabled + @string/flashlight_on_call_ringer + @string/flashlight_on_call_silent + @string/flashlight_on_call_always + + + + 0 + 1 + 2 + 3 + diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml index e04e43e..e6500d3 100644 --- a/res/values/cherish_strings.xml +++ b/res/values/cherish_strings.xml @@ -735,4 +735,10 @@ Center notification headers Whether to Center R style notification headers (Requires a SystemUI restart) + + Blink Flashlight for call + Disabled + Only in ringer mode + Only when ringer is silent + Always diff --git a/res/xml/cherish_settings_notifications.xml b/res/xml/cherish_settings_notifications.xml index 21e2fd2..91af03d 100644 --- a/res/xml/cherish_settings_notifications.xml +++ b/res/xml/cherish_settings_notifications.xml @@ -32,6 +32,13 @@ android:dependency="notification_headers" android:defaultValue="true" /> + + + -