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

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

am c80873d5: Merge "Remove BT routes when BT is turned off" into lmp-dev

* commit 'c80873d5fa3976c5f6c238fdc98d67bc22cddb72':
  Remove BT routes when BT is turned off
parents 66eab81e 9b2e567a
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