Revert "Force PrepareSnapshotPartitionsForUpdate to fail in recovery"
* Causes OTAs to fail to flash on ZenFone 8 in recovery.
Removed patch, flashes fine. Added patch back in,
fails again.
This reverts commit 6847c103e04da0303ce6ca672631e1d9e906ab0f.
Change-Id: I44d4f2064e691b441eb6c072d40e2c3f89b90e49
diff --git a/aosp/dynamic_partition_control_android.cc b/aosp/dynamic_partition_control_android.cc
index f3f2b98..538b57c 100644
--- a/aosp/dynamic_partition_control_android.cc
+++ b/aosp/dynamic_partition_control_android.cc
@@ -921,23 +921,11 @@
return true;
}
-static bool IsIncrementalUpdate(const DeltaArchiveManifest& manifest) {
- const auto& partitions = manifest.partitions();
- return std::any_of(partitions.begin(), partitions.end(), [](const auto& p) {
- return p.has_old_partition_info();
- });
-}
-
bool DynamicPartitionControlAndroid::PrepareSnapshotPartitionsForUpdate(
uint32_t source_slot,
uint32_t target_slot,
const DeltaArchiveManifest& manifest,
uint64_t* required_size) {
- if (IsRecovery()) {
- if (!IsIncrementalUpdate(manifest)) {
- return false;
- }
- }
TEST_AND_RETURN_FALSE(ExpectMetadataMounted());
std::string device_dir_str;
@@ -1244,6 +1232,13 @@
return constants::kIsRecovery;
}
+static bool IsIncrementalUpdate(const DeltaArchiveManifest& manifest) {
+ const auto& partitions = manifest.partitions();
+ return std::any_of(partitions.begin(), partitions.end(), [](const auto& p) {
+ return p.has_old_partition_info();
+ });
+}
+
bool DynamicPartitionControlAndroid::DeleteSourcePartitions(
MetadataBuilder* builder,
uint32_t source_slot,