Merge "Talkback focus doesn't move in liner order after tapping selected option in switch device panel" into rvc-dev
diff --git a/src/com/android/settings/media/MediaDeviceUpdateWorker.java b/src/com/android/settings/media/MediaDeviceUpdateWorker.java
index a976811..bce9c34 100644
--- a/src/com/android/settings/media/MediaDeviceUpdateWorker.java
+++ b/src/com/android/settings/media/MediaDeviceUpdateWorker.java
@@ -128,10 +128,11 @@
 
     public void connectDevice(MediaDevice device) {
         ThreadUtils.postOnBackgroundThread(() -> {
-            mLocalMediaManager.connectDevice(device);
-            ThreadUtils.postOnMainThread(() -> {
-                notifySliceChange();
-            });
+            if (mLocalMediaManager.connectDevice(device)) {
+                ThreadUtils.postOnMainThread(() -> {
+                    notifySliceChange();
+                });
+            }
         });
     }