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

Commit 92c622ef authored by RoboErik's avatar RoboErik Committed by Android Git Automerger
Browse files

am 22069b65: am 3c99bd4b: am 298314cb: am 7d111759: am c80873d5: Merge "Remove...

am 22069b65: am 3c99bd4b: am 298314cb: am 7d111759: am c80873d5: Merge "Remove BT routes when BT is turned off" into lmp-dev

* commit '22069b6592c821487fc024b59e103c39fa4bbd34':
  Remove BT routes when BT is turned off
parents 763d2050 2a1016bd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4174,6 +4174,14 @@ public class AudioService extends IAudioService.Stub {
                AudioSystem.DEVICE_STATE_UNAVAILABLE,
                address);
        mConnectedDevices.remove(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP);
        synchronized (mCurAudioRoutes) {
            // Remove A2DP routes as well
            if (mCurAudioRoutes.mBluetoothName != null) {
                mCurAudioRoutes.mBluetoothName = null;
                sendMsg(mAudioHandler, MSG_REPORT_NEW_ROUTES,
                        SENDMSG_NOOP, 0, 0, null, 0);
            }
        }
    }

    // must be called synchronized on mConnectedDevices