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

Commit dc6a18b3 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 am: 28153caf am: 28ea7f20

Change-Id: I194fe4001661bfe0f0a47c70ed17aea0793e79b8
parents e7e19f40 28ea7f20
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);
        }
    }