Merge "CachedBluetoothDevice: Simplify ProfleConnectionState check" am: 4e1034cc53
am: ee50c2e56a
Change-Id: I8e693c2d79a427fef54ce41fbe8045bdbe3bca67
This commit is contained in:
@@ -332,8 +332,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
|
||||
}
|
||||
|
||||
public int getProfileConnectionState(LocalBluetoothProfile profile) {
|
||||
if (mProfileConnectionState == null ||
|
||||
mProfileConnectionState.get(profile) == null) {
|
||||
if (mProfileConnectionState.get(profile) == null) {
|
||||
// If cache is empty make the binder call to get the state
|
||||
int state = profile.getConnectionStatus(mDevice);
|
||||
mProfileConnectionState.put(profile, state);
|
||||
|
||||
Reference in New Issue
Block a user