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

Commit 1ff30905 authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Automerger Merge Worker
Browse files

Merge "Disallow system apps to be installed/updated as instant." into udc-dev...

Merge "Disallow system apps to be installed/updated as instant." into udc-dev am: 4c390bd2 am: 0ddf73b8 am: 08e094fa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/25715830



Change-Id: Ic10c9f0661b1160287fe98cccb317f798f548f17
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1fe1793e 08e094fa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -680,6 +680,9 @@ final class InstallPackageHelper {
                if (pkgSetting == null || pkgSetting.getPkg() == null) {
                    return Pair.create(PackageManager.INSTALL_FAILED_INVALID_URI, intentSender);
                }
                if (instantApp && (pkgSetting.isSystem() || pkgSetting.isUpdatedSystemApp())) {
                    return Pair.create(PackageManager.INSTALL_FAILED_INVALID_URI, intentSender);
                }
                if (!snapshot.canViewInstantApps(callingUid, UserHandle.getUserId(callingUid))) {
                    // only allow the existing package to be used if it's installed as a full
                    // application for at least one user