summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author xutianguo <xutianguo@xiaomi.com> 2017-09-08 19:35:27 +0000
committer android-build-merger <android-build-merger@google.com> 2017-09-08 19:35:27 +0000
commitee50c2e56a957509e51394fc6914c0058775e89c (patch)
tree6c9328ae06256852f7a6d77d9f30576fc08c6f92
parent7acb5f8e1052513022265f19ac50a890e8e0975f (diff)
parent4e1034cc5369eb673e5dec655f1ca11ef38b3e26 (diff)
Merge "CachedBluetoothDevice: Simplify ProfleConnectionState check"
am: 4e1034cc53 Change-Id: I478f83fae3eed14e4f67bf79825a513143af4fb3
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index 4bb4b402b990..bfa8de9e963b 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -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);