/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/tether/ |
D | WifiTetherApBandPreferenceControllerTest.java | 55 private WifiManager mWifiManager; field in WifiTetherApBandPreferenceControllerTest 69 when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager); in setUp() 77 when(mWifiManager.getWifiApConfiguration()).thenReturn(new WifiConfiguration()); in setUp() 78 when(mWifiManager.isDualModeSupported()).thenReturn(false); in setUp() 85 when(mWifiManager.getCountryCode()).thenReturn("US"); in display_5GhzSupported_shouldDisplayFullList() 86 when(mWifiManager.isDualBandSupported()).thenReturn(true); in display_5GhzSupported_shouldDisplayFullList() 87 when(mWifiManager.isDualModeSupported()).thenReturn(true); in display_5GhzSupported_shouldDisplayFullList() 97 when(mWifiManager.getCountryCode()).thenReturn(null); in display_noCountryCode_shouldDisable() 98 when(mWifiManager.isDualBandSupported()).thenReturn(true); in display_noCountryCode_shouldDisable() 109 when(mWifiManager.getCountryCode()).thenReturn("US"); in display_5GhzNotSupported_shouldDisable() [all …]
|
D | WifiTetherSSIDPreferenceControllerTest.java | 53 private WifiManager mWifiManager; field in WifiTetherSSIDPreferenceControllerTest 67 when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager); in setUp() 79 when(mWifiManager.getWifiApConfiguration()).thenReturn(null); in displayPreference_noWifiConfig_shouldDisplayDefaultSSID() 90 when(mWifiManager.getWifiApConfiguration()).thenReturn(config); in displayPreference_hasCustomWifiConfig_shouldDisplayCustomSSID() 118 when(mWifiManager.getWifiApConfiguration()).thenReturn(config); in updateDisplay_shouldUpdateValue() 128 when(mWifiManager.isWifiApEnabled()).thenReturn(false); in displayPreference_wifiApDisabled_shouldHideQrCodeIcon() 132 when(mWifiManager.getWifiApConfiguration()).thenReturn(config); in displayPreference_wifiApDisabled_shouldHideQrCodeIcon() 140 when(mWifiManager.isWifiApEnabled()).thenReturn(true); in displayPreference_wifiApEnabled_shouldShowQrCodeIcon() 144 when(mWifiManager.getWifiApConfiguration()).thenReturn(config); in displayPreference_wifiApEnabled_shouldShowQrCodeIcon()
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | AddWifiNetworkTaskTest.java | 73 @Mock private WifiManager mWifiManager; field in AddWifiNetworkTaskTest 89 when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager); in setUp() 131 when(mWifiManager.isWifiEnabled()).thenReturn(false); in testFailToEnableWifi() 134 when(mWifiManager.setWifiEnabled(true)).thenReturn(false); in testFailToEnableWifi() 150 when(mWifiManager.isWifiEnabled()).thenReturn(true); in testIsConnectedToSpecifiedWifiTrue() 156 when(mWifiManager.getConnectionInfo()).thenReturn(mWifiInfo); in testIsConnectedToSpecifiedWifiTrue() 173 when(mWifiManager.isWifiEnabled()).thenReturn(true); in testNoWifiInfoInProvider() 179 when(mWifiManager.getConnectionInfo()).thenReturn(mWifiInfo); in testNoWifiInfoInProvider() 201 when(mWifiManager.isWifiEnabled()).thenReturn(true); in testFailingAddingNetwork() 207 when(mWifiManager.getConnectionInfo()).thenReturn(mWifiInfo); in testFailingAddingNetwork() [all …]
|
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/ |
D | CarWifiManager.java | 41 private WifiManager mWifiManager; field in CarWifiManager 67 mWifiManager = mContext.getSystemService(WifiManager.class); in CarWifiManager() 134 if (mWifiManager.isWifiEnabled()) { in getAccessPoints() 164 return mWifiManager.isWifiEnabled(); in isWifiEnabled() 171 return mWifiManager.isWifiApEnabled(); in isWifiApEnabled() 178 return mWifiManager.getWifiApConfiguration(); in getWifiApConfig() 185 mWifiManager.setWifiApConfiguration(config); in setWifiApConfig() 192 return mWifiManager.getCountryCode(); in getCountryCode() 199 return mWifiManager.isDualBandSupported(); in isDualBandSupported() 207 return mWifiManager.isDualModeSupported(); in isDualModeSupported() [all …]
|
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/ |
D | AddWifiNetworkTask.java | 52 private final WifiManager mWifiManager; field in AddWifiNetworkTask 89 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in AddWifiNetworkTask() 101 if (mWifiManager == null || !enableWifi()) { in run() 142 mWifiManager.enableNetwork(netId, true); in connectToProvidedNetwork() 143 mWifiManager.saveConfiguration(); in connectToProvidedNetwork() 146 if (!mWifiManager.reconnect()) { in connectToProvidedNetwork() 159 int netId = mWifiManager.addNetwork(wifiConf); in tryAddingNetwork() 172 netId = mWifiManager.addNetwork(wifiConf); in tryAddingNetwork() 178 return mWifiManager.isWifiEnabled() || mWifiManager.setWifiEnabled(true); in enableWifi() 211 WifiInfo connectionInfo = mWifiManager.getConnectionInfo(); in isConnectedToSpecifiedWifi() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | WifiVerboseLoggingPreferenceControllerTest.java | 40 private WifiManager mWifiManager; field in WifiVerboseLoggingPreferenceControllerTest 51 when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager); in setup() 62 verify(mWifiManager).enableVerboseLogging( in onPreferenceChange_settingEnabled_shouldEnableVerboseLogging() 70 verify(mWifiManager).enableVerboseLogging( in onPreferenceChange_settingDisabled_shouldDisablVerboseLogging() 76 when(mWifiManager.getVerboseLoggingLevel()).thenReturn(1); in updateState_settingEnabled_shouldEnablePreference() 84 when(mWifiManager.getVerboseLoggingLevel()).thenReturn(0); in updateState_settingDisabled_shouldDisablePreference() 94 verify(mWifiManager) in onDeveloperOptionsSwitchDisabled_shouldDisablePreference()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/p2p/ |
D | WifiP2PPreferenceControllerTest.java | 59 private WifiManager mWifiManager; field in WifiP2PPreferenceControllerTest 76 when(mContext.getSystemService(WifiManager.class)).thenReturn(mWifiManager); in setUp() 79 mController = new WifiP2pPreferenceController(mContext, mLifecycle, mWifiManager); in setUp() 103 when(mWifiManager.isWifiEnabled()).thenReturn(true); in testWifiStateChange_shouldToggleEnabledState() 114 when(mWifiManager.isWifiEnabled()).thenReturn(false); in testWifiStateChange_shouldToggleEnabledState() 121 when(mWifiManager.isWifiEnabled()).thenReturn(true); in testDisplayPreference_shouldToggleEnabledState() 126 when(mWifiManager.isWifiEnabled()).thenReturn(false); in testDisplayPreference_shouldToggleEnabledState() 130 when(mWifiManager.isWifiEnabled()).thenReturn(true); in testDisplayPreference_shouldToggleEnabledState()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/ |
D | ConnectivityListener.java | 64 private final WifiManager mWifiManager; field in ConnectivityListener 106 mWifiManager = mContext.getSystemService(WifiManager.class); in ConnectivityListener() 195 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in getWifiIpAddress() 210 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in getWifiMacAddress() 271 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in getWifiSignalStrength() 292 return mWifiManager.getWifiState() == WifiManager.WIFI_STATE_ENABLED in isWifiEnabledOrEnabling() 293 || mWifiManager.getWifiState() == WifiManager.WIFI_STATE_ENABLING; in isWifiEnabledOrEnabling() 297 mWifiManager.setWifiEnabled(enable); in setWifiEnabled() 317 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in updateConnectivityStatus() 383 WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in getSsid()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/slice/ |
D | WifiSlice.java | 82 protected final WifiManager mWifiManager; field in WifiSlice 87 mWifiManager = mContext.getSystemService(WifiManager.class); in WifiSlice() 174 worker.registerCaptivePortalNetworkCallback(mWifiManager.getCurrentNetwork()); in handleCaptivePortalCallback() 258 intent.putExtra(ConnectivityManager.EXTRA_NETWORK, mWifiManager.getCurrentNetwork()); in getAccessPointAction() 291 mWifiManager.getCurrentNetwork()); in isCaptivePortal() 302 mWifiManager.isWifiEnabled()); in onNotifyChange() 303 mWifiManager.setWifiEnabled(newState); in onNotifyChange() 323 if (mWifiManager.getWifiState() != WifiManager.WIFI_STATE_ENABLED) { in getActiveSSID() 326 return WifiInfo.removeDoubleQuotes(mWifiManager.getConnectionInfo().getSSID()); in getActiveSSID() 330 switch (mWifiManager.getWifiState()) { in isWifiEnabled() [all …]
|
/packages/apps/Settings/src/com/android/settings/wifi/ |
D | WifiSettings.java | 138 protected WifiManager mWifiManager; field in WifiSettings 261 mWifiManager = mWifiTracker.getManager(); in onActivityCreated() 356 onWifiStateChanged(mWifiManager.getWifiState()); in onStart() 646 if (getActivity() != null && !mIsRestricted && mWifiManager.isWifiEnabled()) { in updateAccessPointsDelayed() 664 final int wifiState = mWifiManager.getWifiState(); in onWifiStateChanged() 716 if (!mWifiManager.isWifiEnabled()) { in updateAccessPointPreferences() 943 return mWifiManager != null ? mWifiManager.getCurrentNetwork() : null; in getCurrentWifiNetwork() 966 WifiSavedConfigUtils.getAllConfigs(getContext(), mWifiManager); in setAdditionalSettingsSummaries() 1085 mWifiManager.save(config, mSaveListener); in submit() 1087 mWifiManager.save(config, mSaveListener); in submit() [all …]
|
D | WifiAPITest.java | 57 private WifiManager mWifiManager; field in WifiAPITest 68 mWifiManager = (WifiManager) getSystemService(WIFI_SERVICE); in onCreate() 108 mWifiManager.disconnect(); in onPreferenceClick() 126 mWifiManager.disableNetwork(netid); in onPreferenceClick() 146 mWifiManager.enableNetwork(netid, false); in onPreferenceClick()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/tether/ |
D | WifiTetherApBandPreferenceController.java | 43 isDualMode = mWifiManager.isDualModeSupported(); in WifiTetherApBandPreferenceController() 49 final WifiConfiguration config = mWifiManager.getWifiApConfiguration(); in updateDisplay() 58 mWifiManager.setWifiApConfiguration(config); in updateDisplay() 99 final boolean isDualMode = mWifiManager.isDualModeSupported(); in validateSelection() 131 final String countryCode = mWifiManager.getCountryCode(); in is5GhzBandSupported() 132 if (!mWifiManager.isDualBandSupported() || countryCode == null) { in is5GhzBandSupported()
|
/packages/apps/Settings/src/com/android/settings/wifi/tether/ |
D | WifiTetherApBandPreferenceController.java | 43 isDualMode = mWifiManager.isDualModeSupported(); in WifiTetherApBandPreferenceController() 49 final WifiConfiguration config = mWifiManager.getWifiApConfiguration(); in updateDisplay() 58 mWifiManager.setWifiApConfiguration(config); in updateDisplay() 99 final boolean isDualMode = mWifiManager.isDualModeSupported(); in validateSelection() 131 final String countryCode = mWifiManager.getCountryCode(); in is5GhzBandSupported() 132 if (!mWifiManager.isDualBandSupported() || countryCode == null) { in is5GhzBandSupported()
|
/packages/apps/Settings/src/com/android/settings/development/ |
D | WifiVerboseLoggingPreferenceController.java | 39 private final WifiManager mWifiManager; field in WifiVerboseLoggingPreferenceController 44 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in WifiVerboseLoggingPreferenceController() 55 mWifiManager.enableVerboseLogging(isEnabled ? SETTING_VALUE_ON : SETTING_VALUE_OFF); in onPreferenceChange() 61 final boolean enabled = mWifiManager.getVerboseLoggingLevel() > 0; in updateState() 69 mWifiManager.enableVerboseLogging(SETTING_VALUE_OFF); in onDeveloperOptionsSwitchDisabled()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/development/ |
D | WifiVerboseLoggingPreferenceController.java | 39 private final WifiManager mWifiManager; field in WifiVerboseLoggingPreferenceController 44 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in WifiVerboseLoggingPreferenceController() 55 mWifiManager.enableVerboseLogging(isEnabled ? SETTING_VALUE_ON : SETTING_VALUE_OFF); in onPreferenceChange() 61 final boolean enabled = mWifiManager.getVerboseLoggingLevel() > 0; in updateState() 69 mWifiManager.enableVerboseLogging(SETTING_VALUE_OFF); in onDeveloperOptionsSwitchDisabled()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/ |
D | WifiSettings.java | 137 protected WifiManager mWifiManager; field in WifiSettings 260 mWifiManager = mWifiTracker.getManager(); in onActivityCreated() 355 onWifiStateChanged(mWifiManager.getWifiState()); in onStart() 641 if (getActivity() != null && !mIsRestricted && mWifiManager.isWifiEnabled()) { in updateAccessPointsDelayed() 659 final int wifiState = mWifiManager.getWifiState(); in onWifiStateChanged() 711 if (!mWifiManager.isWifiEnabled()) { in updateAccessPointPreferences() 936 return mWifiManager != null ? mWifiManager.getCurrentNetwork() : null; in getCurrentWifiNetwork() 1051 mWifiManager.save(config, mSaveListener); in submit() 1053 mWifiManager.save(config, mSaveListener); in submit() 1068 mWifiManager.disableEphemeralNetwork( in forget() [all …]
|
D | WifiAPITest.java | 57 private WifiManager mWifiManager; field in WifiAPITest 68 mWifiManager = (WifiManager) getSystemService(WIFI_SERVICE); in onCreate() 108 mWifiManager.disconnect(); in onPreferenceClick() 126 mWifiManager.disableNetwork(netid); in onPreferenceClick() 146 mWifiManager.enableNetwork(netid, false); in onPreferenceClick()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/ |
D | WifiInfoPreferenceControllerTest.java | 60 private WifiManager mWifiManager; field in WifiInfoPreferenceControllerTest 82 .thenReturn(mWifiManager); in setUp() 86 when(mWifiManager.getConnectionInfo()).thenReturn(mWifiInfo); in setUp() 87 when(mWifiManager.getCurrentNetwork()).thenReturn(null); in setUp() 89 mController = new WifiInfoPreferenceController(mContext, mLifecycle, mWifiManager); in setUp() 128 when(mWifiManager.getConnectionInfo()).thenReturn(null); in updateWifiInfo_nullWifiInfoWithMacRandomizationOff_setMacUnavailable() 180 when(mWifiManager.getConnectionInfo()).thenReturn(null); in updateWifiInfo_nullWifiInfoWithMacRandomizationOn_setMacUnavailable()
|
D | WifiSettingsTest.java | 80 private WifiManager mWifiManager; field in WifiSettingsTest 96 mWifiSettings.mWifiManager = mWifiManager; in setUp() 152 when(mWifiManager.getConfiguredNetworks()) in setAdditionalSettingsSummaries_hasSavedNetwork_preferenceVisible() 166 when(mWifiManager.getPasspointConfigurations()) in setAdditionalSettingsSummaries_hasSavedPasspointNetwork_preferenceVisible() 180 when(mWifiManager.getConfiguredNetworks()) in setAdditionalSettingsSummaries_hasTwoKindsSavedNetwork_preferenceVisible() 182 when(mWifiManager.getPasspointConfigurations()) in setAdditionalSettingsSummaries_hasTwoKindsSavedNetwork_preferenceVisible() 196 when(mWifiManager.getConfiguredNetworks()) in setAdditionalSettingsSummaries_noSavedNetwork_preferenceInvisible()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/setup/ |
D | ConnectState.java | 105 WifiManager mWifiManager; field in ConnectState.ConnectToWifiFragment 137 mWifiManager = ((WifiManager) getActivity().getApplicationContext() in onCreate() 153 mWifiManager.disconnect(); in proceedDependOnNetworkState() 155 mWifiManager.addNetwork(mWifiConfiguration); in proceedDependOnNetworkState() 156 mWifiManager.connect(mWifiConfiguration, null); in proceedDependOnNetworkState() 162 mWifiManager.disconnect(); in onDestroy() 228 WifiInfo currentConnection = mWifiManager.getConnectionInfo(); in isNetworkConnected()
|
/packages/apps/Settings/src/com/android/settings/wifi/details/ |
D | WifiDetailPreferenceController.java | 163 private final WifiManager mWifiManager; field in WifiDetailPreferenceController 327 mWifiManager = wifiManager; in WifiDetailPreferenceController() 452 mNetwork = mWifiManager.getCurrentNetwork(); in updateNetworkInfo() 518 mWifiInfo = mWifiManager.getConnectionInfo(); in updateAccessPoint() 701 final String[] macAddresses = mWifiManager.getFactoryMacAddresses(); in getMacAddress() 843 mWifiManager.disableEphemeralNetwork(mWifiInfo.getSSID()); in forgetNetwork() 852 mWifiManager.removePasspointConfiguration(mAccessPoint.getPasspointFqdn()); in forgetNetwork() 858 mWifiManager.forget(mWifiConfig.networkId, null /* action listener */); in forgetNetwork() 871 mWifiManager.removePasspointConfiguration(mAccessPoint.getPasspointFqdn()); in showConfirmForgetDialog() 892 mWifiManager, mAccessPoint); in launchWifiDppConfiguratorActivity() [all …]
|
D | WifiPrivacyPreferenceController.java | 43 private WifiManager mWifiManager; field in WifiPrivacyPreferenceController 51 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in WifiPrivacyPreferenceController() 97 mWifiManager.updateNetwork(mWifiConfiguration); in onPreferenceChange() 101 final WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); in onPreferenceChange() 103 mWifiManager.disconnect(); in onPreferenceChange()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/details/ |
D | WifiDetailPreferenceController.java | 164 private final WifiManager mWifiManager; field in WifiDetailPreferenceController 342 mWifiManager = wifiManager; in WifiDetailPreferenceController() 470 mNetwork = mWifiManager.getCurrentNetwork(); in updateNetworkInfo() 544 mWifiInfo = mWifiManager.getConnectionInfo(); in updateAccessPoint() 729 final String[] macAddresses = mWifiManager.getFactoryMacAddresses(); in getMacAddress() 865 mWifiManager.disableEphemeralNetwork(mWifiInfo.getSSID()); in forgetNetwork() 874 mWifiManager.removePasspointConfiguration(mWifiConfig.FQDN); in forgetNetwork() 876 mWifiManager.forget(mWifiConfig.networkId, null /* action listener */); in forgetNetwork() 888 mWifiManager.removePasspointConfiguration(mWifiConfig.FQDN); in showConfirmForgetDialog() 905 mWifiManager, mAccessPoint); in launchWifiDppConfiguratorActivity() [all …]
|
/packages/services/Car/service/src/com/android/car/ |
D | CarProjectionService.java | 95 private final WifiManager mWifiManager; field in CarProjectionService 170 mWifiManager = context.getSystemService(WifiManager.class); in CarProjectionService() 598 mWifiManager.registerSoftApCallback(mSoftApCallback, mHandler); in startTetheredApLocked() 602 if (!mWifiManager.startSoftAp(null /* use existing config*/)) { in startTetheredApLocked() 604 if (mWifiManager.getWifiApState() == WIFI_AP_STATE_ENABLED) { in startTetheredApLocked() 605 sendApStarted(mWifiManager.getWifiApConfiguration()); in startTetheredApLocked() 617 mWifiManager.unregisterSoftApCallback(mSoftApCallback); in stopTetheredApLocked() 619 if (!mWifiManager.stopSoftAp()) { in stopTetheredApLocked() 633 mWifiManager.startLocalOnlyHotspot(new LocalOnlyHotspotCallback() { in startLocalOnlyApLocked() 935 WifiConfiguration apConfig = mWifiManager.getWifiApConfiguration(); in ensureApConfiguration() [all …]
|
/packages/apps/Settings/src/com/android/settings/wifi/slice/ |
D | WifiSlice.java | 75 protected final WifiManager mWifiManager; field in WifiSlice 80 mWifiManager = mContext.getSystemService(WifiManager.class); in WifiSlice() 142 worker.registerNetworkCallback(mWifiManager.getCurrentNetwork()); in handleNetworkCallback() 242 .putExtra(ConnectivityManager.EXTRA_NETWORK, mWifiManager.getCurrentNetwork()); in getAccessPointAction() 298 mWifiManager.getCurrentNetwork()); in isCaptivePortal() 309 mWifiManager.isWifiEnabled()); in onNotifyChange() 310 mWifiManager.setWifiEnabled(newState); in onNotifyChange() 330 switch (mWifiManager.getWifiState()) { in isWifiEnabled()
|