diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 6f9ec9c780fbd..df3578f36fe18 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -2159,14 +2159,6 @@ public abstract class PackageManager { */ public static final int INSTALL_FAILED_PROCESS_NOT_DEFINED = -122; - /** - * Installation parse return code: system is in a minimal boot state, and the parser only - * allows the package with {@code coreApp} manifest attribute to be a valid application. - * - * @hide - */ - public static final int INSTALL_PARSE_FAILED_ONLY_COREAPP_ALLOWED = -123; - /** * Installation failed return code: the {@code resources.arsc} of one of the APKs being * installed is compressed or not aligned on a 4-byte boundary. Resource tables that cannot be diff --git a/services/core/java/com/android/server/pm/ApexPackageInfo.java b/services/core/java/com/android/server/pm/ApexPackageInfo.java index 21cd01c176621..07f2fd3e1d1f2 100644 --- a/services/core/java/com/android/server/pm/ApexPackageInfo.java +++ b/services/core/java/com/android/server/pm/ApexPackageInfo.java @@ -352,12 +352,6 @@ class ApexPackageInfo { results.add(new ApexManager.ScanResult( ai, parseResult.parsedPackage, parseResult.parsedPackage.getPackageName())); } else if (throwable instanceof PackageManagerException) { - final PackageManagerException e = (PackageManagerException) throwable; - // Skip parsing non-coreApp apex file if system is in minimal boot state. - if (e.error == PackageManager.INSTALL_PARSE_FAILED_ONLY_COREAPP_ALLOWED) { - Slog.w(TAG, "Scan apex failed, not a coreApp:" + ai.modulePath); - continue; - } throw new IllegalStateException("Unable to parse: " + ai.modulePath, throwable); } else { throw new IllegalStateException("Unexpected exception occurred while parsing " diff --git a/services/core/java/com/android/server/pm/InstallPackageHelper.java b/services/core/java/com/android/server/pm/InstallPackageHelper.java index 3410cec4e0894..00e9afb404557 100644 --- a/services/core/java/com/android/server/pm/InstallPackageHelper.java +++ b/services/core/java/com/android/server/pm/InstallPackageHelper.java @@ -3424,12 +3424,6 @@ final class InstallPackageHelper { throw new IllegalStateException("Failed to scan: " + ai.modulePath, e); } } else if (throwable instanceof PackageManagerException) { - final PackageManagerException e = (PackageManagerException) throwable; - // Skip parsing non-coreApp apex file if system is in minimal boot state. - if (e.error == PackageManager.INSTALL_PARSE_FAILED_ONLY_COREAPP_ALLOWED) { - Slog.w(TAG, "Scan apex failed, not a coreApp:" + ai.modulePath); - continue; - } throw new IllegalStateException("Unable to parse: " + ai.modulePath, throwable); } else { throw new IllegalStateException("Unexpected exception occurred while parsing "