Merge "Add /apex to the list of allowed SystemServer paths" into rvc-dev am: 55815db140 am: 751c69b1c1

Change-Id: I494f1bf2753fa747be049999b776d5b05d47a118
This commit is contained in:
TreeHugger Robot
2020-04-10 20:36:32 +00:00
committed by Automerger Merge Worker

View File

@@ -232,6 +232,10 @@ public class DexManager {
private boolean isSystemServerDexPathSupportedForOdex(String dexPath) { private boolean isSystemServerDexPathSupportedForOdex(String dexPath) {
ArrayList<PackagePartitions.SystemPartition> partitions = ArrayList<PackagePartitions.SystemPartition> partitions =
PackagePartitions.getOrderedPartitions(identity()); PackagePartitions.getOrderedPartitions(identity());
// First check the apex partition as it's not part of the SystemPartitions.
if (dexPath.startsWith("/apex/")) {
return true;
}
for (int i = 0; i < partitions.size(); i++) { for (int i = 0; i < partitions.size(); i++) {
if (partitions.get(i).containsPath(dexPath)) { if (partitions.get(i).containsPath(dexPath)) {
return true; return true;