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.
Loading
Please register or sign in to comment