Merge "Clear BCB if space allocation failed" am: b667621f8b am: b83bb72fb7 am: 0bbc41378b am: 57ef6a2de3

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1997490

Change-Id: I28cc7ab81a6bc4bdb4b3b0fcc86a3215a1f926ea
This commit is contained in:
Treehugger Robot
2022-02-24 20:28:31 +00:00
committed by Automerger Merge Worker

View File

@@ -674,10 +674,12 @@ public class RecoverySystem {
}
try {
if (!rs.allocateSpaceForUpdate(packageFile)) {
rs.clearBcb();
throw new IOException("Failed to allocate space for update "
+ packageFile.getAbsolutePath());
}
} catch (RemoteException e) {
rs.clearBcb();
e.rethrowAsRuntimeException();
}