Merge "WifiManagerTest: check softap mode supported" into oc-dev am: a2283cd312
am: 88d9f08c93
Change-Id: Idce7f7beeadb227dc4ec0855c3534acd2e8a8a6d
diff --git a/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java b/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java
index b1e9e30..f667015 100644
--- a/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java
+++ b/tests/cts/net/src/android/net/wifi/cts/WifiManagerTest.java
@@ -789,6 +789,11 @@
* Note: Location mode must be enabled for this test.
*/
public void testStartLocalOnlyHotspotSuccess() {
+ // first check that softap mode is supported by the device
+ if (!mWifiManager.isPortableHotspotSupported()) {
+ return;
+ }
+
boolean wifiEnabled = mWifiManager.isWifiEnabled();
TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot();
@@ -809,6 +814,11 @@
* Note: Location mode must be enabled for this test.
*/
public void testSetWifiEnabledByAppDoesNotStopHotspot() {
+ // first check that softap mode is supported by the device
+ if (!mWifiManager.isPortableHotspotSupported()) {
+ return;
+ }
+
boolean wifiEnabled = mWifiManager.isWifiEnabled();
TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot();
@@ -828,6 +838,11 @@
* Note: Location mode must be enabled for this test.
*/
public void testStartLocalOnlyHotspotSingleRequestByApps() {
+ // first check that softap mode is supported by the device
+ if (!mWifiManager.isPortableHotspotSupported()) {
+ return;
+ }
+
boolean caughtException = false;
boolean wifiEnabled = mWifiManager.isWifiEnabled();