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

Commit 139f1e37 authored by Sungsoo's avatar Sungsoo Committed by android-build-merger
Browse files

Make dispatchAudioRoutesChanged be called when BT A2DP status changed

am: 71f3563c

Change-Id: I1ed4f2bfe61feb150091b16817547538539c3285
parents 96942eb2 71f3563c
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -220,8 +220,7 @@ public class MediaRouter {


            if (mBluetoothA2dpRoute != null) {
            if (mBluetoothA2dpRoute != null) {
                final boolean a2dpEnabled = isBluetoothA2dpOn();
                final boolean a2dpEnabled = isBluetoothA2dpOn();
                if (mainType != AudioRoutesInfo.MAIN_SPEAKER &&
                if (mSelectedRoute == mBluetoothA2dpRoute && !a2dpEnabled) {
                        mSelectedRoute == mBluetoothA2dpRoute && !a2dpEnabled) {
                    selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, mDefaultAudioVideo, false);
                    selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, mDefaultAudioVideo, false);
                } else if ((mSelectedRoute == mDefaultAudioVideo || mSelectedRoute == null) &&
                } else if ((mSelectedRoute == mDefaultAudioVideo || mSelectedRoute == null) &&
                        a2dpEnabled) {
                        a2dpEnabled) {
+2 −0
Original line number Original line Diff line number Diff line
@@ -5609,6 +5609,8 @@ public class AudioService extends IAudioService.Stub {
                } else { // config == AudioSystem.FORCE_NONE
                } else { // config == AudioSystem.FORCE_NONE
                    mBecomingNoisyIntentDevices |= AudioSystem.DEVICE_OUT_ALL_A2DP;
                    mBecomingNoisyIntentDevices |= AudioSystem.DEVICE_OUT_ALL_A2DP;
                }
                }
                sendMsg(mAudioHandler, MSG_REPORT_NEW_ROUTES,
                        SENDMSG_NOOP, 0, 0, null, 0);
                break;
                break;
            case AudioSystem.FOR_DOCK:
            case AudioSystem.FOR_DOCK:
                if (config == AudioSystem.FORCE_ANALOG_DOCK) {
                if (config == AudioSystem.FORCE_ANALOG_DOCK) {