summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShikha Panwar <shikhapanwar@google.com>2022-05-24 14:52:20 +0000
committerShikha Panwar <shikhapanwar@google.com>2022-05-24 15:05:43 +0000
commitf8d1e9b23dfbcfd55cdefdc9c925d496bb376ac9 (patch)
treec2132b785a2209cc7781a06da3f3a8e1919bf38d
parent8c6abf187fd1b233a2774b9776640262d0cf54b5 (diff)
downloadsecurity-f8d1e9b23dfbcfd55cdefdc9c925d496bb376ac9.tar.gz
[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() Ignore-AOSP-First: Change is required for correct telemtry from Android T, I will backport this to aosp. Bug: 233740445 Test: build succeds Change-Id: I2d7ce37960c2c0f1adea15bde06d21947668b4a4
-rw-r--r--ondevice-signing/odsign_main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/ondevice-signing/odsign_main.cpp b/ondevice-signing/odsign_main.cpp
index 04679a59..c45e3085 100644
--- a/ondevice-signing/odsign_main.cpp
+++ b/ondevice-signing/odsign_main.cpp
@@ -374,7 +374,11 @@ art::odrefresh::ExitCode CheckCompOsPendingArtifacts(const SigningKey& signing_k
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;