Skip WifiManager tests if WiFi is not supported am: d4c2d2aca3

am: 68842e0e90

Change-Id: Ief127a3284c7ff8c3e1d32dce33c4a720e6f1e2b
This commit is contained in:
Bjoern Johansson
2017-08-23 18:18:52 +00:00
committed by android-build-merger

View File

@@ -801,7 +801,11 @@ public class WifiManagerTest extends AndroidTestCase {
* Note: Location mode must be enabled for this test.
*/
public void testStartLocalOnlyHotspotSuccess() {
// first check that softap mode is supported by the device
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
return;
}
// check that softap mode is supported by the device
if (!mWifiManager.isPortableHotspotSupported()) {
return;
}
@@ -826,7 +830,11 @@ public class WifiManagerTest extends AndroidTestCase {
* Note: Location mode must be enabled for this test.
*/
public void testSetWifiEnabledByAppDoesNotStopHotspot() {
// first check that softap mode is supported by the device
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
return;
}
// check that softap mode is supported by the device
if (!mWifiManager.isPortableHotspotSupported()) {
return;
}
@@ -850,7 +858,11 @@ public class WifiManagerTest extends AndroidTestCase {
* Note: Location mode must be enabled for this test.
*/
public void testStartLocalOnlyHotspotSingleRequestByApps() {
// first check that softap mode is supported by the device
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
return;
}
// check that softap mode is supported by the device
if (!mWifiManager.isPortableHotspotSupported()) {
return;
}