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

Commit 075081aa authored by Eric Biggers's avatar Eric Biggers
Browse files

PackageManager: remove INSTALL_PARSE_FAILED_ONLY_COREAPP_ALLOWED

Due to the removal of support for Full Disk Encryption and the related
"core apps only" mode of system_server, this error code is never
returned.  It is marked with @hide, so we can just remove it after
removing the only users of it, in ApexPackageInfo and
InstallPackageHelper.

Bug: 208476087
Change-Id: Ie53c41ef3c346e6a9210836e3d842cee966d7924
parent 6efca757
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -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
+0 −6
Original line number Diff line number Diff line
@@ -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 "
+0 −6
Original line number Diff line number Diff line
@@ -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 "