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

Commit 909371b6 authored by Sungsoo's avatar Sungsoo Committed by android-build-merger
Browse files

Make dispatchAudioRoutesChanged be called when BT A2DP status changed am: 71f3563c am: 139f1e37

am: 220f348f

Change-Id: I34ebeddffe313747008ed6f7d941097bd67d7b9b
parents 69e48e61 220f348f
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
@@ -5620,6 +5620,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) {