Revert "MediaRouter: Synchronize route selecting information"

This reverts commit c0b44f78f248e321d913db6077bf9a55976d7319.

Bug: 35198037
Test: build & manual
Change-Id: I51fd83933801eb0012be37016e80a82935412328
(cherry picked from commit cc0cb8d62143a398a1103411552a62dae22fc133)
diff --git a/v7/mediarouter/src/android/support/v7/media/MediaRouter.java b/v7/mediarouter/src/android/support/v7/media/MediaRouter.java
index 3c8e64d..fe16de8 100644
--- a/v7/mediarouter/src/android/support/v7/media/MediaRouter.java
+++ b/v7/mediarouter/src/android/support/v7/media/MediaRouter.java
@@ -18,7 +18,6 @@
 
 import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
 
-import android.annotation.TargetApi;
 import android.app.ActivityManager;
 import android.content.ComponentName;
 import android.content.ContentResolver;
@@ -2089,11 +2088,6 @@
                 throw new IllegalStateException("There is no currently selected route.  "
                         + "The media router has not yet been fully initialized.");
             }
-            // A workaround for making this method work properly.
-            if (android.os.Build.VERSION.SDK_INT >= 16 && android.os.Build.VERSION.SDK_INT < 25
-                    && RouteInfo.isSystemMediaRouteProvider(mSelectedRoute)) {
-                syncSystemRoutes();
-            }
             return mSelectedRoute;
         }
 
@@ -2110,12 +2104,6 @@
                 Log.w(TAG, "Ignoring attempt to select disabled route: " + route);
                 return;
             }
-
-            // A workaround for making this method work properly.
-            if (android.os.Build.VERSION.SDK_INT >= 16 && android.os.Build.VERSION.SDK_INT < 25
-                    && RouteInfo.isSystemMediaRouteProvider(route)) {
-                syncSystemRoutes();
-            }
             setSelectedRouteInternal(route, unselectReason);
         }
 
@@ -2250,25 +2238,6 @@
             }
         }
 
-        @TargetApi(16)
-        void syncSystemRoutes() {
-            Object routerObj = MediaRouterJellybean.getMediaRouter(mApplicationContext);
-            boolean routedToBluetooth = MediaRouterJellybean.checkRoutedToBluetooth(
-                mApplicationContext);
-            Object selectedRouteObj = MediaRouterJellybean.getSelectedRoute(
-                    routerObj, MediaRouterJellybean.ALL_ROUTE_TYPES);
-            Object defaultRouteObj = mSystemProvider.getDefaultRoute();
-            Object bluetoothRouteObj = mSystemProvider.getSystemRoute(mBluetoothRoute);
-
-            if (routedToBluetooth && selectedRouteObj == defaultRouteObj) {
-                MediaRouterJellybean.selectRoute(routerObj,
-                    MediaRouterJellybean.ALL_ROUTE_TYPES, bluetoothRouteObj);
-            } else if (!routedToBluetooth && selectedRouteObj == bluetoothRouteObj) {
-                MediaRouterJellybean.selectRoute(routerObj,
-                        MediaRouterJellybean.ALL_ROUTE_TYPES, defaultRouteObj);
-            }
-        }
-
         void updateProviderDescriptor(MediaRouteProvider providerInstance,
                 MediaRouteProviderDescriptor descriptor) {
             int index = findProviderInfo(providerInstance);