Get MediaDevice from devices list

The TopDevice that we cached will not update device infomation
when route is changed. We should get TopDevice from devices
list every time to confirm the device infomation is updated.

Bug: 151709228
Test: manual test to see ui is changed
Change-Id: Iede279b424d070dc7a0b30c369bed316e7ac223d
This commit is contained in:
hughchen
2020-03-25 17:24:26 +08:00
parent 7443e3de6e
commit 649cddeb15

View File

@@ -151,7 +151,7 @@ public class MediaDeviceUpdateWorker extends SliceBackgroundWorker
}
MediaDevice getTopDevice() {
return mTopDevice;
return getMediaDeviceById(mTopDevice.getId());
}
boolean addDeviceToPlayMedia(MediaDevice device) {