Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 96141040 authored by Biswarup Pal's avatar Biswarup Pal
Browse files

VDM and camera framework changes for camera device awareness

- For any camera, CameraManager (API layer) now receives the
device id (i.e., the id of the device owning the camera, for
virtual camera this would be the id of the virtual device, and
for real cameras this would be Context#DEVICE_ID_DEFAULT) and
the mapped camera id (for virtual devices, the back and
front virtual cameras of that device would have 0 and 1
respectively as their mapped camera id, and for real cameras
this would be their actual camera id) from ICameraServiceListener.
It skips the callbacks if the received device id doesn't match
the one in the current context (except for external cameras of
the default device). As a result, real cameras are available
only to contexts associated with the default device or any
virtual device with default camera policy. Virtual cameras are
available only to contexts associated with a virtual device with
custom camera policy. Note that externally connected real cameras
are available to all contexts. For binder calls to cameraserver,
the API layers pass the device id of the current context and the
device camera policy.

- VDM passes the id of the virtual device to virtual camera HAL
service so that it can be reported to cameraserver. VDM also
exposes the camera policy of a virtual device to cameraserver.

- This change adds device-awareness to both camera2 and legacy
camera API's.

Test: atest CtsVirtualDevicesTestCases
Test: atest VirtualCameraControllerTest
Bug: 291736219
Change-Id: Ic696b0499cfbb9bfbc3c9156ca6ffd93dc42bcc3
parent 3a17b4d7
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