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

Commit cf874bbe authored by Sungsoo Lim's avatar Sungsoo Lim Committed by android-build-merger
Browse files

Merge "Select a system audio route only when needed" into oc-mr1-dev

am: d4aee713

Change-Id: Ifa91341cb48c970f9b19c6f8bc0219c1a3372a9a
parents b7de1a86 d4aee713
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -202,7 +202,6 @@ public class MediaRouter {
                audioRoutesChanged = true;
            }

            final int mainType = mCurAudioRoutesInfo.mainType;
            if (!TextUtils.equals(newRoutes.bluetoothName, mCurAudioRoutesInfo.bluetoothName)) {
                mCurAudioRoutesInfo.bluetoothName = newRoutes.bluetoothName;
                if (mCurAudioRoutesInfo.bluetoothName != null) {
@@ -229,8 +228,11 @@ public class MediaRouter {
            }

            if (audioRoutesChanged) {
                selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, getDefaultSystemAudioRoute(), false);
                Log.v(TAG, "Audio routes updated: " + newRoutes + ", a2dp=" + isBluetoothA2dpOn());
                if (mSelectedRoute == null || mSelectedRoute == mDefaultAudioVideo
                        || mSelectedRoute == mBluetoothA2dpRoute) {
                    selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, getDefaultSystemAudioRoute(), false);
                }
            }
        }