/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 | 147 private WifiManager mWifiManager; field in WifiManagerTest 204 mWifiManager = new WifiManager(mContext, mWifiService, mLooper.getLooper()); in setUp() 223 assertTrue(mWifiManager.startSoftAp(mApConfig)); in testStartSoftApCallsServiceWithWifiConfig() 226 assertFalse(mWifiManager.startSoftAp(mApConfig)); in testStartSoftApCallsServiceWithWifiConfig() 236 assertTrue(mWifiManager.startSoftAp(null)); in testStartSoftApCallsServiceWithNullConfig() 239 assertFalse(mWifiManager.startSoftAp(null)); in testStartSoftApCallsServiceWithNullConfig() 248 assertTrue(mWifiManager.stopSoftAp()); in testStopSoftApCallsService() 251 assertFalse(mWifiManager.stopSoftAp()); in testStopSoftApCallsService() 262 assertTrue(mWifiManager.startTetheredHotspot(softApConfig)); in testStartTetheredHotspotCallsServiceWithSoftApConfig() 265 assertFalse(mWifiManager.startTetheredHotspot(softApConfig)); in testStartTetheredHotspotCallsServiceWithSoftApConfig() [all …]
|
/frameworks/opt/net/wifi/libs/WifiTrackerLib/src/com/android/wifitrackerlib/ |
D | PasspointNetworkDetailsTracker.java | 78 mWifiManager.getPasspointConfigurations() in PasspointNetworkDetailsTracker() 85 optionalPasspointConfig.get(), mWifiManager, mWifiNetworkScoreCache, in PasspointNetworkDetailsTracker() 89 mWifiManager.getPrivilegedConfiguredNetworks() in PasspointNetworkDetailsTracker() 97 optionalWifiConfig.get(), mWifiManager, mWifiNetworkScoreCache, in PasspointNetworkDetailsTracker() 108 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in PasspointNetworkDetailsTracker() 109 final Network currentNetwork = mWifiManager.getCurrentNetwork(); in PasspointNetworkDetailsTracker() 113 mWifiManager.getCurrentNetwork())); in PasspointNetworkDetailsTracker() 147 mChosenEntry.updateConnectionInfo(mWifiManager.getConnectionInfo(), mCurrentNetworkInfo); in handleRssiChangedAction() 155 mChosenEntry.updateConnectionInfo(mWifiManager.getConnectionInfo(), mCurrentNetworkInfo); in handleNetworkStateChangedAction() 177 mWifiManager.getAllMatchingWifiConfigs(scanResults); in updatePasspointWifiEntryScans() [all …]
|
D | WifiPickerTracker.java | 190 updateWifiConfigurations(mWifiManager.getPrivilegedConfiguredNetworks()); in handleOnStart() 191 updatePasspointConfigurations(mWifiManager.getPasspointConfigurations()); in handleOnStart() 192 mScanResultUpdater.update(mWifiManager.getScanResults()); in handleOnStart() 194 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in handleOnStart() 195 final Network currentNetwork = mWifiManager.getCurrentNetwork(); in handleOnStart() 231 updateWifiConfigurations(mWifiManager.getPrivilegedConfiguredNetworks()); in handleConfiguredNetworksChangedAction() 233 updatePasspointConfigurations(mWifiManager.getPasspointConfigurations()); in handleConfiguredNetworksChangedAction() 249 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in handleNetworkStateChangedAction() 259 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in handleRssiChangedAction() 377 mWifiManager.isWpa3SaeSupported(), in updateStandardWifiEntryScans() [all …]
|
D | SavedNetworkTracker.java | 128 updateStandardWifiEntryConfigs(mWifiManager.getConfiguredNetworks()); in handleOnStart() 129 updatePasspointWifiEntryConfigs(mWifiManager.getPasspointConfigurations()); in handleOnStart() 164 updateStandardWifiEntryConfigs(mWifiManager.getConfiguredNetworks()); in handleConfiguredNetworksChangedAction() 166 updatePasspointWifiEntryConfigs(mWifiManager.getPasspointConfigurations()); in handleConfiguredNetworksChangedAction() 216 mWifiManager.isWpa3SaeSupported(), in updateStandardWifiEntryScans() 217 mWifiManager.isWpa3SuiteBSupported(), in updateStandardWifiEntryScans() 218 mWifiManager.isEnhancedOpenSupported()); in updateStandardWifiEntryScans() 234 mWifiManager.getAllMatchingWifiConfigs(scanResults); in updatePasspointWifiEntryScans() 265 if (mWifiManager.getWifiState() == WifiManager.WIFI_STATE_DISABLED) { in conditionallyUpdateScanResults() 274 mScanResultUpdater.update(mWifiManager.getScanResults()); in conditionallyUpdateScanResults() [all …]
|
D | StandardNetworkDetailsTracker.java | 77 mChosenEntry = new NetworkRequestEntry(mContext, mMainHandler, key, mWifiManager, in StandardNetworkDetailsTracker() 81 mChosenEntry = new StandardWifiEntry(mContext, mMainHandler, key, mWifiManager, in StandardNetworkDetailsTracker() 87 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in StandardNetworkDetailsTracker() 88 final Network currentNetwork = mWifiManager.getCurrentNetwork(); in StandardNetworkDetailsTracker() 140 mChosenEntry.updateConnectionInfo(mWifiManager.getConnectionInfo(), mCurrentNetworkInfo); in handleNetworkStateChangedAction() 146 mChosenEntry.updateConnectionInfo(mWifiManager.getConnectionInfo(), mCurrentNetworkInfo); in handleRssiChangedAction() 176 if (mWifiManager.getWifiState() == WifiManager.WIFI_STATE_DISABLED) { in conditionallyUpdateScanResults() 197 WifiConfiguration updatedConfig = mWifiManager.getPrivilegedConfiguredNetworks().stream() in conditionallyUpdateConfig() 207 mScanResultUpdater.update(mWifiManager.getScanResults().stream() in cacheNewScanResults()
|
D | BaseWifiTracker.java | 101 if (mWifiManager.getWifiState() == WifiManager.WIFI_STATE_ENABLED) { 109 mNetworkScoreManager.requestScores(mWifiManager.getScanResults().stream() 127 protected final WifiManager mWifiManager; field in BaseWifiTracker 184 mWifiManager = wifiManager; in BaseWifiTracker() 204 sVerboseLogging = mWifiManager.isVerboseLoggingEnabled(); in BaseWifiTracker() 227 if (mWifiManager.getWifiState() == WifiManager.WIFI_STATE_ENABLED) { in onStart() 260 return mWifiManager.getWifiState(); in getWifiState() 365 if (mWifiManager.startScan()) { in postScan()
|
D | PasspointWifiEntry.java | 281 final String[] factoryMacs = mWifiManager.getFactoryMacAddresses(); in getMacAddress() 343 mWifiManager.connect(mWifiConfig, new ConnectActionListener()); in connect() 362 mWifiManager.disableEphemeralNetwork(mWifiConfig.FQDN); in disconnect() 363 mWifiManager.disconnect(); in disconnect() 379 mWifiManager.removePasspointConfiguration(mPasspointConfig.getHomeSp().getFqdn()); in forget() 439 mWifiManager.setPasspointMeteredOverride(mPasspointConfig.getHomeSp().getFqdn(), in setMeteredChoice() 465 mWifiManager.setMacRandomizationSettingPasspointEnabled( in setPrivacy() 488 mWifiManager.allowAutojoin(mWifiConfig.networkId, enabled); in setAutoJoinEnabled() 492 mWifiManager.allowAutojoinPasspoint(mPasspointConfig.getHomeSp().getFqdn(), enabled); in setAutoJoinEnabled() 556 ? mWifiManager.calculateSignalLevel(bestScanResult.level) in updateScanResultInfo()
|
D | OsuWifiEntry.java | 158 mWifiManager.startSubscriptionProvisioning(mOsuProvider, mContext.getMainExecutor(), in connect() 272 ? mWifiManager.calculateSignalLevel(bestScanResult.level) in updateScanResultInfo() 360 PasspointConfiguration passpointConfig = mWifiManager in onProvisioningComplete() 372 mWifiManager.getAllMatchingWifiConfigs(mWifiManager.getScanResults())) { in onProvisioningComplete() 388 mWifiManager.connect(config, null /* ActionListener */); in onProvisioningComplete()
|
D | StandardWifiEntry.java | 313 final String[] factoryMacs = mWifiManager.getFactoryMacAddresses(); in getMacAddress() 373 mWifiManager.connect(mWifiConfig.networkId, new ConnectActionListener()); in connect() 389 mWifiManager.connect(connectConfig, new ConnectActionListener()); in connect() 417 mWifiManager.disableEphemeralNetwork(mWifiConfig.SSID); in disconnect() 418 mWifiManager.disconnect(); in disconnect() 431 mWifiManager.forget(mWifiConfig.networkId, new ForgetActionListener()); in forget() 448 .startCaptivePortalApp(mWifiManager.getCurrentNetwork()); in signIn() 484 if (!mWifiManager.isEasyConnectSupported()) { in canEasyConnect() 530 mWifiManager.save(mWifiConfig, null /* listener */); in setMeteredChoice() 557 mWifiManager.save(mWifiConfig, null /* listener */); in setPrivacy() [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 | 82 @Mock WifiManager mWifiManager; field in OsuNetworkConnectionTest 91 doReturn(mWifiManager).when(mContext) in setUp() 95 when(mWifiManager.isWifiEnabled()).thenReturn(true); in setUp() 96 when(mWifiManager.enableNetwork(TEST_NETWORK_ID, true)).thenReturn(true); in setUp() 97 when(mWifiManager.addNetwork(any(WifiConfiguration.class))).thenReturn(TEST_NETWORK_ID); in setUp() 98 when(mWifiManager.getConnectionInfo()).thenReturn(mWifiInfo); in setUp() 130 verify(mWifiManager).isWifiEnabled(); in verifyBroadcastIntentRegistration() 141 when(mWifiManager.isWifiEnabled()).thenReturn(false); in verifyWifiStateCallbacks() 168 when(mWifiManager.isWifiEnabled()).thenReturn(false); in verifyNetworkConnectionWhenWifiIsDisabled() 179 when(mWifiManager.addNetwork(any(WifiConfiguration.class))).thenReturn(-1); in verifyNetworkConnectionWhenAddNetworkFails() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/ |
D | WifiStatusTracker.java | 46 private final WifiManager mWifiManager; field in WifiStatusTracker 112 mWifiManager = wifiManager; in WifiStatusTracker() 141 if (mWifiManager == null) { in fetchInitialState() 151 mWifiInfo = mWifiManager.getConnectionInfo(); in fetchInitialState() 166 if (mWifiManager == null) { in handleBroadcast() 180 mWifiInfo = mWifiManager.getConnectionInfo(); in handleBroadcast() 200 state = mWifiManager.getWifiState(); in updateWifiState() 206 level = mWifiManager.calculateSignalLevel(rssi); in updateRssi() 218 final Network currentWifiNetwork = mWifiManager.getCurrentNetwork(); in updateStatusLabel() 226 mWifiManager.getCurrentNetwork()); in updateStatusLabel() [all …]
|
D | WifiTracker.java | 123 private final WifiManager mWifiManager; field in WifiTracker 233 mWifiManager = wifiManager; in WifiTracker() 238 sVerboseLogging = mWifiManager != null && mWifiManager.isVerboseLoggingEnabled(); in WifiTracker() 363 mLastInfo = mWifiManager.getConnectionInfo(); in forceUpdate() 364 mLastNetworkInfo = mConnectivityManager.getNetworkInfo(mWifiManager.getCurrentNetwork()); in forceUpdate() 439 return mWifiManager; in getManager() 443 return mWifiManager != null && mWifiManager.isWifiEnabled(); in isWifiEnabled() 453 return WifiSavedConfigUtils.getAllConfigs(mContext, mWifiManager).size(); in getNumSavedNetworks() 543 List<ScanResult> newScanResults = mWifiManager.getScanResults(); in fetchScansAndConfigsAndUpdateAccessPoints() 553 List<WifiConfiguration> configs = mWifiManager.getConfiguredNetworks(); in fetchScansAndConfigsAndUpdateAccessPoints() [all …]
|
/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/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/ |
D | OsuNetworkConnection.java | 49 private WifiManager mWifiManager; field in OsuNetworkConnection 120 mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in init() 122 mWifiEnabled = mWifiManager.isWifiEnabled(); in init() 142 mWifiManager.removeNetwork(mNetworkId); in disconnectIfNeeded() 203 mNetworkId = mWifiManager.addNetwork(config); in connect() 221 if (!mWifiManager.enableNetwork(mNetworkId, true)) { in connect() 245 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in onAvailable()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | HotspotControllerImplTest.java | 62 private WifiManager mWifiManager; field in HotspotControllerImplTest 81 mContext.addMockSystemService(WifiManager.class, mWifiManager); in setUp() 93 }).when(mWifiManager).registerSoftApCallback(any(Executor.class), in setUp() 108 verify(mWifiManager, times(1)).registerSoftApCallback(any(), eq(mController)); in testAddingTwoCallbacksRegistersToWifiManagerOnce() 130 verify(mWifiManager, times(1)).unregisterSoftApCallback(mController); in testRemovingTwoCallbacksUnegistersToWifiManagerOnce() 138 verify(mWifiManager, never()).unregisterSoftApCallback(any()); in testDoNotUnregisterIfRemainingCallbacks()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ |
D | WifiMacAddressPreferenceControllerTest.java | 58 private WifiManager mWifiManager; field in WifiMacAddressPreferenceControllerTest 77 doReturn(mWifiManager).when(mContext).getSystemService(WifiManager.class); in setUp() 78 doReturn(mWifiInfo).when(mWifiManager).getConnectionInfo(); in setUp() 111 doReturn(null).when(mWifiManager).getFactoryMacAddresses(); in updateConnectivity_null_setMacUnavailable() 120 doReturn(macAddresses).when(mWifiManager).getFactoryMacAddresses(); in updateConnectivity_validMac_setValidMac()
|
/frameworks/opt/tv/tvsystem/java/com/android/libraries/tv/tvsystem/wifi/ |
D | TvWifiManager.java | 38 private final WifiManager mWifiManager; field in TvWifiManager 41 mWifiManager = context.getSystemService(WifiManager.class); in TvWifiManager() 73 mWifiManager.startLocalOnlyHotspot(frameworkConfig, executor, callback); in startLocalOnlyHotspot()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | HotspotControllerImpl.java | 56 private final WifiManager mWifiManager; field in HotspotControllerImpl 96 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in HotspotControllerImpl() 151 if (mWifiManager != null) { in addCallback() 153 mWifiManager.registerSoftApCallback(new HandlerExecutor(mMainHandler), this); in addCallback() 171 if (mCallbacks.isEmpty() && mWifiManager != null) { in removeCallback() 172 mWifiManager.unregisterSoftApCallback(this); in removeCallback()
|
/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() 86 final String[] macAddresses = mWifiManager.getFactoryMacAddresses(); in updateConnectivity()
|
/frameworks/base/packages/OsuLogin/src/com/android/hotspot2/osulogin/ |
D | OsuLoginActivity.java | 60 private WifiManager mWifiManager; field in OsuLoginActivity 74 mWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE); in onCreate() 75 if (mWifiManager == null) { in onCreate() 209 if (mWifiManager != null && mForceDisconnect) { in onDestroy() 210 mWifiManager.disconnect(); in onDestroy() 211 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()
|
/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 | 119 private WifiManager mWifiManager = null; field in BatteryExternalStatsWorker 413 if (mWifiManager == null && ServiceManager.getService(Context.WIFI_SERVICE) != null) { in updateExternalStatsLocked() 418 mWifiManager = mContext.getSystemService(WifiManager.class); in updateExternalStatsLocked() 422 if (mWifiManager != null && mWifiManager.isEnhancedPowerReportingSupported()) { in updateExternalStatsLocked() 424 mWifiManager.getWifiActivityEnergyInfoAsync( in updateExternalStatsLocked()
|