Use IServiceManager method to check app permission
The current SensorService implementation uses PermissionCache to check if the calling app has the normal permission HIGH_SAMPLING_RATE_SENSORS. However, PermissionCache is not safe for normal permission because the cache is not updated when there is a permission change (e.g., the case discussed in b/190350124). Bug: 190350124 Test: atest CtsSensorTestCases CtsSensorRatePermissionTestCases Test: Wrote a test app and verified that permission change was correctly checked by the SensorService. Change-Id: I1acb32c59dafa1f5973553e3969666a8d2a4412a
Loading
Please register or sign in to comment