Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee50c2e5 authored by xutianguo's avatar xutianguo Committed by android-build-merger
Browse files

Merge "CachedBluetoothDevice: Simplify ProfleConnectionState check"

am: 4e1034cc

Change-Id: I478f83fae3eed14e4f67bf79825a513143af4fb3
parents 7acb5f8e 4e1034cc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);