Talkback focus doesn't move in liner order after tapping selected option in switch device panel

-Not to reflash UI to reset the focus order
-Reflash UI only when connect() is valid

Bug: 156336275
Test: make -j42 RunSettingsRoboTests
Change-Id: Ibb20252167ba13309065e4672f92cdf645661a0e
This commit is contained in:
Tim Peng
2020-05-19 10:08:14 +08:00
parent 0581bd7f1c
commit 17e2e158c4

View File

@@ -128,10 +128,11 @@ public class MediaDeviceUpdateWorker extends SliceBackgroundWorker
public void connectDevice(MediaDevice device) {
ThreadUtils.postOnBackgroundThread(() -> {
mLocalMediaManager.connectDevice(device);
ThreadUtils.postOnMainThread(() -> {
notifySliceChange();
});
if (mLocalMediaManager.connectDevice(device)) {
ThreadUtils.postOnMainThread(() -> {
notifySliceChange();
});
}
});
}