/cts/tests/tests/permission/src/android/permission/cts/ |
D | NoWifiStatePermissionTest.java | 34 private WifiManager mWifiManager; field in NoWifiStatePermissionTest 39 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in setUp() 40 assertNotNull(mWifiManager); in setUp() 50 mWifiManager.getWifiState(); in testGetWifiState() 64 mWifiManager.getConfiguredNetworks(); in testGetConfiguredNetworks() 78 mWifiManager.getConnectionInfo(); in testGetConnectionInfo() 92 mWifiManager.getScanResults(); in testGetScanResults() 106 mWifiManager.getDhcpInfo(); in testGetDhcpInfo() 120 mWifiManager.disconnect(); in testDisconnect() 134 mWifiManager.reconnect(); in testReconnect() [all …]
|
/cts/tests/tests/wifi/src/android/net/wifi/cts/ |
D | WifiManagerTest.java | 134 private WifiManager mWifiManager; field in WifiManagerTest 202 mScanResults = mWifiManager.getScanResults(); 320 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 323 assertNotNull(mWifiManager); in setUp() 328 () -> mWifiManager.isVerboseLoggingEnabled()); in setUp() 330 () -> mWifiManager.setVerboseLoggingEnabled(true)); in setUp() 333 () -> mWifiManager.isScanThrottleEnabled()); in setUp() 335 () -> mWifiManager.setScanThrottleEnabled(false)); in setUp() 337 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp() 340 if (!mWifiManager.isWifiEnabled()) setWifiEnabled(true); in setUp() [all …]
|
D | EasyConnectStatusCallbackTest.java | 51 private WifiManager mWifiManager; field in EasyConnectStatusCallbackTest 78 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 141 if (!mWifiManager.isEasyConnectSupported()) { in testConfiguratorInitiatorOnFailure() 153 int networkId = mWifiManager.addNetwork(config); in testConfiguratorInitiatorOnFailure() 156 mWifiManager.startEasyConnectAsConfiguratorInitiator(TEST_DPP_URI, networkId, in testConfiguratorInitiatorOnFailure() 162 mWifiManager.removeNetwork(networkId); in testConfiguratorInitiatorOnFailure() 165 mWifiManager.stopEasyConnectSession(); in testConfiguratorInitiatorOnFailure() 181 if (!mWifiManager.isEasyConnectSupported()) { in testEnrolleeInitiatorOnFailure() 189 mWifiManager.startEasyConnectAsEnrolleeInitiator(TEST_DPP_URI, mExecutor, in testEnrolleeInitiatorOnFailure() 197 mWifiManager.stopEasyConnectSession(); in testEnrolleeInitiatorOnFailure() [all …]
|
D | ScanResultTest.java | 47 private WifiManager mWifiManager; field in ScanResultTest 119 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 120 assertThat(mWifiManager).isNotNull(); in setUp() 124 () -> mWifiManager.isVerboseLoggingEnabled()); in setUp() 126 () -> mWifiManager.setVerboseLoggingEnabled(true)); in setUp() 129 () -> mWifiManager.isScanThrottleEnabled()); in setUp() 131 () -> mWifiManager.setScanThrottleEnabled(false)); in setUp() 133 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp() 137 if (!mWifiManager.isWifiEnabled()) setWifiEnabled(true); in setUp() 139 () -> mWifiManager.isWifiEnabled()); in setUp() [all …]
|
D | WifiBackupRestoreTest.java | 96 private WifiManager mWifiManager; field in WifiBackupRestoreTest 109 mWifiManager = mContext.getSystemService(WifiManager.class); in setUp() 110 assertThat(mWifiManager).isNotNull(); in setUp() 114 () -> mWifiManager.isVerboseLoggingEnabled()); in setUp() 116 () -> mWifiManager.setVerboseLoggingEnabled(true)); in setUp() 119 () -> mWifiManager.setScanThrottleEnabled(false)); in setUp() 121 if (!mWifiManager.isWifiEnabled()) setWifiEnabled(true); in setUp() 124 PollingCheck.check("Wifi not enabled", DURATION, () -> mWifiManager.isWifiEnabled()); in setUp() 127 () -> mWifiManager.getPrivilegedConfiguredNetworks()); in setUp() 134 if (!mWifiManager.isWifiEnabled()) setWifiEnabled(true); in tearDown() [all …]
|
D | ConnectedNetworkScorerTest.java | 95 private WifiManager mWifiManager; field in ConnectedNetworkScorerTest 114 mWifiManager = mContext.getSystemService(WifiManager.class); in setUp() 115 assertThat(mWifiManager).isNotNull(); in setUp() 121 () -> mWifiManager.isVerboseLoggingEnabled()); in setUp() 123 () -> mWifiManager.setVerboseLoggingEnabled(true)); in setUp() 126 if (!mWifiManager.isWifiEnabled()) { in setUp() 127 ShellIdentityUtils.invokeWithShellPermissions(() -> mWifiManager.setWifiEnabled(true)); in setUp() 129 PollingCheck.check("Wifi not enabled", TIMEOUT, () -> mWifiManager.isWifiEnabled()); in setUp() 140 () -> mWifiManager.removeAppState(myUid(), mContext.getPackageName())); in setUp() 145 () -> mWifiManager.getConfiguredNetworks()); in setUp() [all …]
|
D | WifiLocationInfoTest.java | 91 private WifiManager mWifiManager; field in WifiLocationInfoTest 101 mWifiManager = mContext.getSystemService(WifiManager.class); in setUp() 102 assertThat(mWifiManager).isNotNull(); in setUp() 108 () -> mWifiManager.isVerboseLoggingEnabled()); in setUp() 110 () -> mWifiManager.setVerboseLoggingEnabled(true)); in setUp() 113 () -> mWifiManager.isScanThrottleEnabled()); in setUp() 115 () -> mWifiManager.setScanThrottleEnabled(false)); in setUp() 118 if (!mWifiManager.isWifiEnabled()) setWifiEnabled(true); in setUp() 119 PollingCheck.check("Wifi not enabled", DURATION_MS, () -> mWifiManager.isWifiEnabled()); in setUp() 123 () -> mWifiManager.getConfiguredNetworks()); in setUp() [all …]
|
D | MultiStaConcurrencyWifiNetworkSpecifierTest.java | 80 private WifiManager mWifiManager; field in MultiStaConcurrencyWifiNetworkSpecifierTest 143 mWifiManager = mContext.getSystemService(WifiManager.class); in setUp() 153 assumeTrue(mWifiManager.isStaConcurrencyForLocalOnlyConnectionsSupported()); in setUp() 164 () -> mWifiManager.removeAppState(myUid(), mContext.getPackageName())); in setUp() 170 () -> mWifiManager.getPrivilegedConfiguredNetworks()); in setUp() 172 TestHelper.findMatchingSavedNetworksWithBssid(mWifiManager, savedNetworks); in setUp() 189 mWifiManager.disableNetwork(savedNetwork.networkId); in setUp() 191 mWifiManager.disconnect(); in setUp() 198 () -> mWifiManager.getConnectionInfo().getNetworkId() == -1); in setUp() 206 for (WifiConfiguration savedNetwork : mWifiManager.getConfiguredNetworks()) { in tearDown() [all …]
|
D | WifiInfoTest.java | 47 private WifiManager mWifiManager; field in WifiInfoTest 92 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 93 assertThat(mWifiManager).isNotNull(); in setUp() 94 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp() 98 if (!mWifiManager.isWifiEnabled()) setWifiEnabled(true); in setUp() 99 PollingCheck.check("Wifi not enabled", DURATION, () -> mWifiManager.isWifiEnabled()); in setUp() 113 if (!mWifiManager.isWifiEnabled()) in tearDown() 141 ShellIdentityUtils.invokeWithShellPermissions(() -> mWifiManager.reconnect()); in testWifiInfoProperties() 146 () -> mWifiManager.getConnectionInfo().getNetworkId() != -1); in testWifiInfoProperties() 149 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in testWifiInfoProperties() [all …]
|
D | MultiStaConcurrencyRestrictedWifiNetworkSuggestionTest.java | 82 private WifiManager mWifiManager; field in MultiStaConcurrencyRestrictedWifiNetworkSuggestionTest 145 mWifiManager = mContext.getSystemService(WifiManager.class); in setUp() 156 assumeTrue(mWifiManager.isStaConcurrencyForRestrictedConnectionsSupported()); in setUp() 166 () -> mWifiManager.removeAppState(myUid(), mContext.getPackageName())); in setUp() 172 () -> mWifiManager.getPrivilegedConfiguredNetworks()); in setUp() 174 TestHelper.findMatchingSavedNetworksWithBssid(mWifiManager, savedNetworks); in setUp() 191 mWifiManager.disableNetwork(savedNetwork.networkId); in setUp() 193 mWifiManager.disconnect(); in setUp() 200 () -> mWifiManager.getConnectionInfo().getNetworkId() == -1); in setUp() 209 for (WifiConfiguration savedNetwork : mWifiManager.getConfiguredNetworks()) { in tearDown() [all …]
|
D | WifiNetworkSpecifierTest.java | 190 private WifiManager mWifiManager; field in WifiNetworkSpecifierTest 279 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in setUp() 292 () -> mWifiManager.removeAppState(myUid(), mContext.getPackageName())); in setUp() 297 disableAllSavedNetworks(mWifiManager); in setUp() 303 () -> mWifiManager.getConnectionInfo().getNetworkId() == -1); in setUp() 316 () -> mWifiManager.removeAppState(myUid(), mContext.getPackageName())); in tearDown() 414 enableAllSavedNetworks(mWifiManager); in testWifiBandInNetworkCallback() 479 enableAllSavedNetworks(mWifiManager); in testEnsureAutoConnectToInternetConnectionOnRelease() 489 disableAllSavedNetworks(mWifiManager); in testEnsureAutoConnectToInternetConnectionOnRelease()
|
D | WifiConfigurationTest.java | 42 private WifiManager mWifiManager; field in WifiConfigurationTest 46 mWifiManager = (WifiManager) mContext in setUp() 55 List<WifiConfiguration> wifiConfigurations = mWifiManager.getConfiguredNetworks(); in testWifiConfiguration()
|
D | TestHelper.java | 73 private final WifiManager mWifiManager; field in TestHelper 85 mWifiManager = context.getSystemService(WifiManager.class); in TestHelper() 279 return mWifiManager.getConnectionInfo(); in getWifiInfo() 341 mWifiManager.connect(network, actionListener); in testConnectionFlowWithConnect() 487 assertThat(mWifiManager.addNetworkSuggestions(Arrays.asList(suggestion))) in testConnectionFlowWithSuggestionInternal() 493 if (!mWifiManager.startScan()) { in testConnectionFlowWithSuggestionInternal() 519 && mWifiManager.isStaConcurrencyForRestrictedConnectionsSupported()) { in testConnectionFlowWithSuggestionInternal() 615 mWifiManager.registerNetworkRequestMatchCallback( in handleUiInteractions() 657 mWifiManager.unregisterNetworkRequestMatchCallback(networkRequestMatchCallback); in handleUiInteractions() 717 if (mWifiManager.isStaConcurrencyForLocalOnlyConnectionsSupported()) { in testConnectionFlowWithSpecifierWithShellIdentity()
|
D | ConcurrencyTest.java | 87 private WifiManager mWifiManager; field in ConcurrencyTest 176 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 177 assertNotNull(mWifiManager); in setUp() 178 if (mWifiManager.isWifiEnabled()) { in setUp() 185 () -> mWifiManager.isVerboseLoggingEnabled()); in setUp() 187 () -> mWifiManager.setVerboseLoggingEnabled(true)); in setUp() 189 assertTrue(!mWifiManager.isWifiEnabled()); in setUp() 210 () -> mWifiManager.setVerboseLoggingEnabled(mWasVerboseLoggingEnabled)); in tearDown() 287 if (!mWifiManager.isWifiEnabled()) { in enableWifi() 350 while (!mWifiManager.isWifiEnabled() && System.currentTimeMillis() < timeout) { in setupWifiP2p() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | WifiNetworkConfigurationWithoutFineLocationPermissionTest.java | 51 if (!mWifiManager.isWifiEnabled()) { in setUp() 55 Log.d(TAG, "Done: " + mWifiManager.isWifiEnabled()); in setUp() 60 assertWithMessage("wifi is enabled").that(mWifiManager.isWifiEnabled()).isTrue(); in testAddAndRetrieveCallerConfiguredNetworks() 72 List<WifiConfiguration> configs = mWifiManager.getCallerConfiguredNetworks(); in testAddAndRetrieveCallerConfiguredNetworks() 78 mWifiManager.removeNetwork(netId); in testAddAndRetrieveCallerConfiguredNetworks() 87 if (mWifiManager.isWifiEnabled()) { in awaitWifiEnabled()
|
D | BaseDeviceOwnerTest.java | 54 protected WifiManager mWifiManager; field in BaseDeviceOwnerTest 76 mWifiManager = TestAppSystemServiceFactory.getWifiManager(mContext, in setUp() 79 mWifiConfigCreator = new WifiConfigCreator(mContext, mWifiManager) { in setUp() 95 Log.v(TAG, "dpm=" + mDevicePolicyManager + ", wifiManager=" + mWifiManager); in setUp()
|
D | WifiConfigLockdownTest.java | 73 mWifiManager.removeNetwork(config.networkId); in tearDown() 108 List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in testDeviceOwnerCanRemoveConfig() 117 if (mWifiManager.getConfiguredNetworks().stream() in testDeviceOwnerCanRemoveConfig() 121 .that(mWifiManager.removeNetwork(config.networkId)).isTrue(); in testDeviceOwnerCanRemoveConfig()
|
/cts/tests/tests/wifi/src/android/net/wifi/rtt/cts/ |
D | TestBase.java | 66 protected WifiManager mWifiManager; field in TestBase 114 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 115 assertNotNull("Wi-Fi Manager", mWifiManager); in setUp() 119 () -> mWifiManager.isVerboseLoggingEnabled()); in setUp() 121 () -> mWifiManager.setVerboseLoggingEnabled(true)); in setUp() 123 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp() 125 if (!mWifiManager.isWifiEnabled()) { in setUp() 150 () -> mWifiManager.setVerboseLoggingEnabled(mWasVerboseLoggingEnabled)); in tearDown() 237 mWifiManager.startScan(); in scanAps() 240 return mWifiManager.getScanResults(); in scanAps()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | WifiTest.java | 54 private WifiManager mWifiManager; field in WifiTest 60 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 61 if (!mWifiManager.isWifiEnabled()) { in setUp() 146 if (mWifiManager.isWifiEnabled() == enabled) { in awaitWifiEnabledState() 163 final List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in getNetworkForSsid()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/wifi/ |
D | TestUtils.java | 52 private final WifiManager mWifiManager; field in TestUtils 57 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in TestUtils() 80 if (!mWifiManager.startScan()) { in startScanAndWaitForResults() 163 List<ScanResult> scanResults = mWifiManager.getScanResults(); in startScanAndFindAnyMatchingNetworkInResults() 185 List<ScanResult> scanResults = mWifiManager.getScanResults(); in findNetworkInScanResultsResults() 207 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in isConnected()
|
D | BaseTestCase.java | 42 protected WifiManager mWifiManager; field in BaseTestCase 57 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in setUp() 80 mWifiManager = null; in tearDown()
|
D | TestListActivity.java | 43 private WifiManager mWifiManager; field in TestListActivity 49 mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); in onCreate() 50 if (mWifiManager == null) { in onCreate() 124 if (!mWifiManager.isWifiEnabled() || !locationManager.isLocationEnabled()) { in handleItemClick()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/wifi/testcase/ |
D | NetworkSuggestionTestCase.java | 241 mWifiManager.addSuggestionConnectionStatusListener( in executeTest() 248 mWifiManager.addSuggestionUserApprovalStatusListener( in executeTest() 267 if (mWifiManager.addNetworkSuggestions(mNetworkSuggestions) in executeTest() 294 List<WifiNetworkSuggestion> retrievedSuggestions = mWifiManager.getNetworkSuggestions(); in executeTest() 303 if (!mWifiManager.startScan()) { in executeTest() 409 if (mWifiManager.addNetworkSuggestions(Arrays.asList(modifiedSuggestion)) in executeTest() 427 if (mWifiManager.removeNetworkSuggestions(mNetworkSuggestions) in executeTest() 472 mWifiManager.removeSuggestionConnectionStatusListener(mConnectionStatusListener); in tearDown() 474 mWifiManager.removeNetworkSuggestions(new ArrayList<>()); in tearDown()
|
/cts/tests/JobScheduler/src/android/jobscheduler/cts/ |
D | ConnectivityConstraintTest.java | 84 private WifiManager mWifiManager; field in ConnectivityConstraintTest 113 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp() 123 mInitialWiFiState = mWifiManager.isWifiEnabled(); in setUp() 124 ensureSavedWifiNetwork(mWifiManager); in setUp() 125 setWifiState(true, mCm, mWifiManager); in setUp() 161 if (mWifiManager.isWifiEnabled() != mInitialWiFiState) { in tearDown() 163 setWifiState(mInitialWiFiState, mCm, mWifiManager); in tearDown() 895 ssid.set(mWifiManager.getConnectionInfo().getSSID()); in getWifiSSID() 922 setWifiState(true, mCm, mWifiManager); in setWifiMeteredState() 942 setWifiState(true, mCm, mWifiManager); in connectToWifi() [all …]
|
D | JobThrottlingTest.java | 115 private WifiManager mWifiManager; field in JobThrottlingTest 173 mWifiManager = mContext.getSystemService(WifiManager.class); in setUp() 176 mInitialWiFiState = mWifiManager.isWifiEnabled(); in setUp() 364 ensureSavedWifiNetwork(mWifiManager); in testBackgroundConnectivityJobsThrottled() 366 setWifiState(true, mCm, mWifiManager); in testBackgroundConnectivityJobsThrottled() 530 ensureSavedWifiNetwork(mWifiManager); in testJobsInRestrictedBucket_WithRequiredNetwork() 568 setWifiState(true, mCm, mWifiManager); in testJobsInRestrictedBucket_WithRequiredNetwork() 873 ensureSavedWifiNetwork(mWifiManager); in testRestrictingStopReason_RestrictedBucket() 884 setWifiState(true, mCm, mWifiManager); in testRestrictingStopReason_RestrictedBucket() 904 setWifiState(true, mCm, mWifiManager); in testRestrictingStopReason_RestrictedBucket() [all …]
|