/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/unit/ |
D | WifiClientTest.java | 40 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/ |
D | WifiManagerTest.java | 117 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/ |
D | ConnectivityManagerTestBase.java | 80 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/ |
D | OsuNetworkConnectionTest.java | 80 @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 …]
|
D | PasspointProvisionerTest.java | 174 @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/ |
D | HotspotControllerImplTest.java | 56 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/ |
D | WifiTracker.java | 114 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 …]
|
D | WifiStatusTracker.java | 43 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/ |
D | OsuNetworkConnection.java | 48 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/ |
D | ConnectionUtil.java | 76 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/ |
D | HotspotControllerImpl.java | 51 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/ |
D | WifiMacAddressPreferenceControllerTest.java | 56 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/ |
D | AbstractWifiMacAddressPreferenceController.java | 52 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/ |
D | OsuLoginActivity.java | 62 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/ |
D | WifiDebuggingSecondaryUserActivity.java | 41 private WifiManager mWifiManager; field in WifiDebuggingSecondaryUserActivity 47 mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); in onCreate() 82 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in onReceive()
|
D | WifiDebuggingActivity.java | 60 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/ |
D | TetheringTest.java | 195 @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/ |
D | BatteryExternalStatsWorker.java | 120 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/ |
D | SettingsBackupAgent.java | 166 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/ |
D | CarrierTextController.java | 63 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/ |
D | NetworkPolicyManagerShellCommand.java | 36 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/ |
D | DeviceDiscoveryService.java | 83 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/ |
D | CarrierTextControllerTest.java | 92 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/ |
D | WifiStressTest.java | 98 if (!mWifiManager.isWifiEnabled()) { in setUp() 159 assertTrue("start scan failed", mWifiManager.startScan()); in testWifiScanning()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
D | WifiAssociationTest.java | 67 WifiInfo wi = mWifiManager.getConnectionInfo(); in testWifiAssociation()
|