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

Commit cf99f79c authored by Mohammad Samiul Islam's avatar Mohammad Samiul Islam Committed by Automerger Merge Worker
Browse files

Merge "Avoid reverting apex on devices that do not support updating apex" into...

Merge "Avoid reverting apex on devices that do not support updating apex" into rvc-dev am: d8b6b0fb

Change-Id: I8ccfac9c96f20e497bc62c6f15df27940bc3e6aa
parents a9743cfa d8b6b0fb
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -354,13 +354,19 @@ public class StagingManager {
        Slog.e(TAG, "Aborting checkpoint: " + errorMsg);
        try {
            if (supportsCheckpoint() && needsCheckpoint()) {
                // Only revert apex sessions if device supports updating apex
                if (mApexManager.isApexSupported()) {
                    mApexManager.revertActiveSessions();
                }
                PackageHelper.getStorageManager().abortChanges(
                        "StagingManager initiated", false /*retry*/);
            }
        } catch (Exception e) {
            Slog.wtf(TAG, "Failed to abort checkpoint", e);
            // Only revert apex sessions if device supports updating apex
            if (mApexManager.isApexSupported()) {
                mApexManager.revertActiveSessions();
            }
            mPowerManager.reboot(null);
        }
    }