[Compos Telemetry] Fix current_artifacts_ok in the pushed atom

In cases of no pending artifacts exist, current_artifacts_ok is not set
in the pushed atom. Fix this by checking the returned value of
checkArtifacts()

This is upstreaming ag/18580936

Bug: 233740445
Test: build succeds
Merged-In: I2d7ce37960c2c0f1adea15bde06d21947668b4a4

Change-Id: I2d7ce37960c2c0f1adea15bde06d21947668b4a4
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;