diff options
| author | 2024-11-25 19:21:56 -0800 | |
|---|---|---|
| committer | 2024-12-03 18:45:13 +0000 | |
| commit | 80fd09f1e89f621134161c6ce3bcee5f8cdf7b7c (patch) | |
| tree | db789c969f1b5e312ae42fa1fcf9ad5f41edf7c8 /libs/androidfw/StringPool.cpp | |
| parent | b41cf3061550e983a9858cddc43f3aa46ad1d858 (diff) | |
Separate permission notifications from cache updates
If the feature is enabled, the following behavior changes:
1. Caches that used CACHE_KEY_PACKAGE_INFO as a key now use
CACHE_KEY_PACKAGE_INFO_CACHE. This has a different value from the
previous key, so it will be stored in shared memory, not in a
sysprop.
2. CACHE_KEY_PACKAGE_INFO_CACHE caches do not use auto-corking.
3. AudioServer listens to changes on CACHE_KEY_PACKAGE_INFO_NOTIFY,
sysprop, which has the same value as the legacy
CACHE_KEY_PACKAGE_INFO.
4. A new Thread in AudioServer spins, waiting for changes on the
CACHE_KEY_PACKAGE_INFO_CACHE nonce. When the nonce changes, the
CACHE_KEY_PACKAGE_INFO_NOTIFY sysprop is updated. Updating is
throttled using the same logic as auto-corking.
The net effect is that all cache operations take place through shared
memory. PackageManger cache invalidation never stalls behind a sysprop
set operation. An adapter in AudioServer generates the legacy sysprop
changes.
Tested with the flag enabled:
* Verified that no cache uses "package_info" as its key
* Verified that caches use "package_info_cache" as their key
* Verified no regressions on UserLifecyceTest#switchUser
Flag: android.app.pic_separate_permission_notifications
Bug: 379699402
Bug: 360897450
Test: atest
* FrameworksCoreTests:PropertyInvalidatedCacheTests
* FrameworksCoreTests:IpcDataCacheTest
* CtsOsTestCases:IpcDataCacheTest
* ServiceBluetoothTests
* android.app.appops.cts.AppOpsLoggingTest
* android.media.audio.cts.AudioFocusTest
* CtsMediaAudioPermissionTestCases
* CtsMediaAudioTestCases:AudioRecordTest
Change-Id: I314e4ea32765ca22b8ecd23a1bde93ab2c828111
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions