summaryrefslogtreecommitdiff
path: root/libs/androidfw/ObbFile.cpp
diff options
context:
space:
mode:
author Adam Bookatz <bookatz@google.com> 2024-09-23 14:49:37 -0700
committer Adam Bookatz <bookatz@google.com> 2024-10-11 09:20:25 -0700
commite725b3e97c839fe63c8f3fb283c29043855a83f4 (patch)
tree61f516177b59fc771098b9aa3ca71f2f329d24ba /libs/androidfw/ObbFile.cpp
parentb13bf71c73c1513efa946350b4bef95efb4c23c6 (diff)
UserProperties won't be cached for wrong callers
UserManager.getUserProperties() will return different results depending on the callingUid, since different callers have different permissions. If a process is fetching the UserProperties on behalf of a different caller (i.e. where the callingUid doesn't match the process), then caching the result will be wrong, since that cached copy only applied to that particular callingUid, which the cache doesn't take into account. In this cl, we make the cache take into account not only the userId being queried, but also the callingUid that is querying it. We also switch the old unusued mechanism to the new @CachedProperty static caching mechanism. Bug: 369198539 Bug: 367997317 Flag: android.multiuser.cache_user_properties_correctly_read_only Test: Manual confirmation that callingUids are properly cached too Test: Made sure we have a good hit frequency by enabling PropertyInvalidatedCache DEBUG and monitoring adb logcat | grep PropertyInvalidatedCache | grep user_properties Change-Id: I5a6f136f68afe84c2406e3d2c20c222eff8f381f
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
0 files changed, 0 insertions, 0 deletions