summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Mertz <smertz@cyngn.com>2014-07-24 15:20:27 -0700
committerScott Mertz <inwotep@cyngn.com>2014-08-05 19:21:09 +0000
commit91901f047dca8abbfbacfd0bd7380f8e55388fe7 (patch)
tree81d7010cc37c6d55c25945fd052ff1c106519e11
parent1a4a2c79b362d96051235f9b8809d2d629fc9439 (diff)
downloadandroid_packages_apps_Bluetooth-91901f047dca8abbfbacfd0bd7380f8e55388fe7.tar.gz
android_packages_apps_Bluetooth-91901f047dca8abbfbacfd0bd7380f8e55388fe7.tar.bz2
android_packages_apps_Bluetooth-91901f047dca8abbfbacfd0bd7380f8e55388fe7.zip
Bluetooth: Prevent race condition when authorizing
Change-Id: Ic875fd619afea5fd36ce9b2f71a91d2d68dbb578
-rw-r--r--src/com/android/bluetooth/map/BluetoothMapService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapService.java b/src/com/android/bluetooth/map/BluetoothMapService.java
index 262ab70f4..3de618fcb 100644
--- a/src/com/android/bluetooth/map/BluetoothMapService.java
+++ b/src/com/android/bluetooth/map/BluetoothMapService.java
@@ -821,6 +821,7 @@ public class BluetoothMapService extends ProfileService {
}
} else {
mConnectionManager.setWaitingForConfirmation(mMasId);
+ isWaitingAuthorization = true;
Intent intent = new
Intent(BluetoothDevice.ACTION_CONNECTION_ACCESS_REQUEST);
intent.setClassName(ACCESS_AUTHORITY_PACKAGE, ACCESS_AUTHORITY_CLASS);
@@ -828,7 +829,6 @@ public class BluetoothMapService extends ProfileService {
BluetoothDevice.REQUEST_TYPE_MESSAGE_ACCESS);
intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mRemoteDevice);
sendBroadcast(intent, BLUETOOTH_ADMIN_PERM);
- isWaitingAuthorization = true;
if (DEBUG) Log.d(TAG, "waiting for authorization for connection from: "
+ sRemoteDeviceName);