Skip GnssMeasurement VTS for Android Automotive OS.
According to the Q CDD, an Android Automotive OS device is not required
to support GnssMeasurements.
Bug: 161549048
Test: atest VtsHalGnssV1_0TargetTest VtsHalGnssV2_0TargetTest VtsHalGnssV2_1TargetTest
Change-Id: Idcd59f36ca2ea28925f6766a7abcdf7b6ad0f0ff
diff --git a/gnss/common/utils/vts/Utils.cpp b/gnss/common/utils/vts/Utils.cpp
index 9bf68e6..9c84e80 100644
--- a/gnss/common/utils/vts/Utils.cpp
+++ b/gnss/common/utils/vts/Utils.cpp
@@ -17,6 +17,8 @@
#include <Utils.h>
#include "gtest/gtest.h"
+#include <cutils/properties.h>
+
namespace android {
namespace hardware {
namespace gnss {
@@ -194,6 +196,12 @@
}
}
+bool Utils::isAutomotiveDevice() {
+ char buffer[PROPERTY_VALUE_MAX] = {0};
+ property_get("ro.hardware.type", buffer, "");
+ return strncmp(buffer, "automotive", PROPERTY_VALUE_MAX) == 0;
+}
+
} // namespace common
} // namespace gnss
} // namespace hardware