Properly report an error for download action write errors

DownloadAction only terminates the processing pipeline if
DeltaPerformer::Write() return false AND an error code is set. If false
is returned but no error code set, download action stops downloading
more data w/o telling the caller that the update has stopped. To caller
will simply sit their and wait indefinitely for a status update.

Test: th
Bug: 284352074
Change-Id: I20516f7bccf5ea348990100ed557d050fbf8b670
diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
index 3bd131d..a9670cd 100644
--- a/payload_consumer/delta_performer.cc
+++ b/payload_consumer/delta_performer.cc
@@ -753,12 +753,17 @@
     auto generator = partition_update_generator::Create(boot_control_,
                                                         manifest_.block_size());
     std::vector<PartitionUpdate> untouched_static_partitions;
-    TEST_AND_RETURN_FALSE(
-        generator->GenerateOperationsForPartitionsNotInPayload(
+    if (!generator->GenerateOperationsForPartitionsNotInPayload(
             install_plan_->source_slot,
             install_plan_->target_slot,
             touched_partitions,
-            &untouched_static_partitions));
+            &untouched_static_partitions)) {
+      LOG(ERROR)
+          << "Failed to generate operations for partitions not in payload "
+          << android::base::Join(touched_partitions, ", ");
+      *error = ErrorCode::kDownloadStateInitializationError;
+      return false;
+    }
     partitions_.insert(partitions_.end(),
                        untouched_static_partitions.begin(),
                        untouched_static_partitions.end());