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

Commit 495cc1eb authored by Chienyuan's avatar Chienyuan Committed by android-build-merger
Browse files

Merge "Remove connected device check logic in getConnectionState" am: 8593fc6c am: 9cc6c2aa

am: ea9afe03

Change-Id: I8b95d85fa9f4fe88fba50086329fccb0f223016b
parents 30d7c759 ea9afe03
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ import com.android.settingslib.R;
import java.util.List;

/**
 * HidProfile handles Bluetooth HID profile.
 * HidProfile handles Bluetooth HID Host role.
 */
public class HidProfile implements LocalBluetoothProfile {
    private static final String TAG = "HidProfile";
@@ -115,11 +115,7 @@ public class HidProfile implements LocalBluetoothProfile {
        if (mService == null) {
            return BluetoothProfile.STATE_DISCONNECTED;
        }
        List<BluetoothDevice> deviceList = mService.getConnectedDevices();

        return !deviceList.isEmpty() && deviceList.get(0).equals(device)
                ? mService.getConnectionState(device)
                : BluetoothProfile.STATE_DISCONNECTED;
        return mService.getConnectionState(device);
    }

    public boolean isPreferred(BluetoothDevice device) {