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

Commit e65c13db authored by Nikita Ioffe's avatar Nikita Ioffe Committed by android-build-merger
Browse files

Merge "Do not check for APEX and APK package name collisions during normal...

Merge "Do not check for APEX and APK package name collisions during normal boot" into qt-dev am: 060b4115
am: 8d9465d5

Change-Id: I9c0ef694d427b9123314e6542c2d92535c570605
parents 2dc28f41 8d9465d5
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -11731,7 +11731,12 @@ public class PackageManagerService extends IPackageManager.Stub
                    "Code and resource paths haven't been set correctly");
        }
        if (mApexManager.isApexPackage(pkg.packageName)) {
        // Check that there is an APEX package with the same name only during install/first boot
        // after OTA.
        final boolean isUserInstall = (scanFlags & SCAN_BOOTING) == 0;
        final boolean isFirstBootOrUpgrade = (scanFlags & SCAN_FIRST_BOOT_OR_UPGRADE) != 0;
        if ((isUserInstall || isFirstBootOrUpgrade)
                && mApexManager.isApexPackage(pkg.packageName)) {
            throw new PackageManagerException(INSTALL_FAILED_DUPLICATE_PACKAGE,
                    pkg.packageName + " is an APEX package and can't be installed as an APK.");
        }