Android: Reset update progress when booted into new version.

In Android we don't reset progress after update completes because if
automatic update is toggled off after that, we will need to revert the
slot switch and still keep the progress.

However if we try to apply the same full update again after booted
into the new version, it will try to resume and fail on verification
because the inactive slot is now the previous version, so we shouldn't
resume in this case.

Bug: 122117961
Test: progress is reset after booted into new version
Change-Id: I394a78fd37bbbdcf62bf85639a9f86e7d3bc42c6
diff --git a/update_attempter_android.cc b/update_attempter_android.cc
index abb4545..a9033b7 100644
--- a/update_attempter_android.cc
+++ b/update_attempter_android.cc
@@ -797,6 +797,11 @@
   metrics_utils::LoadAndReportTimeToReboot(
       metrics_reporter_.get(), prefs_, clock_.get());
   ClearMetricsPrefs();
+
+  // Also reset the update progress if the build version has changed.
+  if (!DeltaPerformer::ResetUpdateProgress(prefs_, false)) {
+    LOG(WARNING) << "Unable to reset the update progress.";
+  }
 }
 
 // Save the update start time. Reset the reboot count and attempt number if the