Merge "[Compos Telemetry] Fix current_artifacts_ok in the pushed atom" into tm-dev am: 7b28cace73

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/security/+/18580936

Change-Id: I2469c38f0d2c374a85b6e38939d2010f7b3cfde4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/ondevice-signing/odsign_main.cpp b/ondevice-signing/odsign_main.cpp
index 04679a5..c45e308 100644
--- a/ondevice-signing/odsign_main.cpp
+++ b/ondevice-signing/odsign_main.cpp
@@ -374,7 +374,11 @@
 
     if (!directoryHasContent(kCompOsPendingArtifactsDir)) {
         // No pending CompOS artifacts, all that matters is the current ones.
-        return checkArtifacts();
+        art::odrefresh::ExitCode odrefresh_status = checkArtifacts();
+        if (odrefresh_status == art::odrefresh::ExitCode::kOkay) {
+            compos_check_record->current_artifacts_ok = true;
+        }
+        return odrefresh_status;
     }
 
     compos_check_record->comp_os_pending_artifacts_exists = true;