Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2b8cee5 authored by Lee Shombert's avatar Lee Shombert Committed by Android (Google) Code Review
Browse files

Merge "Exclude the PIC key package_info from shared memory" into main

parents c44c73d8 77c12e0f
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -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);
    }

    /**
+2 −2
Original line number Diff line number Diff line
@@ -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"
}