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

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

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

* commit '7d111759e90abe9ec0e66f4231c252f924f6d7b0':
  Remove BT routes when BT is turned off
parents fc1bee6c d787eae9
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