summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-09-08 19:26:37 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-09-08 19:26:37 +0000
commit4e1034cc5369eb673e5dec655f1ca11ef38b3e26 (patch)
treef548eef1e7c51c291ae7a4b6f5c4b2cf003bf287
parentb8877a981a44783f3e5ad3a406a85d64813aac66 (diff)
parent22bbb819f2b0b073e0ec1ca5fe52ed0ba3559dda (diff)
Merge "CachedBluetoothDevice: Simplify ProfleConnectionState check"
-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 e279a09c2bd2..5f302c6a5035 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);