CMActions: add support for fingerprint gesture

This commit is contained in:
Vachounet
2017-04-19 17:22:48 +02:00
parent dfb5266f24
commit 39da28e21d
6 changed files with 136 additions and 47 deletions

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 Erfan Abdi
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<string-array name="fp_keys_listArray">
<item>None</item>
<item>Home</item>
<item>Power</item>
<item>Back</item>
<item>Recents</item>
<item>Volume Up</item>
<item>Volume Down</item>
</string-array>
<string-array name="fp_keys_listValues">
<item>0</item>
<item>102</item>
<item>116</item>
<item>158</item>
<item>580</item>
<item>115</item>
<item>114</item>
</string-array>
</resources>

View File

@@ -58,11 +58,50 @@
android:key="fp_key"
android:title="@string/fingerprint_title" >
<SwitchPreference
android:key="fp_home"
android:title="@string/fingerprint_as_home_title"
android:summary="@string/fingerprint_as_home_summary" />
android:title="Fingerprint Gestures"
android:summary="Use fingerprint gestures" />
<ListPreference
android:dependency="fp_home"
android:title="Fingerprint Tap"
android:summary="Select action for single tap"
android:dialogTitle="Select action for single tap"
android:key="fp_keys"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:entryValues="@array/fp_keys_listValues" />
<ListPreference
android:dependency="fp_home"
android:title="Fingerprint Long Press"
android:summary="Select action for long press"
android:dialogTitle="Select action for long press"
android:key="fp_key_hold"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:entryValues="@array/fp_keys_listValues" />
<ListPreference
android:dependency="fp_home"
android:title="Fingerprint Swipe Left"
android:summary="Select action for swipe left"
android:dialogTitle="Select action for swipe left"
android:key="fp_key_left"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:entryValues="@array/fp_keys_listValues" />
<ListPreference
android:dependency="fp_home"
android:title="Fingerprint Swipe Right"
android:summary="Select action for swipe right"
android:dialogTitle="Select action for swipe right"
android:key="fp_key_right"
android:defaultValue="0"
android:entries="@array/fp_keys_listArray"
android:entryValues="@array/fp_keys_listValues" />
</PreferenceCategory>