Skip WifiManager tests if WiFi is not supported
am: d4c2d2aca3
Change-Id: I4cfce4978ad5a5ab228fdac78ec72259c334f3ec
This commit is contained in:
@@ -801,7 +801,11 @@ public class WifiManagerTest extends AndroidTestCase {
|
|||||||
* Note: Location mode must be enabled for this test.
|
* Note: Location mode must be enabled for this test.
|
||||||
*/
|
*/
|
||||||
public void testStartLocalOnlyHotspotSuccess() {
|
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()) {
|
if (!mWifiManager.isPortableHotspotSupported()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -826,7 +830,11 @@ public class WifiManagerTest extends AndroidTestCase {
|
|||||||
* Note: Location mode must be enabled for this test.
|
* Note: Location mode must be enabled for this test.
|
||||||
*/
|
*/
|
||||||
public void testSetWifiEnabledByAppDoesNotStopHotspot() {
|
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()) {
|
if (!mWifiManager.isPortableHotspotSupported()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -850,7 +858,11 @@ public class WifiManagerTest extends AndroidTestCase {
|
|||||||
* Note: Location mode must be enabled for this test.
|
* Note: Location mode must be enabled for this test.
|
||||||
*/
|
*/
|
||||||
public void testStartLocalOnlyHotspotSingleRequestByApps() {
|
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()) {
|
if (!mWifiManager.isPortableHotspotSupported()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user