CMActions: add voice assist action and haptic toggle
Change-Id: I9db5246a115e1650268395370e62a3d01e3032d0
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
<item>Recents</item>
|
<item>Recents</item>
|
||||||
<item>Volume Up</item>
|
<item>Volume Up</item>
|
||||||
<item>Volume Down</item>
|
<item>Volume Down</item>
|
||||||
|
<item>Voice Assistant</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="fp_keys_listValues">
|
<string-array name="fp_keys_listValues">
|
||||||
@@ -33,5 +34,6 @@
|
|||||||
<item>580</item>
|
<item>580</item>
|
||||||
<item>115</item>
|
<item>115</item>
|
||||||
<item>114</item>
|
<item>114</item>
|
||||||
|
<item>582</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -63,6 +63,12 @@
|
|||||||
android:title="Fingerprint Gestures"
|
android:title="Fingerprint Gestures"
|
||||||
android:summary="Use fingerprint gestures" />
|
android:summary="Use fingerprint gestures" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:key="fp_haptic"
|
||||||
|
android:dependency="fp_home"
|
||||||
|
android:title="Fingerprint Gestures Haptic Feedback"
|
||||||
|
android:summary="Vibrate on actions" />
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:dependency="fp_home"
|
android:dependency="fp_home"
|
||||||
android:title="Fingerprint Tap"
|
android:title="Fingerprint Tap"
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ public class Constants {
|
|||||||
// Swap nodes
|
// Swap nodes
|
||||||
public static final String FP_HOME_NODE = "/sys/homebutton/enable";
|
public static final String FP_HOME_NODE = "/sys/homebutton/enable";
|
||||||
|
|
||||||
|
// Haptic node
|
||||||
|
public static final String FP_HAPTIC_NODE = "/sys/homebutton/haptic";
|
||||||
|
public static final String FP_HAPTIC_KEY = "fp_haptic";
|
||||||
|
|
||||||
// List of keys
|
// List of keys
|
||||||
public static final String FP_KEYS = "fp_keys";
|
public static final String FP_KEYS = "fp_keys";
|
||||||
public static final String FP_KEY_HOLD = "fp_key_hold";
|
public static final String FP_KEY_HOLD = "fp_key_hold";
|
||||||
@@ -60,6 +64,7 @@ public class Constants {
|
|||||||
FP_KEY_HOLD,
|
FP_KEY_HOLD,
|
||||||
FP_KEY_RIGHT,
|
FP_KEY_RIGHT,
|
||||||
FP_KEY_LEFT,
|
FP_KEY_LEFT,
|
||||||
|
FP_HAPTIC_KEY,
|
||||||
};
|
};
|
||||||
|
|
||||||
static {
|
static {
|
||||||
@@ -68,11 +73,13 @@ public class Constants {
|
|||||||
sBooleanNodePreferenceMap.put(FP_KEY_HOLD, FP_KEY_HOLD_NODE);
|
sBooleanNodePreferenceMap.put(FP_KEY_HOLD, FP_KEY_HOLD_NODE);
|
||||||
sBooleanNodePreferenceMap.put(FP_KEY_LEFT, FP_KEY_LEFT_NODE);
|
sBooleanNodePreferenceMap.put(FP_KEY_LEFT, FP_KEY_LEFT_NODE);
|
||||||
sBooleanNodePreferenceMap.put(FP_KEY_RIGHT, FP_KEY_RIGHT_NODE);
|
sBooleanNodePreferenceMap.put(FP_KEY_RIGHT, FP_KEY_RIGHT_NODE);
|
||||||
|
sBooleanNodePreferenceMap.put(FP_HAPTIC_KEY, FP_HAPTIC_NODE);
|
||||||
sNodeDefaultMap.put(FP_HOME_KEY, false);
|
sNodeDefaultMap.put(FP_HOME_KEY, false);
|
||||||
sNodeDefaultMap.put(FP_KEYS, "0");
|
sNodeDefaultMap.put(FP_KEYS, "0");
|
||||||
sNodeDefaultMap.put(FP_KEY_HOLD, "0");
|
sNodeDefaultMap.put(FP_KEY_HOLD, "0");
|
||||||
sNodeDefaultMap.put(FP_KEY_LEFT, "0");
|
sNodeDefaultMap.put(FP_KEY_LEFT, "0");
|
||||||
sNodeDefaultMap.put(FP_KEY_RIGHT, "0");
|
sNodeDefaultMap.put(FP_KEY_RIGHT, "0");
|
||||||
|
sNodeDefaultMap.put(FP_HAPTIC_KEY, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isPreferenceEnabled(Context context, String key) {
|
public static boolean isPreferenceEnabled(Context context, String key) {
|
||||||
|
|||||||
Reference in New Issue
Block a user