Home
last modified time | relevance | path

Searched refs:mWifiManager (Results 1 – 25 of 25) sorted by relevance

/cts/tests/tests/permission/src/android/permission/cts/
DNoWifiStatePermissionTest.java34 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/
DWifiManagerTest.java69 private WifiManager mWifiManager; field in WifiManagerTest
117 mScanResults = mWifiManager.getScanResults();
168 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
169 assertNotNull(mWifiManager); in setUp()
170 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp()
172 if (!mWifiManager.isWifiEnabled()) in setUp()
177 assertTrue(mWifiManager.isWifiEnabled()); in setUp()
190 if (!mWifiManager.isWifiEnabled()) in tearDown()
200 if (mWifiManager.isWifiEnabled() != enable) { in setWifiEnabled()
246 assertTrue(mWifiManager.startScan()); in startScan()
[all …]
DScanResultTest.java41 private WifiManager mWifiManager; field in ScanResultTest
102 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
103 assertNotNull(mWifiManager); in setUp()
104 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp()
106 if (!mWifiManager.isWifiEnabled()) in setUp()
109 assertTrue(mWifiManager.isWifiEnabled()); in setUp()
122 if (!mWifiManager.isWifiEnabled()) in tearDown()
153 List<ScanResult> scanResults = mWifiManager.getScanResults(); in testScanResultProperties()
166 mWifiManager.startScan(); in scanAndWait()
185 List<ScanResult> scanResults = mWifiManager.getScanResults(); in testScanResultTimeStamp()
[all …]
DWifiInfoTest.java43 private WifiManager mWifiManager; field in WifiInfoTest
81 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
82 assertNotNull(mWifiManager); in setUp()
83 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp()
85 if (!mWifiManager.isWifiEnabled()) in setUp()
88 assertTrue(mWifiManager.isWifiEnabled()); in setUp()
101 if (!mWifiManager.isWifiEnabled()) in tearDown()
128 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in testWifiInfoProperties()
157 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in testWifiInfoProperties()
165 return mWifiManager.getWifiState() == WifiManager.WIFI_STATE_DISABLED; in testWifiInfoProperties()
DWifiConfigurationTest.java29 private WifiManager mWifiManager; field in WifiConfigurationTest
33 mWifiManager = (WifiManager) mContext in setUp()
42 List<WifiConfiguration> wifiConfigurations = mWifiManager.getConfiguredNetworks(); in testWifiConfiguration()
DConcurrencyTest.java74 private WifiManager mWifiManager; field in ConcurrencyTest
137 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
138 assertNotNull(mWifiManager); in setUp()
139 if (mWifiManager.isWifiEnabled()) { in setUp()
143 assertTrue(!mWifiManager.isWifiEnabled()); in setUp()
231 if (!mWifiManager.isWifiEnabled()) { in enableWifi()
284 while (!mWifiManager.isWifiEnabled() && System.currentTimeMillis() < timeout) { in setupWifiP2p()
290 assertTrue(mWifiManager.isWifiEnabled()); in setupWifiP2p()
DWifiEnterpriseConfigTest.java39 private WifiManager mWifiManager; field in WifiEnterpriseConfigTest
693 mWifiManager = (WifiManager) mContext in setUp()
695 assertNotNull(mWifiManager); in setUp()
699 assertTrue(mWifiManager.isWifiEnabled()); in setUp()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DWifiConfigCreator.java61 private final WifiManager mWifiManager; field in WifiConfigCreator
65 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in WifiConfigCreator()
78 int netId = mWifiManager.addNetwork(wifiConf); in addNetwork()
81 mWifiManager.enableNetwork(netId, true); in addNetwork()
103 netId = mWifiManager.addNetwork(conf); in addHttpProxyNetworkVerifyAndRemove()
107 for (final WifiConfiguration w : mWifiManager.getConfiguredNetworks()) { in addHttpProxyNetworkVerifyAndRemove()
122 if (!mWifiManager.removeNetwork(netId)) { in addHttpProxyNetworkVerifyAndRemove()
126 mWifiManager.removeNetwork(netId); in addHttpProxyNetworkVerifyAndRemove()
145 int newNetId = mWifiManager.updateNetwork(conf); in updateNetwork()
148 mWifiManager.saveConfiguration(); in updateNetwork()
[all …]
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DWifiConfigCreator.java61 private final WifiManager mWifiManager; field in WifiConfigCreator
65 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in WifiConfigCreator()
78 int netId = mWifiManager.addNetwork(wifiConf); in addNetwork()
81 mWifiManager.enableNetwork(netId, true); in addNetwork()
103 netId = mWifiManager.addNetwork(conf); in addHttpProxyNetworkVerifyAndRemove()
107 for (final WifiConfiguration w : mWifiManager.getConfiguredNetworks()) { in addHttpProxyNetworkVerifyAndRemove()
122 if (!mWifiManager.removeNetwork(netId)) { in addHttpProxyNetworkVerifyAndRemove()
126 mWifiManager.removeNetwork(netId); in addHttpProxyNetworkVerifyAndRemove()
145 int newNetId = mWifiManager.updateNetwork(conf); in updateNetwork()
148 mWifiManager.saveConfiguration(); in updateNetwork()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DWifiConfigLockdownTest.java49 private WifiManager mWifiManager; field in WifiConfigLockdownTest
55 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in setUp()
69 List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in tearDown()
75 mWifiManager.removeNetwork(config.networkId); in tearDown()
82 List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in testDeviceOwnerCanUpdateConfig()
101 List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in testDeviceOwnerCanRemoveConfig()
106 assertTrue(mWifiManager.removeNetwork(config.networkId)); in testDeviceOwnerCanRemoveConfig()
115 List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in testRegularAppCannotUpdateDeviceOwnerConfig()
128 configs = mWifiManager.getConfiguredNetworks(); in testRegularAppCannotUpdateDeviceOwnerConfig()
141 List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in testRegularAppCannotRemoveDeviceOwnerConfig()
[all …]
/cts/tests/tests/wifi/src/android/net/wifi/rtt/cts/
DTestBase.java56 protected WifiManager mWifiManager; field in TestBase
93 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
94 assertNotNull("Wi-Fi Manager", mWifiManager); in setUp()
95 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp()
97 if (!mWifiManager.isWifiEnabled()) { in setUp()
204 mWifiManager.startScan(); in scanAps()
207 return mWifiManager.getScanResults(); in scanAps()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/wifi/
DTestUtils.java48 private final WifiManager mWifiManager; field in TestUtils
53 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in TestUtils()
76 if (!mWifiManager.startScan()) { in startScanAndWaitForResults()
117 List<ScanResult> scanResults = mWifiManager.getScanResults(); in startScanAndFindAnyOpenNetworkInResults()
139 List<ScanResult> scanResults = mWifiManager.getScanResults(); in findNetworkInScanResultsResults()
161 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in isConnected()
DTestListActivity.java43 private WifiManager mWifiManager; field in TestListActivity
49 mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); in onCreate()
50 if (mWifiManager == null) { in onCreate()
111 if (!mWifiManager.isWifiEnabled() || !locationManager.isLocationEnabled()) { in handleItemClick()
DBaseTestCase.java40 protected WifiManager mWifiManager; field in BaseTestCase
52 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in setUp()
75 mWifiManager = null; in tearDown()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DWifiTest.java54 private WifiManager mWifiManager; field in WifiTest
63 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
64 mWifiEnabled = mWifiManager.isWifiEnabled(); in setUp()
159 if (mWifiManager.isWifiEnabled() == enabled) { in awaitWifiEnabledState()
176 final List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in getNetworkForSsid()
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DConnectivityConstraintTest.java55 private WifiManager mWifiManager; field in ConnectivityConstraintTest
75 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
85 mInitialWiFiState = mWifiManager.isWifiEnabled(); in setUp()
102 if (mWifiManager.isWifiEnabled() != mInitialWiFiState) { in tearDown()
103 setWifiState(mInitialWiFiState, mContext, mCm, mWifiManager); in tearDown()
416 setWifiState(true, mContext, mCm, mWifiManager); in connectToWifi()
424 setWifiState(false, mContext, mCm, mWifiManager); in disconnectFromWifi()
466 if (mHasWifi && mWifiManager.isWifiEnabled()) { in disconnectWifiToConnectToMobile()
DJobThrottlingTest.java84 private WifiManager mWifiManager; field in JobThrottlingTest
136 mWifiManager = mContext.getSystemService(WifiManager.class); in setUp()
139 mInitialWiFiState = mWifiManager.isWifiEnabled(); in setUp()
231 setWifiState(true, mContext, mCm, mWifiManager); in testBackgroundConnectivityJobsThrottled()
332 if (mWifiManager.isWifiEnabled() != mInitialWiFiState) { in tearDown()
333 setWifiState(mInitialWiFiState, mContext, mCm, mWifiManager); in tearDown()
/cts/tests/tests/location/src/android/location/cts/
DEmergencyCallWifiTest.java50 private WifiManager mWifiManager; field in EmergencyCallWifiTest
60 mWifiManager = (WifiManager) mContext.getSystemService(mContext.WIFI_SERVICE); in setUp()
69 mWifiManager.startScan(); in testWifiScan()
99 List <ScanResult> scanResults = mWifiManager.getScanResults(); in onReceive()
/cts/tests/tests/net/util/java/android/net/cts/util/
DCtsNetUtils.java90 private final WifiManager mWifiManager; field in CtsNetUtils
98 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in CtsNetUtils()
149 if (mWifiManager.isWifiEnabled()) { in toggleWifi()
205 SystemUtil.runWithShellPermissionIdentity(() -> mWifiManager.reconnect(), in connectToWifi()
229 for (WifiConfiguration config : mWifiManager.getConfiguredNetworks()) { in clearWifiBlacklist()
230 mWifiManager.enableNetwork(config.networkId, false /* attemptConnect */); in clearWifiBlacklist()
285 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in disconnectFromWifi()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/wifi/testcase/
DNetworkSuggestionTestCase.java145 if (mWifiManager.addNetworkSuggestions(mNetworkSuggestions) in executeTest()
154 if (!mWifiManager.startScan()) { in executeTest()
204 if (mWifiManager.removeNetworkSuggestions(mNetworkSuggestions) in executeTest()
244 mWifiManager.removeNetworkSuggestions(new ArrayList<>()); in tearDown()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/net/
DMultiNetworkConnectivityTestActivity.java189 private WifiManager mWifiManager; field in MultiNetworkConnectivityTestActivity
197 mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); in onCreate()
219 if (!mWifiManager.isWifiEnabled()) { in recordCurrentWifiState()
222 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in recordCurrentWifiState()
250 mWifiManager.enableNetwork(mRecordedWifiConfiguration, true); in restoreOriginalWifiState()
507 List<WifiConfiguration> availableConfigurations = mWifiManager.getConfiguredNetworks(); in getOrAddLegacyNetwork()
513 int newNetwork = mWifiManager.addNetwork(buildWifiConfiguration()); in getOrAddLegacyNetwork()
518 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in isConnectedToExpectedWifiNetwork()
519 DhcpInfo dhcpInfo = mWifiManager.getDhcpInfo(); in isConnectedToExpectedWifiNetwork()
/cts/tests/tests/wifi/src/android/net/wifi/aware/cts/
DSingleDeviceTest.java76 private WifiManager mWifiManager; field in SingleDeviceTest
366 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
367 assertNotNull("Wi-Fi Manager", mWifiManager); in setUp()
368 mWifiLock = mWifiManager.createWifiLock(TAG); in setUp()
370 if (!mWifiManager.isWifiEnabled()) { in setUp()
/cts/tests/app/src/android/app/cts/
DSystemFeaturesTest.java82 private WifiManager mWifiManager; field in SystemFeaturesTest
100 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in setUp()
601 boolean enabled = mWifiManager.isWifiEnabled(); in testWifiFeature()
606 assertEquals(!enabled, mWifiManager.isWifiEnabled()); in testWifiFeature()
/cts/tests/tests/net/src/android/net/cts/
DConnectivityManagerTest.java174 private WifiManager mWifiManager; field in ConnectivityManagerTest
187 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in setUp()
226 mWifiWasDisabled = !mWifiManager.isWifiEnabled(); in ensureWifiConnected()
598 final boolean previousWifiEnabledState = mWifiManager.isWifiEnabled(); in testRequestNetworkCallback_onUnavailable()
760 final String ssid = unquoteSSID(mWifiManager.getConnectionInfo().getSSID()); in testGetMultipathPreference()
774 assertEquals(ssid, unquoteSSID(mWifiManager.getConnectionInfo().getSSID())); in testGetMultipathPreference()
/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/
DVpnTest.java119 private WifiManager mWifiManager; field in VpnTest
148 mWifiManager = (WifiManager) mActivity.getSystemService(Context.WIFI_SERVICE); in setUp()