Skip to content
Commit 3934796d authored by Vladimir Komsiyski's avatar Vladimir Komsiyski
Browse files

Small changes in VDMS w.r.t. caching and camera controller.

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
parent 0288fd63
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment