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

Commit d7c05c2c authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "Select BT route when currently selected route becomes unavailable"

parents ddb1428a 2e5fbf55
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -654,7 +654,13 @@ public class MediaRouter {
            if (info == sStatic.mSelectedRoute) {
                // Removing the currently selected route? Select the default before we remove it.
                // TODO: Be smarter about the route types here; this selects for all valid.
                selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO | ROUTE_TYPE_USER, sStatic.mDefaultAudioVideo);
                if (info != sStatic.mBluetoothA2dpRoute && sStatic.mBluetoothA2dpRoute != null) {
                    selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO | ROUTE_TYPE_USER,
                            sStatic.mBluetoothA2dpRoute);
                } else {
                    selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO | ROUTE_TYPE_USER,
                            sStatic.mDefaultAudioVideo);
                }
            }
            if (!found) {
                sStatic.mCategories.remove(removingCat);