summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Atneya Nair <atneya@google.com> 2024-05-08 15:58:31 -0700
committer Atneya Nair <atneya@google.com> 2024-05-29 18:18:23 -0700
commitc89319df8d886ed1597c824c62d8785bc1522436 (patch)
tree6751786d3b6b1471da5b13b40ce617a7235d472b /libs/androidfw/FileStream.cpp
parent6bf26c72f37fb687dec6f97a6828a203daaef8a5 (diff)
Add audioserver permission caching
Audioserver upcalls to system_server for permission checks. This causes deadlocks due to binder threadpool starvation. Add permission caching functionality to AudioServerPermissionProvider. We utilize the PermissionManager cache invalidation scheme, which updates a sysprop whenever permissions might have changed. We maintain a list of uids for each permission that audioserver is interested in, and whenever the sysprop is updated, we check if the set of uids which hold each perm is updated. If so, we push the new set of uids holding the perm to system server. Ideally we wouldn't iterate over perms cross uids, but there isn't a more efficient way to aggregate the info. We use the existing app-id cache to avoid expensive package manager calls. We should limit the number of permissions that audioserver checks, and route calls through system server whenever possible, for performance reasons. Bug: 338089555 Test: atest AudioServerPermissionProviderTest Flag: com.android.media.audio.audioserver_permissions Change-Id: I8b3732a4b15b94cf90e03bb1604c126973288edf
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions