Loading
Caching permission check results in ContentProvider#applyBatch
When calling ContentProvider#applyBatch, we might end up making many repeated IPermissionChecker#checkPermission binder calls to system server. This is the case in AAOS when a phone pairs to AAOS embedded and starts downloading contacts from the phone to the AAOS device. Within the applyBatch method we temporarily cache the successful permission check results and avoid making the same check and binder call. Test: atest CtsContentTestCasesRavenwood CtsPackageManagerTestCases Test: atest CtsContentTestCases CtsResourcesTestCases CtsWindowManagerTestCases Flag: EXEMPT refactor Bug: 348457141 Change-Id: I956a964c69225aeb6b11b9fa05b921f72ce41012