diff options
author | Matthew Xie <mattx@google.com> | 2011-06-25 21:47:07 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2011-07-07 12:43:27 -0700 |
commit | a0c680393f2dd03a937c598b2cb9abf98a58152c (patch) | |
tree | d8d240310c4a4d31d9215174643a95da016bc0c0 /core/java/android/bluetooth/BluetoothDevice.java | |
parent | b75a798471342da5e4624048c5516773dfecf4ca (diff) | |
download | frameworks_base-a0c680393f2dd03a937c598b2cb9abf98a58152c.zip frameworks_base-a0c680393f2dd03a937c598b2cb9abf98a58152c.tar.gz frameworks_base-a0c680393f2dd03a937c598b2cb9abf98a58152c.tar.bz2 |
Incoming Bluetooth Connection requests - dialog.
This sends the intents to the Settings app to show
the dialogs for the incoming connection requests.
Includes down merged contributions from Jaikumar Ganesh.
Change-Id: Ic8b857aad3554315aae39a0e871eb94d0ac98a91
Diffstat (limited to 'core/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r-- | core/java/android/bluetooth/BluetoothDevice.java | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java index 254e2f8..d9525a3 100644 --- a/core/java/android/bluetooth/BluetoothDevice.java +++ b/core/java/android/bluetooth/BluetoothDevice.java @@ -276,6 +276,70 @@ public final class BluetoothDevice implements Parcelable { public static final String ACTION_PAIRING_CANCEL = "android.bluetooth.device.action.PAIRING_CANCEL"; + /** @hide */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_CONNECTION_ACCESS_REQUEST = + "android.bluetooth.device.action.CONNECTION_ACCESS_REQUEST"; + + /** @hide */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_CONNECTION_ACCESS_REPLY = + "android.bluetooth.device.action.CONNECTION_ACCESS_REPLY"; + + /** @hide */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_CONNECTION_ACCESS_CANCEL = + "android.bluetooth.device.action.CONNECTION_ACCESS_CANCEL"; + + /** + * Used as an extra field in {@link #ACTION_CONNECTION_ACCESS_REQUEST} intent. + * @hide + */ + public static final String EXTRA_ACCESS_REQUEST_TYPE = + "android.bluetooth.device.extra.ACCESS_REQUEST_TYPE"; + + /**@hide*/ + public static final int REQUEST_TYPE_PROFILE_CONNECTION = 1; + + /**@hide*/ + public static final int REQUEST_TYPE_PHONEBOOK_ACCESS = 2; + + /** + * Used as an extra field in {@link #ACTION_CONNECTION_ACCESS_REQUEST} intents, + * Contains package name to return reply intent to. + * @hide + */ + public static final String EXTRA_PACKAGE_NAME = "android.bluetooth.device.extra.PACKAGE_NAME"; + + /** + * Used as an extra field in {@link #ACTION_CONNECTION_ACCESS_REQUEST} intents, + * Contains class name to return reply intent to. + * @hide + */ + public static final String EXTRA_CLASS_NAME = "android.bluetooth.device.extra.CLASS_NAME"; + + /** + * Used as an extra field in {@link #ACTION_CONNECTION_ACCESS_REPLY} intent. + * @hide + */ + public static final String EXTRA_CONNECTION_ACCESS_RESULT = + "android.bluetooth.device.extra.CONNECTION_ACCESS_RESULT"; + + /**@hide*/ + public static final int CONNECTION_ACCESS_YES = 1; + + /**@hide*/ + public static final int CONNECTION_ACCESS_NO = 2; + + /** + * Used as an extra field in {@link #ACTION_CONNECTION_ACCESS_REPLY} intents, + * Contains boolean to indicate if the allowed response is once-for-all so that + * next request will be granted without asking user again. + * @hide + */ + public static final String EXTRA_ALWAYS_ALLOWED = + "android.bluetooth.device.extra.ALWAYS_ALLOWED"; + /** * A bond attempt succeeded * @hide |