summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorTim Kilbourn <tkilbourn@google.com>2014-04-14 15:37:51 -0700
committerTim Kilbourn <tkilbourn@google.com>2014-05-16 15:14:53 -0700
commit87cd0dc425201d56f1b07fa710d4f44fff4131bc (patch)
tree7939bba9c0267e9087f13b83fb94305c12731c5c /core
parentb8b99c0fc0c22d509c500af5eadec8f7edd75c8f (diff)
downloadframeworks_base-87cd0dc425201d56f1b07fa710d4f44fff4131bc.zip
frameworks_base-87cd0dc425201d56f1b07fa710d4f44fff4131bc.tar.gz
frameworks_base-87cd0dc425201d56f1b07fa710d4f44fff4131bc.tar.bz2
Add KEYCODE_PAIRING.
Used for initiating a peripheral pairing mode. Change-Id: I8e172bdda1f3c34eff36f3001c174f7a6b6e6e41
Diffstat (limited to 'core')
-rw-r--r--core/java/android/provider/Settings.java13
-rw-r--r--core/java/android/view/KeyEvent.java7
-rw-r--r--core/res/res/values/attrs.xml1
3 files changed, 19 insertions, 2 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index d063168..cd28085 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -773,13 +773,24 @@ public final class Settings {
* Activity Action: Show Device Name Settings.
* <p>
* In some cases, a matching Activity may not exist, so ensure you safeguard
- * against ithis.
+ * against this.
*
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String DEVICE_NAME_SETTINGS = "android.settings.DEVICE_NAME";
+ /**
+ * Activity Action: Show pairing settings.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you safeguard
+ * against this.
+ *
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_PAIRING_SETTINGS = "android.settings.PAIRING_SETTINGS";
+
// End of Intent actions for Settings
/**
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 852fce5..b8e1b89 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -639,8 +639,13 @@ public class KeyEvent extends InputEvent implements Parcelable {
* Wakes up the device. Behaves somewhat like {@link #KEYCODE_POWER} but it
* has no effect if the device is already awake. */
public static final int KEYCODE_WAKEUP = 224;
+ /** Key code constant: Pairing key.
+ * Initiates peripheral pairing mode. Useful for pairing remote control
+ * devices or game controllers, especially if no other input mode is
+ * available. */
+ public static final int KEYCODE_PAIRING = 225;
- private static final int LAST_KEYCODE = KEYCODE_WAKEUP;
+ private static final int LAST_KEYCODE = KEYCODE_PAIRING;
// NOTE: If you add a new keycode here you must also add it to:
// isSystem()
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 1d35c84..29a0e3d 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1672,6 +1672,7 @@
<enum name="KEYCODE_MEDIA_AUDIO_TRACK" value="222" />
<enum name="KEYCODE_MEDIA_SLEEP" value="223" />
<enum name="KEYCODE_MEDIA_WAKEUP" value="224" />
+ <enum name="KEYCODE_PAIRING" value="225" />
</attr>
<!-- ***************************************************************** -->