Add KEYCODE_PAIRING.

Used for initiating a peripheral pairing mode.

Change-Id: I8e172bdda1f3c34eff36f3001c174f7a6b6e6e41
This commit is contained in:
Tim Kilbourn
2014-04-14 15:37:51 -07:00
parent b8b99c0fc0
commit 87cd0dc425
4 changed files with 20 additions and 2 deletions

View File

@@ -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
/**

View File

@@ -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()