lineage-sdk: Add device key action for partial screenshot [3/3]
Change-Id: Ice2dedbb4a0ebe774ef63fd280c847bc2187cd16
diff --git a/lineage/res/res/values/config.xml b/lineage/res/res/values/config.xml
index 577df6f..32d849a 100644
--- a/lineage/res/res/values/config.xml
+++ b/lineage/res/res/values/config.xml
@@ -163,11 +163,12 @@
10 - Close app
11 - Torch
12 - Screenshot
- 13 - Volume Panel
- 14 - Clear All Notifications
- 15 - Notifications
- 16 - Toggle Qs Panel
- 17 - Ringer Modes
+ 13 - Partial Screenshot
+ 14 - Volume Panel
+ 15 - Clear All Notifications
+ 16 - Notifications
+ 17 - Toggle Qs Panel
+ 18 - Ringer Modes
This needs to match the enums in
sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java.
-->
@@ -187,11 +188,12 @@
10 - Close app
11 - Torch
12 - Screenshot
- 13 - Volume Panel
- 14 - Clear All Notifications
- 15 - Notifications
- 16 - Toggle Qs Panel
- 17 - Ringer Modes
+ 13 - Partial Screenshot
+ 14 - Volume Panel
+ 15 - Clear All Notifications
+ 16 - Notifications
+ 17 - Toggle Qs Panel
+ 18 - Ringer Modes
This needs to match the enums in
sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java.
-->
@@ -211,11 +213,12 @@
10 - Close app
11 - Torch
12 - Screenshot
- 13 - Volume Panel
- 14 - Clear All Notifications
- 15 - Notifications
- 16 - Toggle Qs Panel
- 17 - Ringer Modes
+ 13 - Partial Screenshot
+ 14 - Volume Panel
+ 15 - Clear All Notifications
+ 16 - Notifications
+ 17 - Toggle Qs Panel
+ 18 - Ringer Modes
This needs to match the enums in
sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java.
-->
@@ -235,11 +238,12 @@
10 - Close app
11 - Torch
12 - Screenshot
- 13 - Volume Panel
- 14 - Clear All Notifications
- 15 - Notifications
- 16 - Toggle Qs Panel
- 17 - Ringer Modes
+ 13 - Partial Screenshot
+ 14 - Volume Panel
+ 15 - Clear All Notifications
+ 16 - Notifications
+ 17 - Toggle Qs Panel
+ 18 - Ringer Modes
This needs to match the enums in
sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java.
-->
@@ -259,11 +263,12 @@
10 - Close app
11 - Torch
12 - Screenshot
- 13 - Volume Panel
- 14 - Clear All Notifications
- 15 - Notifications
- 16 - Toggle Qs Panel
- 17 - Ringer Modes
+ 13 - Partial Screenshot
+ 14 - Volume Panel
+ 15 - Clear All Notifications
+ 16 - Notifications
+ 17 - Toggle Qs Panel
+ 18 - Ringer Modes
This needs to match the enums in
sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java.
-->
diff --git a/sdk/src/java/lineageos/providers/LineageSettings.java b/sdk/src/java/lineageos/providers/LineageSettings.java
index 774d48b..3f51970 100644
--- a/sdk/src/java/lineageos/providers/LineageSettings.java
+++ b/sdk/src/java/lineageos/providers/LineageSettings.java
@@ -1050,19 +1050,20 @@
* 10 - Close app
* 11 - Torch
* 12 - Screenshot
- * 13 - Volume Panel
- * 14 - Clear All Notifications
- * 15 - Notifications
- * 16 - Toggle Qs Panel
- * 17 - Ringer Modes
- * 18 - Single hand (left)
- * 19 - Single hand (right)
+ * 13 - Partial Screenshot
+ * 14 - Volume Panel
+ * 15 - Clear All Notifications
+ * 16 - Notifications
+ * 17 - Toggle Qs Panel
+ * 18 - Ringer Modes
+ * 19 - Single hand (left)
+ * 20 - Single hand (right)
*/
public static final String KEY_HOME_LONG_PRESS_ACTION = "key_home_long_press_action";
/** @hide */
public static final Validator KEY_HOME_LONG_PRESS_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Action to perform when the home key is double-tapped.
@@ -1073,7 +1074,7 @@
/** @hide */
public static final Validator KEY_HOME_DOUBLE_TAP_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Action to perform when the home key is long-pressed.
@@ -1084,7 +1085,7 @@
/** @hide */
public static final Validator KEY_BACK_LONG_PRESS_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Whether to wake the screen with the back key, the value is boolean.
@@ -1133,7 +1134,7 @@
/** @hide */
public static final Validator KEY_MENU_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Action to perform when the menu key is long-pressed.
@@ -1144,7 +1145,7 @@
/** @hide */
public static final Validator KEY_MENU_LONG_PRESS_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Action to perform when the assistant (search) key is pressed. (Default is 3)
@@ -1154,7 +1155,7 @@
/** @hide */
public static final Validator KEY_ASSIST_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Action to perform when the assistant (search) key is long-pressed. (Default is 4)
@@ -1164,7 +1165,7 @@
/** @hide */
public static final Validator KEY_ASSIST_LONG_PRESS_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Action to perform when the app switch key is pressed. (Default is 2)
@@ -1174,7 +1175,7 @@
/** @hide */
public static final Validator KEY_APP_SWITCH_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Action to perform when the app switch key is long-pressed. (Default is 0)
@@ -1184,7 +1185,7 @@
/** @hide */
public static final Validator KEY_APP_SWITCH_LONG_PRESS_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Action to perform when the screen edge is long-swiped. (Default is 0)
@@ -1194,7 +1195,7 @@
/** @hide */
public static final Validator KEY_EDGE_LONG_SWIPE_ACTION_VALIDATOR =
- new InclusiveIntegerRangeValidator(0, 17);
+ new InclusiveIntegerRangeValidator(0, 18);
/**
* Whether to wake the screen with the home key, the value is boolean.
diff --git a/sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java b/sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java
index e234d5d..744422b 100644
--- a/sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java
+++ b/sdk/src/java/org/lineageos/internal/util/DeviceKeysConstants.java
@@ -39,6 +39,7 @@
CLOSE_APP,
TORCH,
SCREENSHOT,
+ SCREENSHOT_PARTIAL,
VOLUME_PANEL,
CLEAR_ALL_NOTIFICATIONS,
NOTIFICATIONS,