WifiManagerTest: Use getPrivilegedConfiguredNetworks() in factory reset test
Bug: 152048238 Test: atest android.net.wifi.cts.WifiManagerTest Reproduced the original issue (i.e tests after testFactoryReset failing) with a PSK network on the device & verified that this CL fixes the failures. Change-Id: I56947a78142e971c8da6a1c098ebbd0f1e7d370d
This commit is contained in:
@@ -2166,7 +2166,7 @@ public class WifiManagerTest extends AndroidTestCase {
|
||||
uiAutomation.adoptShellPermissionIdentity();
|
||||
// These below API's only work with privileged permissions (obtained via shell identity
|
||||
// for test)
|
||||
savedNetworks = mWifiManager.getConfiguredNetworks();
|
||||
savedNetworks = mWifiManager.getPrivilegedConfiguredNetworks();
|
||||
|
||||
mWifiManager.factoryReset();
|
||||
// Ensure all the saved networks are removed.
|
||||
|
||||
Reference in New Issue
Block a user