Merge "Prevent installation of new APEX." into qt-dev
am: 2b5de1f231
Change-Id: I85e247ba4cc242528593b4d40a7f610e46acb608
This commit is contained in:
@@ -36,7 +36,6 @@ import android.content.pm.PackageParser.SigningDetails.SignatureSchemeVersion;
|
|||||||
import android.content.pm.ParceledListSlice;
|
import android.content.pm.ParceledListSlice;
|
||||||
import android.content.pm.Signature;
|
import android.content.pm.Signature;
|
||||||
import android.content.rollback.IRollbackManager;
|
import android.content.rollback.IRollbackManager;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
@@ -116,12 +115,9 @@ public class StagingManager {
|
|||||||
final PackageInfo packageInfo = mApexManager.getPackageInfoForApexName(packageName);
|
final PackageInfo packageInfo = mApexManager.getPackageInfoForApexName(packageName);
|
||||||
|
|
||||||
if (packageInfo == null) {
|
if (packageInfo == null) {
|
||||||
// Only allow installing new apexes if on a debuggable build.
|
// Don't allow installation of new APEX.
|
||||||
if (!Build.IS_DEBUGGABLE) {
|
Slog.e(TAG, "Attempted to install a new apex " + packageName + ". Rejecting");
|
||||||
Slog.w(TAG, "Attempted to install new apex " + packageName + " on user build");
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final SigningDetails existingSigningDetails;
|
final SigningDetails existingSigningDetails;
|
||||||
|
|||||||
Reference in New Issue
Block a user