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

Commit cd480277 authored by Adam Powell's avatar Adam Powell Committed by Android Git Automerger
Browse files

am fb901079: Merge "Fix MediaRouter prioritization around a2dp devices" into jb-mr1-dev

* commit 'fb901079':
  Fix MediaRouter prioritization around a2dp devices
parents 4d757625 fb901079
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -152,6 +152,8 @@ public class MediaRouter {
                dispatchRouteChanged(sStatic.mDefaultAudioVideo);
            }

            final int mainType = mCurAudioRoutesInfo.mMainType;

            boolean a2dpEnabled;
            try {
                a2dpEnabled = mAudioService.isBluetoothA2dpOn();
@@ -180,11 +182,10 @@ public class MediaRouter {
            }

            if (mBluetoothA2dpRoute != null) {
                if (mCurAudioRoutesInfo.mMainType != AudioRoutesInfo.MAIN_SPEAKER &&
                        mSelectedRoute == mBluetoothA2dpRoute) {
                if (mainType != AudioRoutesInfo.MAIN_SPEAKER &&
                        mSelectedRoute == mBluetoothA2dpRoute && !a2dpEnabled) {
                    selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, mDefaultAudioVideo);
                } else if (mCurAudioRoutesInfo.mMainType == AudioRoutesInfo.MAIN_SPEAKER &&
                        (mSelectedRoute == mDefaultAudioVideo || mSelectedRoute == null) &&
                } else if ((mSelectedRoute == mDefaultAudioVideo || mSelectedRoute == null) &&
                        a2dpEnabled) {
                    selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, mBluetoothA2dpRoute);
                }