summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author Sally <sallyyuen@google.com> 2023-09-05 15:10:11 +0000
committer Daniel Norman <danielnorman@google.com> 2023-09-08 00:51:07 +0000
commit724d21462cc20c5496b1d5bce673b0b315870b19 (patch)
treebc49bf04b05aaeeffe263a15fed99de8a0c6b9ff /libs/androidfw/misc.cpp
parent40db2be3b3696b4987fcf0f46291c8ca3562ef1c (diff)
Fix race condition between VDM and ProxyManager when registering a proxy
Exo may register a proxy before VDM begins tracking the streamed, but after this app's AccessibilityManagerClient is created in AMS. This race conditions means the app is not notified that it is proxied, since VDM#getDevicesForUid will not return the proxy device id when called. Add a AppsOnVirtualDeviceListener to the ProxyManager. If the running apps are changed on any virtual device, force notifying the apps if any of these belong to a proxied device. We add `forceUpdate` since the last and current client state may be the same (no proxy connections have changed) in this case. Also move any apps that are no longer proxied back to the default device if needed when updating the client device ids, since Exo will use the same device and launch activities on the same display. (We were previously resetting clients only when a device id had no registered proxies, but Exo should be able to keep the proxy registered) Bug: 286587811 Test: manual with Exo, atest ProxyManagerTest, atest AccessibilityDisplayProxyTest Change-Id: I1a1b600c9e71d7baf1f9647475ac63580f7f01c2
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions