Treat allowlists differently for flattened apex

On devices which use flattened APEX, treat the allowlists as part of the
system image.

Test: m # lunch wembley_2GB-userdebug
Bug: 221862988
Change-Id: I1971a686aa111b396f9e694a74be70d758078423
Merged-In: I1971a686aa111b396f9e694a74be70d758078423
This commit is contained in:
Andrei Onea
2022-03-16 14:52:00 +00:00
parent 2b2b455884
commit ede686e3a3

View File

@@ -34,6 +34,7 @@ import android.os.Trace;
import android.os.incremental.IncrementalManager;
import android.os.storage.StorageManager;
import android.permission.PermissionManager.SplitPermissionInfo;
import android.sysprop.ApexProperties;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -1165,7 +1166,8 @@ public class SystemConfig {
boolean systemExt = permFile.toPath().startsWith(
Environment.getSystemExtDirectory().toPath() + "/");
boolean apex = permFile.toPath().startsWith(
Environment.getApexDirectory().toPath() + "/");
Environment.getApexDirectory().toPath() + "/")
&& ApexProperties.updatable().orElse(false);
if (vendor) {
readPrivAppPermissions(parser, mVendorPrivAppPermissions,
mVendorPrivAppDenyPermissions);