Merge "Install system app in greatest priority partition" into rvc-dev am: d32418a72a am: d5bfbd0f27

Change-Id: Ibd5291cc48b25d168fd7bae736c180ff28916b8b
This commit is contained in:
Ryan Mitchell
2020-05-29 18:14:54 +00:00
committed by Automerger Merge Worker
6 changed files with 67 additions and 52 deletions

View File

@@ -110,7 +110,9 @@ public class OverlayConfig {
} else {
// Rebase the system partitions and settings file on the specified root directory.
partitions = new ArrayList<>(PackagePartitions.getOrderedPartitions(
p -> new OverlayPartition(new File(rootDirectory, p.folder.getPath()), p)));
p -> new OverlayPartition(
new File(rootDirectory, p.getFolder().getPath()),
p)));
}
boolean foundConfigFile = false;
@@ -143,7 +145,7 @@ public class OverlayConfig {
// Filter out overlays not present in the partition.
partitionOverlayInfos = new ArrayList<>(packageManagerOverlayInfos);
for (int j = partitionOverlayInfos.size() - 1; j >= 0; j--) {
if (!partition.containsPath(partitionOverlayInfos.get(j).path.getPath())) {
if (!partition.containsFile(partitionOverlayInfos.get(j).path)) {
partitionOverlayInfos.remove(j);
}
}

View File

@@ -27,8 +27,8 @@ import android.util.ArraySet;
import android.util.Log;
import android.util.Xml;
import com.android.internal.util.XmlUtils;
import com.android.internal.content.om.OverlayScanner.ParsedOverlayInfo;
import com.android.internal.util.XmlUtils;
import libcore.io.IoUtils;
@@ -154,7 +154,7 @@ final class OverlayConfigParser {
return POLICY_PRODUCT;
default:
throw new IllegalStateException("Unable to determine policy for "
+ partition.folder);
+ partition.getFolder());
}
}
}