Merge "Add retry in setProp test." into android14-tests-dev
diff --git a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
index 4747f9c..1c52886 100644
--- a/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
+++ b/automotive/vehicle/vts/src/VtsHalAutomotiveVehicle_TargetTest.cpp
@@ -25,6 +25,7 @@
 #include <android-base/stringprintf.h>
 #include <android-base/thread_annotations.h>
 #include <android/binder_process.h>
+#include <android/hardware/automotive/vehicle/2.0/IVehicle.h>
 #include <gtest/gtest.h>
 #include <hidl/GtestPrinter.h>
 #include <hidl/ServiceManagement.h>
@@ -983,7 +984,8 @@
                 .isAidlService = true,
         });
     }
-    for (std::string name : getAllHalInstanceNames(IVehicle::descriptor)) {
+    for (std::string name : getAllHalInstanceNames(
+                 android::hardware::automotive::vehicle::V2_0::IVehicle::descriptor)) {
         descriptors.push_back({
                 .name = name,
                 .isAidlService = false,
diff --git a/staging/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp b/staging/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp
index 3e43f9c..14c5b06 100644
--- a/staging/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp
+++ b/staging/threadnetwork/aidl/vts/VtsHalThreadNetworkTargetTest.cpp
@@ -67,10 +67,33 @@
     }
 
     virtual void TearDown() override { thread_chip->close(); }
+    bool DeviceSupportsFeature(const char* feature);
 
+    static constexpr char kTvFeatureName[] = "android.software.leanback";
     std::shared_ptr<IThreadChip> thread_chip;
 };
 
+bool ThreadNetworkAidl::DeviceSupportsFeature(const char* feature) {
+    bool device_supports_feature = false;
+    FILE* p = popen("pm list features", "re");
+    char* line = nullptr;
+    size_t len = 0;
+
+    if (!p) {
+        return false;
+    }
+
+    while (getline(&line, &len, p) > 0) {
+        if (strstr(line, feature)) {
+            device_supports_feature = true;
+            break;
+        }
+    }
+    pclose(p);
+
+    return device_supports_feature;
+}
+
 TEST_P(ThreadNetworkAidl, Open) {
     std::shared_ptr<ThreadChipCallback> callback =
             ndk::SharedRefBase::make<ThreadChipCallback>([](auto /* data */) {});
@@ -122,6 +145,10 @@
                 }
             });
 
+    if (DeviceSupportsFeature(kTvFeatureName)) {
+        GTEST_SKIP() << "SendSpinelFrame test is bypassed on TV devices";
+    }
+
     ASSERT_NE(callback, nullptr);
 
     EXPECT_TRUE(thread_chip->open(callback).isOk());