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

Commit d7dd9730 authored by Dario Freni's avatar Dario Freni Committed by android-build-merger
Browse files

Merge "Prevent installation of new APEX." into qt-dev

am: 2b5de1f2

Change-Id: Ic06515c81d9ca524c335eabeac4bee7e1e5e34b2
parents 40b7cd27 2b5de1f2
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import android.content.pm.PackageParser.SigningDetails.SignatureSchemeVersion;
import android.content.pm.ParceledListSlice;
import android.content.pm.Signature;
import android.content.rollback.IRollbackManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
@@ -116,13 +115,10 @@ public class StagingManager {
        final PackageInfo packageInfo = mApexManager.getPackageInfoForApexName(packageName);

        if (packageInfo == null) {
            // Only allow installing new apexes if on a debuggable build.
            if (!Build.IS_DEBUGGABLE) {
                Slog.w(TAG, "Attempted to install new apex " + packageName + " on user build");
            // Don't allow installation of new APEX.
            Slog.e(TAG, "Attempted to install a new apex " + packageName + ". Rejecting");
            return false;
        }
            return true;
        }

        final SigningDetails existingSigningDetails;
        try {