handle null mScanResult for CTS test
This adds one more assert statement to ensure the ScanResult variable is not null before we proceed. Bug: 27744749 TEST=run cts test without error Change-Id: I48f3c5369792d3a55b594b71250b0dfdf0d5282b
This commit is contained in:
@@ -296,6 +296,8 @@ public class WifiManagerTest extends AndroidTestCase {
|
||||
for (int i = 0; i < WIFI_SCAN_TEST_ITERATIONS; ++i) {
|
||||
startScan();
|
||||
// Make sure at least one AP is found.
|
||||
assertTrue("mScanResult should not be null. This may be due to a scan timeout",
|
||||
mScanResults != null);
|
||||
assertFalse("empty scan results!", mScanResults.isEmpty());
|
||||
long nowMillis = SystemClock.elapsedRealtime();
|
||||
// Keep track of how many APs are fresh in one scan.
|
||||
|
||||
Reference in New Issue
Block a user