From 44b58ab89e59b3d8241901232c8f7dc9617b206e Mon Sep 17 00:00:00 2001 From: Matthew Xie Date: Wed, 16 Nov 2011 12:27:57 -0800 Subject: Check the bluetooth state for getUuid call Donnot make the bluetoothservice.getUuids call if the bluetooth is not on. Also get rid of all the necessary locks on BluetoothService for get property call. It had a lock on BluetoothAdapterProperty. bug5472114 Change-Id: I383472ae6006fc1f0129c960c8a44ed0df027a43 --- core/java/android/bluetooth/BluetoothAdapter.java | 1 + 1 file changed, 1 insertion(+) (limited to 'core/java/android/bluetooth/BluetoothAdapter.java') diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index ea5c3db..d971652 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -533,6 +533,7 @@ public final class BluetoothAdapter { * @hide */ public ParcelUuid[] getUuids() { + if (getState() != STATE_ON) return null; try { return mService.getUuids(); } catch (RemoteException e) {Log.e(TAG, "", e);} -- cgit v1.1