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

Skip to content
Commit 86a588ef authored by Austin Borger's avatar Austin Borger
Browse files

cameraservice_test: Create a new test for camera permissions.

We need a set of unit tests to verify the behavior of the attribution
source patches. This patch creates a new test fixture in
cameraservice_test and introduces the following tests:

1) Opening the camera with the camera disabled via device policy
(should receive ERROR_CAMERA_DISABLED).
2) Opening the camera with a nonzero oomScoreOffset with consecutive
connections (second client should be connected).
3) Opening the camera with no oomScoreOffset with consecutive
connections (second client should be connected).

To allow the unit test to excercise SYSTEM_CAMERA permissions, a minor
change has been made to CameraService to allow trusted UIDs to call
connectDevice with an oomScoreOffset > 0.

Change-Id: Idcad29130052be785c252e0bfe5c4d8773e23eb5
Test: Ran the CameraPermissionsTest on flame.
parent 74fca04e
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