Home
last modified time | relevance | path

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

12

/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/unit/
DWifiClientTest.java40 private WifiManager mWifiManager; field in WifiClientTest
100 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
101 mWifiManager.setWifiEnabled(true); in setUp()
102 assertNotNull(mWifiManager); in setUp()
121 int netId = mWifiManager.addNetwork(config); in testAddRemoveNetwork()
125 List<WifiConfiguration> configList = mWifiManager.getConfiguredNetworks(); in testAddRemoveNetwork()
135 boolean ret = mWifiManager.removeNetwork(netId); in testAddRemoveNetwork()
139 configList = mWifiManager.getConfiguredNetworks(); in testAddRemoveNetwork()
158 int netId = mWifiManager.addNetwork(config); in testEnableDisableNetwork()
162 boolean ret = mWifiManager.enableNetwork(netId, true); in testEnableDisableNetwork()
[all …]
/frameworks/base/wifi/tests/src/android/net/wifi/
DWifiManagerTest.java117 private WifiManager mWifiManager; field in WifiManagerTest
131 mWifiManager = new WifiManager(mContext, mWifiService, mLooper.getLooper()); in setUp()
142 assertTrue(mWifiManager.startSoftAp(mApConfig)); in testStartSoftApCallsServiceWithWifiConfig()
145 assertFalse(mWifiManager.startSoftAp(mApConfig)); in testStartSoftApCallsServiceWithWifiConfig()
155 assertTrue(mWifiManager.startSoftAp(null)); in testStartSoftApCallsServiceWithNullConfig()
158 assertFalse(mWifiManager.startSoftAp(null)); in testStartSoftApCallsServiceWithNullConfig()
167 assertTrue(mWifiManager.stopSoftAp()); in testStopSoftApCallsService()
170 assertFalse(mWifiManager.stopSoftAp()); in testStopSoftApCallsService()
182 mWifiManager.startLocalOnlyHotspot(callback, mHandler); in testCreationAndCloseOfLocalOnlyHotspotReservation()
184 callback.onStarted(mWifiManager.new LocalOnlyHotspotReservation(mApConfig)); in testCreationAndCloseOfLocalOnlyHotspotReservation()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DConnectivityManagerTestBase.java80 public WifiManager mWifiManager; field in ConnectivityManagerTestBase
115 mLastScanResult = mWifiManager.getScanResults(); in onReceive()
130 mWifiManager =(WifiManager)mContext.getSystemService(Context.WIFI_SERVICE); in setUp()
175 int state = mWifiManager.getWifiState(); in waitForWifiState()
194 int state = mWifiManager.getWifiApState(); in waitForWifiApState()
254 return mWifiManager.setWifiEnabled(true); in enableWifi()
329 if (!mWifiManager.isWifiEnabled()) { in connectToWifiWithConfiguration()
331 mWifiManager.setWifiEnabled(true); in connectToWifiWithConfiguration()
340 mWifiManager.connect(config, in connectToWifiWithConfiguration()
359 if (!mWifiManager.isWifiEnabled()) { in disconnectAP()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DOsuNetworkConnectionTest.java80 @Mock WifiManager mWifiManager; field in OsuNetworkConnectionTest
89 doReturn(mWifiManager).when(mContext) in setUp()
93 when(mWifiManager.isWifiEnabled()).thenReturn(true); in setUp()
94 when(mWifiManager.enableNetwork(TEST_NETWORK_ID, true)).thenReturn(true); in setUp()
95 when(mWifiManager.addNetwork(any(WifiConfiguration.class))).thenReturn(TEST_NETWORK_ID); in setUp()
96 when(mWifiManager.getConnectionInfo()).thenReturn(mWifiInfo); in setUp()
128 verify(mWifiManager).isWifiEnabled(); in verifyBroadcastIntentRegistration()
139 when(mWifiManager.isWifiEnabled()).thenReturn(false); in verifyWifiStateCallbacks()
166 when(mWifiManager.isWifiEnabled()).thenReturn(false); in verifyNetworkConnectionWhenWifiIsDisabled()
187 when(mWifiManager.addNetwork(any(WifiConfiguration.class))).thenReturn(-1); in verifyNetworkConnectionWhenAddNetworkFails()
[all …]
DPasspointProvisionerTest.java174 @Mock WifiManager mWifiManager; field in PasspointProvisionerTest
210 when(mWifiManager.isWifiEnabled()).thenReturn(true); in setUp()
220 doReturn(mWifiManager).when(mContext) in setUp()
456 when(mWifiManager.getScanResults()).thenReturn(null); in verifyOsuProviderNotFoundForProvisioning()
496 when(mWifiManager.getScanResults()).thenReturn(scanResults); in verifySelectBestOsuProviderForProvisioning()
915 mWifiManager).addOrUpdatePasspointConfiguration(any(PasspointConfiguration.class)); in verifyHandlingErrorForAddingPasspointConfiguration()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DHotspotControllerImplTest.java56 private WifiManager mWifiManager; field in HotspotControllerImplTest
70 mContext.addMockSystemService(WifiManager.class, mWifiManager); in setUp()
76 }).when(mWifiManager).registerSoftApCallback(any(Executor.class), in setUp()
87 verify(mWifiManager, times(1)).registerSoftApCallback(any(), eq(mController)); in testAddingTwoCallbacksRegistersToWifiManagerOnce()
109 verify(mWifiManager, times(1)).unregisterSoftApCallback(mController); in testRemovingTwoCallbacksUnegistersToWifiManagerOnce()
117 verify(mWifiManager, never()).unregisterSoftApCallback(any()); in testDoNotUnregisterIfRemainingCallbacks()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
DWifiTracker.java114 private final WifiManager mWifiManager; field in WifiTracker
224 mWifiManager = wifiManager; in WifiTracker()
229 sVerboseLogging = mWifiManager != null && (mWifiManager.getVerboseLoggingLevel() > 0); in WifiTracker()
354 mLastInfo = mWifiManager.getConnectionInfo(); in forceUpdate()
355 mLastNetworkInfo = mConnectivityManager.getNetworkInfo(mWifiManager.getCurrentNetwork()); in forceUpdate()
430 return mWifiManager; in getManager()
434 return mWifiManager != null && mWifiManager.isWifiEnabled(); in isWifiEnabled()
444 return WifiSavedConfigUtils.getAllConfigs(mContext, mWifiManager).size(); in getNumSavedNetworks()
535 List<ScanResult> newScanResults = mWifiManager.getScanResults(); in fetchScansAndConfigsAndUpdateAccessPoints()
545 List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in fetchScansAndConfigsAndUpdateAccessPoints()
[all …]
DWifiStatusTracker.java43 private final WifiManager mWifiManager; field in WifiStatusTracker
83 mWifiManager = wifiManager; in WifiStatusTracker()
106 if (mWifiManager == null) { in handleBroadcast()
120 mWifiInfo = mWifiManager.getConnectionInfo(); in handleBroadcast()
140 state = mWifiManager.getWifiState(); in updateWifiState()
158 = mConnectivityManager.getNetworkCapabilities(mWifiManager.getCurrentNetwork()); in updateStatusLabel()
196 List<WifiConfiguration> networks = mWifiManager.getConfiguredNetworks(); in getValidSsid()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DOsuNetworkConnection.java48 private WifiManager mWifiManager; field in OsuNetworkConnection
119 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in init()
121 mWifiEnabled = mWifiManager.isWifiEnabled(); in init()
141 mWifiManager.removeNetwork(mNetworkId); in disconnectIfNeeded()
199 mNetworkId = mWifiManager.addNetwork(config); in connect()
217 if (!mWifiManager.enableNetwork(mNetworkId, true)) { in connect()
241 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in onAvailable()
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/
DConnectionUtil.java76 private WifiManager mWifiManager; field in ConnectionUtil
116 mWifiManager =(WifiManager)mContext.getSystemService(Context.WIFI_SERVICE); in initialize()
129 mWifiManager.setWifiEnabled(true); in wifiTestInit()
554 if (!mWifiManager.isWifiEnabled()) { in connectToWifiWithConfiguration()
556 mWifiManager.setWifiEnabled(true); in connectToWifiWithConfiguration()
566 List<ScanResult> netList = mWifiManager.getScanResults(); in connectToWifiWithConfiguration()
575 mWifiManager.connect(config, new WifiManager.ActionListener() { in connectToWifiWithConfiguration()
591 mWifiManager.startScan(); in connectToWifiWithConfiguration()
607 if ((mWifiManager.getScanResults() == null) || in connectToWifiWithConfiguration()
608 (mWifiManager.getScanResults().size() <= 0)) { in connectToWifiWithConfiguration()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DHotspotControllerImpl.java51 private final WifiManager mWifiManager; field in HotspotControllerImpl
67 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in HotspotControllerImpl()
111 if (mWifiManager != null) { in addCallback()
113 mWifiManager.registerSoftApCallback(new HandlerExecutor(mMainHandler), this); in addCallback()
134 if (mCallbacks.isEmpty() && mWifiManager != null) { in removeCallback()
135 mWifiManager.unregisterSoftApCallback(this); in removeCallback()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/
DWifiMacAddressPreferenceControllerTest.java56 private WifiManager mWifiManager; field in WifiMacAddressPreferenceControllerTest
75 doReturn(mWifiManager).when(mContext).getSystemService(WifiManager.class); in setUp()
76 doReturn(mWifiInfo).when(mWifiManager).getConnectionInfo(); in setUp()
96 doReturn(null).when(mWifiManager).getFactoryMacAddresses(); in updateConnectivity_null_setMacUnavailable()
105 doReturn(macAddresses).when(mWifiManager).getFactoryMacAddresses(); in updateConnectivity_validMac_setValidMac()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/
DAbstractWifiMacAddressPreferenceController.java52 private final WifiManager mWifiManager; field in AbstractWifiMacAddressPreferenceController
56 mWifiManager = context.getSystemService(WifiManager.class); in AbstractWifiMacAddressPreferenceController()
84 final String[] macAddresses = mWifiManager.getFactoryMacAddresses(); in updateConnectivity()
/frameworks/base/packages/OsuLogin/src/com/android/hotspot2/osu/
DOsuLoginActivity.java62 private WifiManager mWifiManager; field in OsuLoginActivity
76 mWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE); in onCreate()
77 if (mWifiManager == null) { in onCreate()
211 if (mWifiManager != null && mForceDisconnect) { in onDestroy()
212 mWifiManager.disconnect(); in onDestroy()
213 mWifiManager = null; in onDestroy()
/frameworks/base/packages/SystemUI/src/com/android/systemui/wifi/
DWifiDebuggingSecondaryUserActivity.java41 private WifiManager mWifiManager; field in WifiDebuggingSecondaryUserActivity
47 mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); in onCreate()
82 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in onReceive()
DWifiDebuggingActivity.java60 private WifiManager mWifiManager; field in WifiDebuggingActivity
74 mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); in onCreate()
153 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in onReceive()
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/
DTetheringTest.java195 @Mock private WifiManager mWifiManager; field in TetheringTest
259 if (Context.WIFI_SERVICE.equals(name)) return mWifiManager; in getSystemService()
548 verify(mWifiManager).registerSoftApCallback(any(), any()); in setUp()
696 verify(mWifiManager).updateInterfaceIpState( in failingLocalOnlyHotspotLegacyApBroadcast()
700 verifyNoMoreInteractions(mWifiManager); in failingLocalOnlyHotspotLegacyApBroadcast()
769 verify(mWifiManager).updateInterfaceIpState( in workingLocalOnlyHotspotEnrichedApBroadcast()
771 verify(mWifiManager).updateInterfaceIpState( in workingLocalOnlyHotspotEnrichedApBroadcast()
773 verifyNoMoreInteractions(mWifiManager); in workingLocalOnlyHotspotEnrichedApBroadcast()
792 verify(mWifiManager, times(3)).updateInterfaceIpState( in workingLocalOnlyHotspotEnrichedApBroadcast()
795 verifyNoMoreInteractions(mWifiManager); in workingLocalOnlyHotspotEnrichedApBroadcast()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DBatteryExternalStatsWorker.java120 private IWifiManager mWifiManager = null; field in BatteryExternalStatsWorker
414 if (mWifiManager == null) { in updateExternalStatsLocked()
415 mWifiManager = IWifiManager.Stub.asInterface(ServiceManager.getService( in updateExternalStatsLocked()
419 if (mWifiManager != null) { in updateExternalStatsLocked()
422 … if ((mWifiManager.getSupportedFeatures() & WIFI_FEATURE_LINK_LAYER_STATS) != 0) { in updateExternalStatsLocked()
424 mWifiManager.requestActivityInfo(wifiReceiver); in updateExternalStatsLocked()
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsBackupAgent.java166 private WifiManager mWifiManager; field in SettingsBackupAgent
177 mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); in onCreate()
846 mWifiManager.restoreSupplicantBackupData(supplicant_bytes, ipconfig_bytes); in restoreSupplicantWifiConfigData()
851 return mWifiManager.getWifiApConfiguration().getBytesForBackup(); in getSoftAPConfiguration()
864 mWifiManager.setWifiApConfiguration(config); in restoreSoftApConfiguration()
868 boolean dualMode = mWifiManager.isDualModeSupported(); in restoreSoftApConfiguration()
869 int storedApBand = mWifiManager.getWifiApConfiguration().apBand; in restoreSoftApConfiguration()
873 mWifiManager.notifyUserOfApBandConversion(); in restoreSoftApConfiguration()
913 return mWifiManager.retrieveBackupData(); in getNewWifiConfigData()
920 mWifiManager.restoreBackupData(bytes); in restoreNewWifiConfigData()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DCarrierTextController.java63 private WifiManager mWifiManager; field in CarrierTextController
163 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in CarrierTextController()
289 || (mWifiManager.isWifiEnabled() in updateCarrierText()
290 && mWifiManager.getConnectionInfo() != null in updateCarrierText()
291 && mWifiManager.getConnectionInfo().getBSSID() != null)) { in updateCarrierText()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkPolicyManagerShellCommand.java36 private final WifiManager mWifiManager; field in NetworkPolicyManagerShellCommand
40 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in NetworkPolicyManagerShellCommand()
329 final List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in listWifiNetworks()
/frameworks/base/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/
DDeviceDiscoveryService.java83 private WifiManager mWifiManager; field in DeviceDiscoveryService
140 mWifiManager = getSystemService(WifiManager.class); in onCreate()
202 mWifiManager.startScan(); in startDiscovery()
488 List<android.net.wifi.ScanResult> scanResults = mWifiManager.getScanResults(); in onReceive()
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DCarrierTextControllerTest.java92 private WifiManager mWifiManager; field in CarrierTextControllerTest
113 mContext.addMockSystemService(WifiManager.class, mWifiManager); in setUp()
354 when(mWifiManager.isWifiEnabled()).thenReturn(true); in mockWifi()
357 when(mWifiManager.getConnectionInfo()).thenReturn(wifiInfo); in mockWifi()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/
DWifiStressTest.java98 if (!mWifiManager.isWifiEnabled()) { in setUp()
159 assertTrue("start scan failed", mWifiManager.startScan()); in testWifiScanning()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DWifiAssociationTest.java67 WifiInfo wi = mWifiManager.getConnectionInfo(); in testWifiAssociation()

12