summaryrefslogtreecommitdiffstats
path: root/updater/install.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-12-03 09:37:21 +0100
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-12-03 09:37:21 +0100
commitf968a2e9eb5401d82b5a3c2b52a0f628d132ade1 (patch)
tree00311a8f20100fec3626486b7e2a5b55ddbac79c /updater/install.cpp
parentSnap for 4462748 from debdd1732ccc863229134ed14de822da8fad55e4 to pi-release (diff)
parentMerge "Detect interrupted update due to power off" am: d8fadfb606 am: d9caba2bbe (diff)
downloadandroid_bootable_recovery-f968a2e9eb5401d82b5a3c2b52a0f628d132ade1.tar
android_bootable_recovery-f968a2e9eb5401d82b5a3c2b52a0f628d132ade1.tar.gz
android_bootable_recovery-f968a2e9eb5401d82b5a3c2b52a0f628d132ade1.tar.bz2
android_bootable_recovery-f968a2e9eb5401d82b5a3c2b52a0f628d132ade1.tar.lz
android_bootable_recovery-f968a2e9eb5401d82b5a3c2b52a0f628d132ade1.tar.xz
android_bootable_recovery-f968a2e9eb5401d82b5a3c2b52a0f628d132ade1.tar.zst
android_bootable_recovery-f968a2e9eb5401d82b5a3c2b52a0f628d132ade1.zip
Diffstat (limited to 'updater/install.cpp')
-rw-r--r--updater/install.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/updater/install.cpp b/updater/install.cpp
index a111f4b79..870b85791 100644
--- a/updater/install.cpp
+++ b/updater/install.cpp
@@ -569,7 +569,11 @@ Value* ApplyPatchSpaceFn(const char* name, State* state, const std::vector<std::
name, bytes_str.c_str());
}
- return StringValue(CacheSizeCheck(bytes) ? "" : "t");
+ // Skip the cache size check if the update is a retry.
+ if (state->is_retry || CacheSizeCheck(bytes) == 0) {
+ return StringValue("t");
+ }
+ return StringValue("");
}
// apply_patch(src_file, tgt_file, tgt_sha1, tgt_size, patch1_sha1, patch1_blob, [...])