am a87f2fd7
: b/2320107 Fixed NPE for class bits. Docks do not have class bits.
Merge commit 'a87f2fd7d82e5055e0f9ea2c93704ed0b58f27ef' into eclair-mr2 * commit 'a87f2fd7d82e5055e0f9ea2c93704ed0b58f27ef': b/2320107 Fixed NPE for class bits. Docks do not have class bits.
This commit is contained in:
@@ -691,26 +691,28 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
||||
boolean printUuids = true;
|
||||
BluetoothClass bluetoothClass = mDevice.getBluetoothClass();
|
||||
|
||||
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_HEADSET) !=
|
||||
mProfiles.contains(Profile.HEADSET)) {
|
||||
Log.v(TAG, "headset classbits != uuid");
|
||||
printUuids = true;
|
||||
}
|
||||
if (bluetoothClass != null) {
|
||||
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_HEADSET) !=
|
||||
mProfiles.contains(Profile.HEADSET)) {
|
||||
Log.v(TAG, "headset classbits != uuid");
|
||||
printUuids = true;
|
||||
}
|
||||
|
||||
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_A2DP) !=
|
||||
mProfiles.contains(Profile.A2DP)) {
|
||||
Log.v(TAG, "a2dp classbits != uuid");
|
||||
printUuids = true;
|
||||
}
|
||||
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_A2DP) !=
|
||||
mProfiles.contains(Profile.A2DP)) {
|
||||
Log.v(TAG, "a2dp classbits != uuid");
|
||||
printUuids = true;
|
||||
}
|
||||
|
||||
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_OPP) !=
|
||||
mProfiles.contains(Profile.OPP)) {
|
||||
Log.v(TAG, "opp classbits != uuid");
|
||||
printUuids = true;
|
||||
if (bluetoothClass.doesClassMatch(BluetoothClass.PROFILE_OPP) !=
|
||||
mProfiles.contains(Profile.OPP)) {
|
||||
Log.v(TAG, "opp classbits != uuid");
|
||||
printUuids = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (printUuids) {
|
||||
Log.v(TAG, "Class: " + bluetoothClass.toString());
|
||||
if (bluetoothClass != null) Log.v(TAG, "Class: " + bluetoothClass.toString());
|
||||
Log.v(TAG, "UUID:");
|
||||
for (int i = 0; i < uuids.length; i++) {
|
||||
Log.v(TAG, " " + uuids[i]);
|
||||
|
Reference in New Issue
Block a user