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

Commit ac67508f authored by Dario Freni's avatar Dario Freni
Browse files

Revert "Revert "Detect system_ext provenance for APKs-in-APEX""

This reverts commit 0f467cc8.

Reason for revert: Including a fix for non-APEX-enabled devices.

Change-Id: I238e88684f48981c44e7152f97b4ca16bed6d166
parent 0f467cc8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -151,8 +151,10 @@ final class InitAndSystemPackageHelper {
            ApexManager.ActiveApexInfo apexInfo) {
        for (int i = 0, size = SYSTEM_PARTITIONS.size(); i < size; i++) {
            ScanPartition sp = SYSTEM_PARTITIONS.get(i);
            if (apexInfo.preInstalledApexPath.getAbsolutePath().startsWith(
                    sp.getFolder().getAbsolutePath())) {
            if (apexInfo.preInstalledApexPath.getAbsolutePath().equals(
                    sp.getFolder().getAbsolutePath())
                    || apexInfo.preInstalledApexPath.getAbsolutePath().startsWith(
                        sp.getFolder().getAbsolutePath() + File.separator)) {
                return new ScanPartition(apexInfo.apexDirectory, sp, SCAN_AS_APK_IN_APEX);
            }
        }