vts(wifi): stop framework after getting pm feature list

1. In AndroidTest.xml, do NOT add precondition to stop Android framework
2. Get pm feature list in method "CreateTestCases" with Android framework alive
3. Disable Android framwork in method "setUpClass"
4. Enable Android framework in method "tearDownClass"

Follow these 4 steps, we can run VTS test cases without framework interference
and also can get pm feature list to identify if P2P feature is existed or not

Bug: 122856600
Test: Run VTS tests
vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiSupplicantV1_0Host -l INFO
vts-tradefed run commandAndExit vts-hal --skip-all-system-status-check --primary-abi-only --skip-preconditions --module VtsHalWifiSupplicantV1_1Host -l INFO

Change-Id: I39ccf1940e161da4dca3c3542eb0f76702f7525d
diff --git a/wifi/supplicant/V1_0/host/AndroidTest.xml b/wifi/supplicant/V1_0/host/AndroidTest.xml
index 3f1ddcf..c87df06 100644
--- a/wifi/supplicant/V1_0/host/AndroidTest.xml
+++ b/wifi/supplicant/V1_0/host/AndroidTest.xml
@@ -41,7 +41,6 @@
         <option name="test-case-path" value="vts/testcases/hal/wifi/supplicant/V1_0/host/VtsHalWifiSupplicantV1_0HostTest"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiSupplicantV1_0TargetTest/VtsHalWifiSupplicantV1_0TargetTest" />
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiSupplicantV1_0TargetTest/VtsHalWifiSupplicantV1_0TargetTest" />
-        <option name="binary-test-stop-native-servers" value="true"/>
         <option name="test-timeout" value="10m"/>
     </test>
 </configuration>
diff --git a/wifi/supplicant/V1_0/host/VtsHalWifiSupplicantV1_0HostTest.py b/wifi/supplicant/V1_0/host/VtsHalWifiSupplicantV1_0HostTest.py
index 18e3071..03a0938 100644
--- a/wifi/supplicant/V1_0/host/VtsHalWifiSupplicantV1_0HostTest.py
+++ b/wifi/supplicant/V1_0/host/VtsHalWifiSupplicantV1_0HostTest.py
@@ -27,6 +27,18 @@
 
     WIFI_DIRECT_FEATURE_NAME = "android.hardware.wifi.direct"
 
+    def setUpClass(self):
+        """Disable android framework."""
+        super(VtsHalWifiSupplicantV1_0Host, self).setUpClass()
+        self.dut = self.android_devices[0]
+        self.shell = self.dut.shell
+        self.dut.stop(True)
+
+    def tearDownClass(self):
+        """Enable android framework."""
+        self.dut.start()
+        super(VtsHalWifiSupplicantV1_0Host, self).tearDownClass()
+
     def CreateTestCases(self):
         """Get all registered test components and create test case objects."""
         pm_list = self.shell.Execute("pm list features")
diff --git a/wifi/supplicant/V1_1/host/AndroidTest.xml b/wifi/supplicant/V1_1/host/AndroidTest.xml
index a65b69c..1cfa570 100644
--- a/wifi/supplicant/V1_1/host/AndroidTest.xml
+++ b/wifi/supplicant/V1_1/host/AndroidTest.xml
@@ -32,7 +32,6 @@
         <option name="test-case-path" value="vts/testcases/hal/wifi/supplicant/V1_1/host/VtsHalWifiSupplicantV1_1HostTest"/>
         <option name="binary-test-source" value="_32bit::DATA/nativetest/VtsHalWifiSupplicantV1_1TargetTest/VtsHalWifiSupplicantV1_1TargetTest" />
         <option name="binary-test-source" value="_64bit::DATA/nativetest64/VtsHalWifiSupplicantV1_1TargetTest/VtsHalWifiSupplicantV1_1TargetTest" />
-        <option name="binary-test-stop-native-servers" value="true"/>
         <option name="test-timeout" value="10m"/>
     </test>
 </configuration>
diff --git a/wifi/supplicant/V1_1/host/VtsHalWifiSupplicantV1_1HostTest.py b/wifi/supplicant/V1_1/host/VtsHalWifiSupplicantV1_1HostTest.py
index 8f1fa55..a19581e 100644
--- a/wifi/supplicant/V1_1/host/VtsHalWifiSupplicantV1_1HostTest.py
+++ b/wifi/supplicant/V1_1/host/VtsHalWifiSupplicantV1_1HostTest.py
@@ -27,6 +27,18 @@
 
     WIFI_DIRECT_FEATURE_NAME = "android.hardware.wifi.direct"
 
+    def setUpClass(self):
+        """Disable android framework."""
+        super(VtsHalWifiSupplicantV1_1Host, self).setUpClass()
+        self.dut = self.android_devices[0]
+        self.shell = self.dut.shell
+        self.dut.stop(True)
+
+    def tearDownClass(self):
+        """Enable android framework."""
+        self.dut.start()
+        super(VtsHalWifiSupplicantV1_1Host, self).tearDownClass()
+
     def CreateTestCases(self):
         """Get all registered test components and create test case objects."""
         pm_list = self.shell.Execute("pm list features")