Cache binder calls in CompatChanges
Cached call values are kept in ChangeIdStateCache (per-process cache). Use "cache_key.is_compat_change_enabled" system property to invalidate the cache (i.e. any value different from the last observed will trigger an invalidation). Any process can read that property, but only system server can change it. Rolling forward the original caching with invalidating the cache upon package install/update. Tested fix locally by using the API in SoftRestrictedPermissionPolicy.java, and running android.permission2.cts.RestrictedStoragePermissionSharedUidTest which installs some apps with the same uid, which modifies the result of isChangeEnabled. With the additional cache invalidation the test passes. ToDo: add CTS test for the caching. Bug: 140441727 Test: atest PlatformCompatTest Test: atest CompatConfigTest Test: atest CompatChangesTest Test: atest PlatformCompatGating Change-Id: I0265df1c427b43592e4f4d32fe9cfeb8fbc1bfa9
Loading
Please register or sign in to comment