diff options
| author | 2024-11-01 15:18:43 +0000 | |
|---|---|---|
| committer | 2024-11-01 15:18:43 +0000 | |
| commit | b2b8cee59807206c3acab72df75aed1d6cbfe4dc (patch) | |
| tree | db341881eef840118ced3cacd0826c0eea18a2d8 | |
| parent | c44c73d86abf0c9cf17da434abb9e462835bf9a4 (diff) | |
| parent | 77c12e0fbd8d7f1eb0976a52f7d8f4849fb87d44 (diff) | |
Merge "Exclude the PIC key package_info from shared memory" into main
| -rw-r--r-- | core/java/android/app/PropertyInvalidatedCache.java | 12 | ||||
| -rw-r--r-- | core/java/android/app/performance.aconfig | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/core/java/android/app/PropertyInvalidatedCache.java b/core/java/android/app/PropertyInvalidatedCache.java index 26bfec348a6f..a39cf84a4ebe 100644 --- a/core/java/android/app/PropertyInvalidatedCache.java +++ b/core/java/android/app/PropertyInvalidatedCache.java @@ -811,10 +811,20 @@ public class PropertyInvalidatedCache<Query, Result> { return false; // Always disable shared memory on Ravenwood. (for now) } + /** + * Keys that cannot be put in shared memory yet. + */ + private static boolean inSharedMemoryDenyList(@NonNull String name) { + final String pkginfo = PREFIX_SYSTEM + "package_info"; + return name.equals(pkginfo); + }; + // Return true if this cache can use shared memory for its nonce. Shared memory may be used // if the module is the system. private static boolean sharedMemoryOkay(@NonNull String name) { - return sSharedMemoryAvailable && name.startsWith(PREFIX_SYSTEM); + return sSharedMemoryAvailable + && name.startsWith(PREFIX_SYSTEM) + && !inSharedMemoryDenyList(name); } /** diff --git a/core/java/android/app/performance.aconfig b/core/java/android/app/performance.aconfig index 7484a8558841..f51f748bc71f 100644 --- a/core/java/android/app/performance.aconfig +++ b/core/java/android/app/performance.aconfig @@ -7,7 +7,7 @@ flag { is_exported: true is_fixed_read_only: true description: "PropertyInvalidatedCache uses shared memory for nonces." - bug: "366552454" + bug: "360897450" } flag { @@ -16,5 +16,5 @@ flag { is_exported: true is_fixed_read_only: true description: "Enforce PropertyInvalidatedCache.setTestMode() protocol" - bug: "366552454" + bug: "360897450" } |