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

Commit 71f3563c authored by Sungsoo's avatar Sungsoo
Browse files

Make dispatchAudioRoutesChanged be called when BT A2DP status changed

Bug: 28517884, Bug: 31398128
Change-Id: Ic1e2f5e828a772c667caf1408ebfc9b0d7c3f7d4
parent fa6f70e2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -220,8 +220,7 @@ public class MediaRouter {

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