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

Commit 2e5fbf55 authored by Chong Zhang's avatar Chong Zhang
Browse files

Select BT route when currently selected route becomes unavailable

Bug: 10003524
Change-Id: I5de740fac9f2bc2a56125296defe892a8deb505e
parent a5bc070e
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -654,7 +654,13 @@ public class MediaRouter {
            if (info == sStatic.mSelectedRoute) {
            if (info == sStatic.mSelectedRoute) {
                // Removing the currently selected route? Select the default before we remove it.
                // 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.
                // 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) {
            if (!found) {
                sStatic.mCategories.remove(removingCat);
                sStatic.mCategories.remove(removingCat);