Remove kTempHidlSupport to stop supporting HIDL in 202404
Test: launch_cvd
Test: atest vts_treble_vintf_framework_test vts_treble_no_hidl
Test: atest vts_treble_vintf_vendor_test
Bug: 218588089
Merged-In: I0f2dd742ec3a3fb9bff1bfd4f2200d6d6640f0e1
Change-Id: I4e2fa32e4c0b10338a5b473ef7d0cf2e89106e96
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index 8867f53..8807898 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -222,13 +222,13 @@
return false;
}
#ifdef __ANDROID__
- // TODO(b/218588089) remove this temporary support variable once Cuttlefish
- // (the only current Android V launching device) no longer requires HIDL.
- constexpr bool kTempHidlSupport = true;
static const char* kVendorApiProperty = "ro.vendor.api_level";
// HIDL and hwservicemanager are not supported in Android V+
- return android::base::GetIntProperty(kVendorApiProperty, 0) < __ANDROID_API_V__ ||
- kTempHidlSupport;
+ // This is also set with `max-level="8"` in the framework manifest fragment
+ // for android.hidl.manager. We don't check for android.hidl.manager to be
+ // declared through defaultServiceManager1_2() because the fake
+ // servicemaanger will say it is declared.
+ return android::base::GetIntProperty(kVendorApiProperty, 0) < __ANDROID_API_V__;
#else
// No access to properties and no requirement for dropping HIDL support if
// this isn't Android