Merge "Avoid reverting apex on devices that do not support updating apex" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d8b6b0fb92
@@ -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