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

Commit 0bebd401 authored by Presubmit Automerger Backend's avatar Presubmit Automerger Backend
Browse files

[automerge] Avoid connecting the device again when the device is already connected 2p: 38c191d6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16556044

Bug: 192621487
Change-Id: Iceaf81f6960671b2abc0b1853fb9a14cf6ed978e
parents b556470d 38c191d6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -172,8 +172,8 @@ public class LocalMediaManager implements BluetoothCallback {
            }
        }

        if (device == mCurrentConnectedDevice) {
            Log.d(TAG, "connectDevice() this device all ready connected! : " + device.getName());
        if (device.equals(mCurrentConnectedDevice)) {
            Log.d(TAG, "connectDevice() this device is already connected! : " + device.getName());
            return false;
        }

+4 −1
Original line number Diff line number Diff line
@@ -198,7 +198,10 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
            if (mController.isTransferring()) {
                return;
            }

            if (isCurrentlyConnected(device)) {
                Log.d(TAG, "This device is already connected! : " + device.getName());
                return;
            }
            mCurrentActivePosition = -1;
            playSwitchingAnim(mConnectedItem, view);
            mController.connectDevice(device);