postinstall: fixed postinst_action_progress is NaN

If no postinstall is defined, total_weight_ is 0.
When total_weight_ is 0, the result of division is NaN.
The NaN is set to postinst_action_progress, and update_engine
sends the NaN for other software(ex. application) by callback.
The software might show the NaN value on screen as decimal
fraction(double).
Update_engine should not send NaN in this case.

Bug: 78199138
Test: manual - Create update.zip with AB_OTA_POSTINSTALL_CONFIG=(null)
      Then, Run ./update_device.py --file update.zip,
      and check log

Change-Id: I1ab5e607bc6598262c47b58b2fe7415195d913a4
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index cedecda..b6af131 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -264,7 +264,7 @@
 void PostinstallRunnerAction::ReportProgress(double frac) {
   if (!delegate_)
     return;
-  if (current_partition_ >= partition_weight_.size()) {
+  if (current_partition_ >= partition_weight_.size() || total_weight_ == 0) {
     delegate_->ProgressUpdate(1.);
     return;
   }