diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-19 23:08:55 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-19 23:08:55 +0000 |
commit | a555ad5019f215e6ac56359a02a6e95713dd0c89 (patch) | |
tree | e19e4412ee39737e965569e35c080aaf237c5b6b /framework/java/android/bluetooth/BluetoothDevice.java | |
parent | d9423c9ef8395df5effd3d4656546b70461b41d8 (diff) | |
parent | 33f3782b3210863753acd9f07538b106e194441a (diff) |
Snap for 8326520 from 33f3782b3210863753acd9f07538b106e194441a to tm-release
Change-Id: I0a6702b76b12efc8f76101294da49057cb95d34d
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothDevice.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java index 698e409723..5b197763c6 100644 --- a/framework/java/android/bluetooth/BluetoothDevice.java +++ b/framework/java/android/bluetooth/BluetoothDevice.java @@ -217,7 +217,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { * #EXTRA_BOND_STATE} and {@link #EXTRA_PREVIOUS_BOND_STATE}. */ // Note: When EXTRA_BOND_STATE is BOND_NONE then this will also - // contain a hidden extra field EXTRA_REASON with the result code. + // contain a hidden extra field EXTRA_UNBOND_REASON with the result code. @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) @@ -380,8 +380,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { public static final int BOND_BONDED = 12; /** - * Used as an int extra field in {@link #ACTION_PAIRING_REQUEST} - * intents for unbond reason. + * Used as an int extra field in {@link #ACTION_PAIRING_REQUEST} intents for unbond reason. * Possible value are : * - {@link #UNBOND_REASON_AUTH_FAILED} * - {@link #UNBOND_REASON_AUTH_REJECTED} @@ -393,11 +392,22 @@ public final class BluetoothDevice implements Parcelable, Attributable { * - {@link #UNBOND_REASON_REMOTE_AUTH_CANCELED} * - {@link #UNBOND_REASON_REMOVED} * - * {@hide} + * Note: Can be added as a hidden extra field for {@link #ACTION_BOND_STATE_CHANGED} when the + * {@link #EXTRA_BOND_STATE} is {@link #BOND_NONE} + * + * @hide */ @SystemApi @SuppressLint("ActionValue") - public static final String EXTRA_REASON = "android.bluetooth.device.extra.REASON"; + public static final String EXTRA_UNBOND_REASON = "android.bluetooth.device.extra.REASON"; + + /** + * Use {@link EXTRA_UNBOND_REASON} instead + * @hide + */ + @UnsupportedAppUsage + public static final String EXTRA_REASON = EXTRA_UNBOND_REASON; + /** * Used as an int extra field in {@link #ACTION_PAIRING_REQUEST} |