wifi(vts): Precondition AP tests on existence of hostapd HAL

cp: aosp/1428863 to sc-v2-dev branch as b/202788915 mentioned

This used to be present on the old host side VTS tests, port the feature to
target side since host side VTS tests are deprecated.

Also,
i) Added a separate test: VtsHalWifiV1_4TargetTest to test the wifi
chip methods. Putting them in VtsHalWifiApV1_4TargetTest will prevent
these from running on devices without AP feature.
ii) Ensured all the non-NAN, non-RTT tests disable framework for
testing. NAN/RTT tests uses framework to check if the corresponding
package manager feature exists.

Bug: 166529516
Bug: 202788915
Test: atest \
VtsHalWifiApV1_0TargetTest \
VtsHalWifiApV1_4TargetTest \
VtsHalWifiV1_0TargetTest \
VtsHalWifiV1_4TargetTest

Change-Id: I05aab6992277601633a0f926a8262c4c27402e93
Merged-In: I05aab6992277601633a0f926a8262c4c27402e93
diff --git a/wifi/1.4/vts/functional/Android.bp b/wifi/1.4/vts/functional/Android.bp
index 14ebbe3..f86869b 100644
--- a/wifi/1.4/vts/functional/Android.bp
+++ b/wifi/1.4/vts/functional/Android.bp
@@ -14,7 +14,6 @@
 // limitations under the License.
 //
 
-// SoftAP-specific tests, similar to VtsHalWifiApV1_0TargetTest.
 package {
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
@@ -25,10 +24,9 @@
 }
 
 cc_test {
-    name: "VtsHalWifiApV1_4TargetTest",
+    name: "VtsHalWifiV1_4TargetTest",
     defaults: ["VtsHalTargetTestDefaults"],
     srcs: [
-        "wifi_ap_iface_hidl_test.cpp",
         "wifi_chip_hidl_test.cpp",
     ],
     static_libs: [
@@ -46,6 +44,30 @@
     ],
 }
 
+// SoftAP-specific tests, similar to VtsHalWifiApV1_0TargetTest.
+cc_test {
+    name: "VtsHalWifiApV1_4TargetTest",
+    defaults: ["VtsHalTargetTestDefaults"],
+    srcs: [
+        "wifi_ap_iface_hidl_test.cpp",
+    ],
+    static_libs: [
+        "VtsHalWifiV1_0TargetTestUtil",
+        "android.hardware.wifi@1.0",
+        "android.hardware.wifi@1.1",
+        "android.hardware.wifi@1.2",
+        "android.hardware.wifi@1.3",
+        "android.hardware.wifi@1.4",
+        "android.hardware.wifi.hostapd@1.0",
+        "libwifi-system-iface",
+    ],
+    disable_framework: true,
+    test_suites: [
+        "general-tests",
+        "vts",
+    ],
+}
+
 // These tests are split out so that they can be conditioned on presence of the
 // "android.hardware.wifi.aware" feature.
 cc_test {