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

Commit 68eb9210 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: I756d03d3e771d632ff6fce3fc798251fd1d4a2d4
parents aa1b447e 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);
        }
    }