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
This commit is contained in:
7
res/drawable/ic_flashlight.xml
Normal file
7
res/drawable/ic_flashlight.xml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="24dp"
|
||||||
|
android:width="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M9,10L6,5H18L15,10H9M18,4H6V2H18V4M9,22V11H15V22H9M12,13A1,1 0 0,0 11,14A1,1 0 0,0 12,15A1,1 0 0,0 13,14A1,1 0 0,0 12,13Z" />
|
||||||
|
</vector>
|
||||||
@@ -652,4 +652,19 @@
|
|||||||
<item>#FF00FF00</item>
|
<item>#FF00FF00</item>
|
||||||
<item>#FFFF0000</item>
|
<item>#FFFF0000</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Blink flashlight for incoming calls -->
|
||||||
|
<string-array name="flashlight_on_call_entries">
|
||||||
|
<item>@string/flashlight_on_call_disabled</item>
|
||||||
|
<item>@string/flashlight_on_call_ringer</item>
|
||||||
|
<item>@string/flashlight_on_call_silent</item>
|
||||||
|
<item>@string/flashlight_on_call_always</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="flashlight_on_call_values">
|
||||||
|
<item>0</item>
|
||||||
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>3</item>
|
||||||
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -735,4 +735,10 @@
|
|||||||
<string name="center_notification_headers_title">Center notification headers</string>
|
<string name="center_notification_headers_title">Center notification headers</string>
|
||||||
<string name="center_notification_headers_summary">Whether to Center R style notification headers (Requires a SystemUI restart)</string>
|
<string name="center_notification_headers_summary">Whether to Center R style notification headers (Requires a SystemUI restart)</string>
|
||||||
|
|
||||||
|
<!-- Blink flashlight for incoming calls -->
|
||||||
|
<string name="flashlight_on_call_title">Blink Flashlight for call</string>
|
||||||
|
<string name="flashlight_on_call_disabled">Disabled</string>
|
||||||
|
<string name="flashlight_on_call_ringer">Only in ringer mode</string>
|
||||||
|
<string name="flashlight_on_call_silent">Only when ringer is silent</string>
|
||||||
|
<string name="flashlight_on_call_always">Always</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -32,6 +32,13 @@
|
|||||||
android:dependency="notification_headers"
|
android:dependency="notification_headers"
|
||||||
android:defaultValue="true" />
|
android:defaultValue="true" />
|
||||||
|
|
||||||
|
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||||
|
android:key="force_expanded_notifications"
|
||||||
|
android:icon="@drawable/ic_notification"
|
||||||
|
android:title="@string/force_expanded_notifications_title"
|
||||||
|
android:summary="@string/force_expanded_notifications_summary"
|
||||||
|
android:defaultValue="false" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="charging_light"
|
android:key="charging_light"
|
||||||
android:icon="@drawable/ic_battery_almostfull"
|
android:icon="@drawable/ic_battery_almostfull"
|
||||||
@@ -58,11 +65,12 @@
|
|||||||
android:defaultValue="false" />
|
android:defaultValue="false" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||||
|
android:key="flashlight_on_call"
|
||||||
|
android:icon="@drawable/ic_flashlight"
|
||||||
|
android:title="@string/flashlight_on_call_title"
|
||||||
|
android:entries="@array/flashlight_on_call_entries"
|
||||||
|
android:entryValues="@array/flashlight_on_call_values"
|
||||||
|
android:defaultValue="0" />
|
||||||
|
|
||||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
|
||||||
android:key="force_expanded_notifications"
|
|
||||||
android:icon="@drawable/ic_notification"
|
|
||||||
android:title="@string/force_expanded_notifications_title"
|
|
||||||
android:summary="@string/force_expanded_notifications_summary"
|
|
||||||
android:defaultValue="false" />
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|||||||
Reference in New Issue
Block a user