Merge "Avoid reverting apex on devices that do not support updating apex" into rvc-dev am: d8b6b0fb92
Change-Id: I28a2a568089d1b6a07c6a9cb0f08d99cae9bb335
This commit is contained in:
committed by
Automerger Merge Worker
commit
28153caf59
@@ -354,13 +354,19 @@ public class StagingManager {
|
||||
Slog.e(TAG, "Aborting checkpoint: " + errorMsg);
|
||||
try {
|
||||
if (supportsCheckpoint() && needsCheckpoint()) {
|
||||
mApexManager.revertActiveSessions();
|
||||
// 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);
|
||||
mApexManager.revertActiveSessions();
|
||||
// Only revert apex sessions if device supports updating apex
|
||||
if (mApexManager.isApexSupported()) {
|
||||
mApexManager.revertActiveSessions();
|
||||
}
|
||||
mPowerManager.reboot(null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user