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

Commit 619a761c authored by Harshit Mahajan's avatar Harshit Mahajan
Browse files

Cleaning up recoverability_detection flag

This flag has been released in 24Q3 and can be cleaned up.
Following go/android-flags-guidelines#how-to-delete-a-flag

Bug: 397017037
Test: TH
Flag: EXEMPT cleaning flag
Change-Id: Icfb659537eea62a85ab75d6bebb0068efe928b1c
parent ac294c00
Loading
Loading
Loading
Loading
+13 −15
Original line number Diff line number Diff line
@@ -805,7 +805,6 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
            }
        }

        if (Flags.recoverabilityDetection()) {
        if (params.rollbackImpactLevel == PackageManager.ROLLBACK_USER_IMPACT_HIGH
                || params.rollbackImpactLevel
                == PackageManager.ROLLBACK_USER_IMPACT_ONLY_MANUAL) {
@@ -821,7 +820,6 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
        } else if (params.rollbackImpactLevel < 0) {
            throw new IllegalArgumentException("rollbackImpactLevel can't be negative.");
        }
        }

        boolean isApex = (params.installFlags & PackageManager.INSTALL_APEX) != 0;
        if (isApex) {
+3 −8
Original line number Diff line number Diff line
@@ -3561,9 +3561,6 @@ class PackageManagerShellCommand extends ShellCommand {
                    sessionParams.setEnableRollback(true, rollbackStrategy);
                    break;
                case "--rollback-impact-level":
                    if (!Flags.recoverabilityDetection()) {
                        throw new IllegalArgumentException("Unknown option " + opt);
                    }
                    int rollbackImpactLevel = Integer.parseInt(peekNextArg());
                    if (rollbackImpactLevel < PackageManager.ROLLBACK_USER_IMPACT_LOW
                            || rollbackImpactLevel
@@ -4775,11 +4772,9 @@ class PackageManagerShellCommand extends ShellCommand {
        pw.println("      --full: cause the app to be installed as a non-ephemeral full app");
        pw.println("      --enable-rollback: enable rollbacks for the upgrade.");
        pw.println("          0=restore (default), 1=wipe, 2=retain");
        if (Flags.recoverabilityDetection()) {
        pw.println(
                "      --rollback-impact-level: set device impact required for rollback.");
        pw.println("          0=low (default), 1=high, 2=manual only");
        }
        pw.println("      --install-location: force the install location:");
        pw.println("          0=auto, 1=internal only, 2=prefer external");
        pw.println("      --install-reason: indicates why the app is being installed:");
+1 −2
Original line number Diff line number Diff line
@@ -179,8 +179,7 @@ final class VerifyingSession {
        // Perform package verification and enable rollback (unless we are simply moving the
        // package).
        if (!mOriginInfo.mExisting) {
            final boolean verifyForRollback = Flags.recoverabilityDetection()
                    ? !isARollback() : true;
            final boolean verifyForRollback = !isARollback();
            if (!isApex() && !isArchivedInstallation() && verifyForRollback) {
                // TODO(b/182426975): treat APEX as APK when APK verification is concerned
                sendApkVerificationRequest(pkgLite);
+1 −4
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import android.annotation.WorkerThread;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.pm.Flags;
import android.content.pm.PackageInstaller;
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
@@ -965,9 +964,7 @@ class Rollback {
        ipw.println("-stateDescription: " + mStateDescription);
        ipw.println("-timestamp: " + getTimestamp());
        ipw.println("-rollbackLifetimeMillis: " + getRollbackLifetimeMillis());
        if (Flags.recoverabilityDetection()) {
        ipw.println("-rollbackImpactLevel: " + info.getRollbackImpactLevel());
        }
        ipw.println("-isStaged: " + isStaged());
        ipw.println("-originalSessionId: " + getOriginalSessionId());
        ipw.println("-packages:");
+6 −11
Original line number Diff line number Diff line
@@ -1244,7 +1244,6 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub implements Rollba
        rollback.makeAvailable();
        mPackageHealthObserver.notifyRollbackAvailable(rollback.info);

        if (Flags.recoverabilityDetection()) {
        if (rollback.info.getRollbackImpactLevel() == PackageManager.ROLLBACK_USER_IMPACT_LOW) {
            // TODO(zezeozue): Provide API to explicitly start observing instead
            // of doing this for all rollbacks. If we do this for all rollbacks,
@@ -1254,10 +1253,6 @@ class RollbackManagerServiceImpl extends IRollbackManager.Stub implements Rollba
            mPackageWatchdog.startExplicitHealthCheck(rollback.getPackageNames(),
                    mRollbackLifetimeDurationInMillis, mPackageHealthObserver);
        }
        } else {
            mPackageWatchdog.startExplicitHealthCheck(rollback.getPackageNames(),
                    mRollbackLifetimeDurationInMillis, mPackageHealthObserver);
        }
        runExpiration();
    }

Loading