Loading android/app/src/com/android/bluetooth/mcp/MediaControlGattService.java +25 −20 Original line number Diff line number Diff line Loading @@ -337,6 +337,7 @@ public class MediaControlGattService implements MediaControlGattServiceInterface Log.d(TAG, "onUnauthorizedGattOperation device: " + device); } synchronized (mPendingGattOperations) { List<GattOpContext> operations = mPendingGattOperations.get(device); if (operations == null) { operations = new ArrayList<>(); Loading @@ -349,6 +350,7 @@ public class MediaControlGattService implements MediaControlGattServiceInterface mMcpService.onDeviceUnauthorized(device); } } } private void onAuthorizedGattOperation(BluetoothDevice device, GattOpContext op) { int status = BluetoothGatt.GATT_SUCCESS; Loading Loading @@ -494,14 +496,17 @@ public class MediaControlGattService implements MediaControlGattServiceInterface Log.d(TAG, "ClearUnauthorizedGattOperations device: " + device); } synchronized (mPendingGattOperations) { mPendingGattOperations.remove(device); } } private void ProcessPendingGattOperations(BluetoothDevice device) { if (VDBG) { Log.d(TAG, "ProcessPendingGattOperations device: " + device); } synchronized (mPendingGattOperations) { if (mPendingGattOperations.containsKey(device)) { if (getDeviceAuthorization(device) == BluetoothDevice.ACCESS_ALLOWED) { for (GattOpContext op : mPendingGattOperations.get(device)) { Loading @@ -512,10 +517,10 @@ public class MediaControlGattService implements MediaControlGattServiceInterface onRejectedAuthorizationGattOperation(device, op); } } ClearUnauthorizedGattOperations(device); } } } @VisibleForTesting final BluetoothGattServerCallback mServerCallback = new BluetoothGattServerCallback() { Loading Loading
android/app/src/com/android/bluetooth/mcp/MediaControlGattService.java +25 −20 Original line number Diff line number Diff line Loading @@ -337,6 +337,7 @@ public class MediaControlGattService implements MediaControlGattServiceInterface Log.d(TAG, "onUnauthorizedGattOperation device: " + device); } synchronized (mPendingGattOperations) { List<GattOpContext> operations = mPendingGattOperations.get(device); if (operations == null) { operations = new ArrayList<>(); Loading @@ -349,6 +350,7 @@ public class MediaControlGattService implements MediaControlGattServiceInterface mMcpService.onDeviceUnauthorized(device); } } } private void onAuthorizedGattOperation(BluetoothDevice device, GattOpContext op) { int status = BluetoothGatt.GATT_SUCCESS; Loading Loading @@ -494,14 +496,17 @@ public class MediaControlGattService implements MediaControlGattServiceInterface Log.d(TAG, "ClearUnauthorizedGattOperations device: " + device); } synchronized (mPendingGattOperations) { mPendingGattOperations.remove(device); } } private void ProcessPendingGattOperations(BluetoothDevice device) { if (VDBG) { Log.d(TAG, "ProcessPendingGattOperations device: " + device); } synchronized (mPendingGattOperations) { if (mPendingGattOperations.containsKey(device)) { if (getDeviceAuthorization(device) == BluetoothDevice.ACCESS_ALLOWED) { for (GattOpContext op : mPendingGattOperations.get(device)) { Loading @@ -512,10 +517,10 @@ public class MediaControlGattService implements MediaControlGattServiceInterface onRejectedAuthorizationGattOperation(device, op); } } ClearUnauthorizedGattOperations(device); } } } @VisibleForTesting final BluetoothGattServerCallback mServerCallback = new BluetoothGattServerCallback() { Loading