[2/2] OmniGears: enhance hw button actions
-go to sleep
-omniswitch recents
Change-Id: Ida3202b4e137df7d17e1a20ab22e8b92a726d50d
diff --git a/res/values/custom_arrays.xml b/res/values/custom_arrays.xml
index f4f7c88..f645974 100644
--- a/res/values/custom_arrays.xml
+++ b/res/values/custom_arrays.xml
@@ -29,6 +29,8 @@
<item>@string/keys_action_in_app_search</item>
<item>@string/keys_action_last_app</item>
<item>@string/keys_action_kill_app</item>
+ <item>@string/keys_action_sleep</item>
+ <item>@string/keys_action_omniswitch</item>
</string-array>
<string-array name="keys_action_values" translatable="false">
@@ -42,5 +44,7 @@
<item>5</item>
<item>8</item>
<item>9</item>
+ <item>10</item>
+ <item>11</item>
</string-array>
</resources>
diff --git a/res/values/custom_strings.xml b/res/values/custom_strings.xml
index 071b994..a4cde6c 100644
--- a/res/values/custom_strings.xml
+++ b/res/values/custom_strings.xml
@@ -56,4 +56,6 @@
<string name="button_volume_keys_title">Volume</string>
<string name="button_volume_wake_title">Button wake</string>
<string name="button_volume_wake_summary">Pressing a volume button will wake the device</string>
+ <string name="keys_action_sleep">Go to sleep</string>
+ <string name="keys_action_omniswitch">OmniSwitch recents</string>
</resources>
diff --git a/src/org/omnirom/omnigears/ButtonSettings.java b/src/org/omnirom/omnigears/ButtonSettings.java
index 065afa5..d00fb55 100644
--- a/src/org/omnirom/omnigears/ButtonSettings.java
+++ b/src/org/omnirom/omnigears/ButtonSettings.java
@@ -111,7 +111,8 @@
private static final int ACTION_BACK = 7;
private static final int ACTION_LAST_APP = 8;
private static final int ACTION_KILL_APP = 9;
-// private static final int ACTION_SLEEP = 10;
+ private static final int ACTION_SLEEP = 10;
+ private static final int ACTION_OMNISWITCH = 11;
// Masks for checking presence of hardware keys.
// Must match values in frameworks/base/core/res/res/values/config.xml