Print full build fingerprint after OTA update am: 1302050e68

Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2691188

Change-Id: I0435087747d7cf67d113313b2ffb892fb8c1bd06
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/aosp/update_attempter_android.cc b/aosp/update_attempter_android.cc
index fcb142e..e52f26a 100644
--- a/aosp/update_attempter_android.cc
+++ b/aosp/update_attempter_android.cc
@@ -148,6 +148,12 @@
               : "");
 }
 
+std::string GetCurrentBuildVersion() {
+  // Example: [ro.build.fingerprint]:
+  // [generic/aosp_cf_x86_64_phone/vsoc_x86_64:VanillaIceCream/AOSP.MAIN/user08011303:userdebug/test-keys]
+  return android::base::GetProperty("ro.build.fingerprint", "");
+}
+
 }  // namespace
 
 UpdateAttempterAndroid::UpdateAttempterAndroid(
@@ -1026,8 +1032,7 @@
 
 bool UpdateAttempterAndroid::OTARebootSucceeded() const {
   const auto current_slot = boot_control_->GetCurrentSlot();
-  const string current_version =
-      android::base::GetProperty("ro.build.version.incremental", "");
+  const string current_version = GetCurrentBuildVersion();
   int64_t previous_slot = -1;
   TEST_AND_RETURN_FALSE(prefs_->GetInt64(kPrefsPreviousSlot, &previous_slot));
   string previous_version;
@@ -1080,9 +1085,7 @@
 }
 
 void UpdateAttempterAndroid::UpdateStateAfterReboot(const OTAResult result) {
-  // Example: [ro.build.version.incremental]: [4292972]
-  string current_version =
-      android::base::GetProperty("ro.build.version.incremental", "");
+  const string current_version = GetCurrentBuildVersion();
   TEST_AND_RETURN(!current_version.empty());
 
   // |UpdateStateAfterReboot()| is only called after system reboot, so record