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

Commit 6da3c59b authored by gang.huang's avatar gang.huang
Browse files

Fix the restriction of odm partition overlays

The odm partition is an extension of the vendor partition,
so the targetSdkVersion of an overlay package pre-built in
odm partition should not below the SDK level required by
vendor overlays, other than required by system overlays.

Bug: 350902133
Test: presubmit
Change-Id: I8ea561c80f66f5534d7a2f1ccf52c79e1edb0ffd
parent 4e401703
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4550,7 +4550,7 @@ final class InstallPackageHelper {
                            PackageManagerException.INTERNAL_ERROR_SYSTEM_OVERLAY_STATIC);
                }
            } else {
                if ((scanFlags & SCAN_AS_VENDOR) != 0) {
                if ((scanFlags & (SCAN_AS_VENDOR | SCAN_AS_ODM)) != 0) {
                    if (pkg.getTargetSdkVersion() < ScanPackageUtils.getVendorPartitionVersion()) {
                        Slog.w(TAG, "System overlay " + pkg.getPackageName()
                                + " targets an SDK below the required SDK level of vendor"