Fix VDM UID tracking.
Current problems: - Only a single display per device is tracked at a time. If a virtual device has more than one display, any listeners will receive wrong UIDs - UIDs not updated when a display/device is removed. The mapping is never updated in that case and any UIDs will forever be considered as running on a virtual device - AudioController is device-level but tracks only a single display at a time as well. Starting a new audio session/device will lose track of all UIDs on the previously tracked display. - Overall, the UID tracking has an implicit assumption that a virtual device can only ever have a single display. Changes: - Remove the GWPC-level listeners. VirtualDeviceImpl now processes all UIDs coming from each display's GWPC - Combine all display UIDs into device-level UIDs and pass that to all relevant clients (AudioController, CameraAccessController, VDMS). All they ever care about is the set of all UIDs on a device, they do not need display level granularity - Notify about empty UID set whenever a display is removed - VDMS simply dispatches the new UIDs to any system listeners that are registered with VDMInternal - Change the VDMInternal listener to take set of UIDs per device, instead of all UIDs running on ANY virtual device - Simplify the single VDMInternal listener use case (A11y Proxy) - Clean up redudndant VDMInternal methods and move the listeners from the LocalService to VDMS top level Implications: - Fixing A11yProxy issues with re-launching apps on a new display or device after the old one was closed. The A11yProxy is now notified about the changes. - Fix issues with the AudioController, which will now track all UIDs running on the device, regardless of the display. Bug: 440355882 Bug: 440353845 Fix: 428281968 Flag: EXEMPT bugfix Test: atest & manual Change-Id: I27cdea489eefddeb8238d61bcd0d40a8f742befe
Loading
Please register or sign in to comment