cameraservice: cache IPermissionChecker and IPermissionController
CameraService makes frequent calls to PermissionChecker and PermissionController services while handler application requests. However it requests a new instance of both from the service manager for each call. Retrieving an instance from service manager results in a binder call, which can quickly add up if the application is making frequent calls to CameraService. To reduce the latency of fetching the services, this CL caches the PermissionChecker and IPermissionController objects for the lifetime of CameraService. Bug: 326139956 Test: atest CtsCameraTestCases:PerformanceTest#testCameraLaunch passes. Test: Verified by vendors that getCameraCharacteristics calls are faster. Merged-in: I9d7471c00d43bb89135d4026dcb8016be234938b Change-Id: I9d7471c00d43bb89135d4026dcb8016be234938b
Loading
Please register or sign in to comment