+73
−131
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Only get the CDM associations on demand when creating a virtual device, instead of caching them whenever a user is starting. The asscociations are only used during VD creation, so it's unnecessary to cache them. Remove the camera access controller maps from VDMS, and keep the controllers in VirtualDeviceImpl instead, to be a bit more consistent with input and sensor handling. Since the camera access controllers are per user, provide a mechanism to reuse them from existing VDs and only create a new one if no VD exists for the current user. They keep track of the current observers, and automatically close when it is 0. A couple of other very minor clean-ups as well. Bug: 263231559 Test: atest CameraAccessControllerTest Test: atest VirtualDeviceManagerServiceTest Test: atest android.virtualdevice.cts Change-Id: I3b007fc75ea8e36d826b9034f7574bc4e3207293