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

Commit 28153caf 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: I28a2a568089d1b6a07c6a9cb0f08d99cae9bb335
parents 2654f998 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);
        }
    }