Home
last modified time | relevance | path

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

1234

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/wifi/
DWifiStatusTracker.java17 import android.net.wifi.WifiManager;
23 private final WifiManager mWifiManager;
30 public WifiStatusTracker(WifiManager wifiManager) { in WifiStatusTracker()
36 if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { in handleBroadcast()
37 enabled = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, in handleBroadcast()
38 WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED; in handleBroadcast()
39 } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in handleBroadcast()
41 intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); in handleBroadcast()
46 WifiInfo info = intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO) != null in handleBroadcast()
47 ? (WifiInfo) intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO) in handleBroadcast()
[all …]
DWifiTracker.java31 import android.net.wifi.WifiManager;
67 private final WifiManager mWifiManager;
114 context.getSystemService(WifiManager.class), in WifiTracker()
121 WifiManager wifiManager, ConnectivityManager connectivityManager, in WifiTracker()
145 mFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); in WifiTracker()
146 mFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); in WifiTracker()
147 mFilter.addAction(WifiManager.NETWORK_IDS_CHANGED_ACTION); in WifiTracker()
148 mFilter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION); in WifiTracker()
149 mFilter.addAction(WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION); in WifiTracker()
150 mFilter.addAction(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION); in WifiTracker()
[all …]
/frameworks/base/packages/Osu/src/com/android/hotspot2/
DWifiNetworkAdapter.java12 import android.net.wifi.WifiManager;
89 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in loadAllSps()
135 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in addSP()
142 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in removeSP()
147 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in modifySP()
152 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in getCurrentNetwork()
161 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in getActiveWifiConfig()
171 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in getConnectionInfo()
176 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in matchProviderWithCurrentNetwork()
212 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in doIconQuery()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/unit/
DWifiClientTest.java24 import android.net.wifi.WifiManager;
40 private WifiManager mWifiManager;
56 if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { in onReceive()
57 mWifiState = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, in onReceive()
58 WifiManager.WIFI_STATE_UNKNOWN); in onReceive()
60 case WifiManager.WIFI_STATE_DISABLING: in onReceive()
63 case WifiManager.WIFI_STATE_DISABLED: in onReceive()
66 case WifiManager.WIFI_STATE_ENABLING: in onReceive()
69 case WifiManager.WIFI_STATE_ENABLED: in onReceive()
73 } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in onReceive()
[all …]
DWifiSoftAPTest.java20 import android.net.wifi.WifiManager;
34 private WifiManager mWifiManager;
42 mWifiManager = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE); in setUp()
75 assertEquals("wifi AP state is not enabled", WifiManager.WIFI_AP_STATE_ENABLED, in testApSsidWithAlphabet()
/frameworks/base/packages/Osu/src/com/android/
DMainActivity.java18 import android.net.wifi.WifiManager;
243 WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE); in onHandleIntent()
246 case WifiManager.SCAN_RESULTS_AVAILABLE_ACTION: in onHandleIntent()
249 case WifiManager.PASSPOINT_WNM_FRAME_RECEIVED_ACTION: in onHandleIntent()
250 long bssid = bundle.getLong(WifiManager.EXTRA_PASSPOINT_WNM_BSSID); in onHandleIntent()
251 String url = bundle.getString(WifiManager.EXTRA_PASSPOINT_WNM_URL); in onHandleIntent()
254 if (bundle.containsKey(WifiManager.EXTRA_PASSPOINT_WNM_METHOD)) { in onHandleIntent()
255 int method = bundle.getInt(WifiManager.EXTRA_PASSPOINT_WNM_METHOD); in onHandleIntent()
260 if (bundle.containsKey(WifiManager.EXTRA_PASSPOINT_WNM_PPOINT_MATCH)) { in onHandleIntent()
262 bundle.getInt(WifiManager.EXTRA_PASSPOINT_WNM_PPOINT_MATCH); in onHandleIntent()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DHotspotControllerImpl.java25 import android.net.wifi.WifiManager;
65 case WifiManager.WIFI_AP_STATE_DISABLED: in stateToString()
67 case WifiManager.WIFI_AP_STATE_DISABLING: in stateToString()
69 case WifiManager.WIFI_AP_STATE_ENABLED: in stateToString()
71 case WifiManager.WIFI_AP_STATE_ENABLING: in stateToString()
73 case WifiManager.WIFI_AP_STATE_FAILED: in stateToString()
101 return mHotspotState == WifiManager.WIFI_AP_STATE_ENABLED; in isHotspotEnabled()
140 filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION); in setListening()
154 WifiManager.EXTRA_WIFI_AP_STATE, WifiManager.WIFI_AP_STATE_FAILED); in onReceive()
156 fireCallback(mHotspotState == WifiManager.WIFI_AP_STATE_ENABLED); in onReceive()
DWifiSignalController.java21 import android.net.wifi.WifiManager;
40 private final WifiManager mWifiManager;
49 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in WifiSignalController()
113 mCurrentState.activityIn = wifiActivity == WifiManager.DATA_ACTIVITY_INOUT in setActivity()
114 || wifiActivity == WifiManager.DATA_ACTIVITY_IN; in setActivity()
115 mCurrentState.activityOut = wifiActivity == WifiManager.DATA_ACTIVITY_INOUT in setActivity()
116 || wifiActivity == WifiManager.DATA_ACTIVITY_OUT; in setActivity()
135 case WifiManager.DATA_ACTIVITY_NOTIFICATION: in handleMessage()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DNetworkControllerWifiTest.java7 import android.net.wifi.WifiManager;
72 setWifiActivity(WifiManager.DATA_ACTIVITY_NONE); in testQsDataDirection()
74 setWifiActivity(WifiManager.DATA_ACTIVITY_IN); in testQsDataDirection()
76 setWifiActivity(WifiManager.DATA_ACTIVITY_OUT); in testQsDataDirection()
78 setWifiActivity(WifiManager.DATA_ACTIVITY_INOUT); in testQsDataDirection()
111 Intent i = new Intent(WifiManager.RSSI_CHANGED_ACTION); in setWifiLevel()
112 i.putExtra(WifiManager.EXTRA_NEW_RSSI, rssi); in setWifiLevel()
117 Intent i = new Intent(WifiManager.WIFI_STATE_CHANGED_ACTION); in setWifiEnabled()
118 i.putExtra(WifiManager.EXTRA_WIFI_STATE, in setWifiEnabled()
119 enabled ? WifiManager.WIFI_STATE_ENABLED : WifiManager.WIFI_STATE_DISABLED); in setWifiEnabled()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DTestUtil.java26 import android.net.wifi.WifiManager;
52 Intent intent = new Intent(WifiManager.NETWORK_STATE_CHANGED_ACTION); in sendNetworkStateChanged()
55 intent.putExtra(WifiManager.EXTRA_NETWORK_INFO, networkInfo); in sendNetworkStateChanged()
64 Intent intent = new Intent(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); in sendScanResultsAvailable()
73 Intent intent = new Intent(WifiManager.WIFI_SCAN_AVAILABLE); in sendWifiScanAvailable()
74 intent.putExtra(WifiManager.EXTRA_SCAN_AVAILABLE, scanAvailable); in sendWifiScanAvailable()
83 Intent intent = new Intent(WifiManager.WIFI_STATE_CHANGED_ACTION); in sendWifiStateChanged()
84 intent.putExtra(WifiManager.EXTRA_WIFI_STATE, wifiState); in sendWifiStateChanged()
DSoftApManagerTest.java35 import android.net.wifi.WifiManager;
117 order.verify(mListener).onStateChanged(WifiManager.WIFI_AP_STATE_ENABLING, 0); in startSoftApWithoutConfig()
119 WifiManager.WIFI_AP_STATE_FAILED, WifiManager.SAP_START_FAILURE_GENERAL); in startSoftApWithoutConfig()
137 order.verify(mListener).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLING, 0); in tetheringTimedOut()
138 order.verify(mListener).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLED, 0); in tetheringTimedOut()
171 order.verify(mListener).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLING, 0); in stopWhenStarted()
172 order.verify(mListener).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLED, 0); in stopWhenStarted()
192 order.verify(mListener).onStateChanged(WifiManager.WIFI_AP_STATE_ENABLING, 0); in startSoftApAndVerifyEnabled()
193 order.verify(mListener).onStateChanged(WifiManager.WIFI_AP_STATE_ENABLED, 0); in startSoftApAndVerifyEnabled()
198 verify(mListener, never()).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLING, 0); in verifySoftApNotDisabled()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiNotificationController.java30 import android.net.wifi.WifiManager;
104 mWifiState = WifiManager.WIFI_STATE_UNKNOWN; in WifiNotificationController()
108 filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); in WifiNotificationController()
109 filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); in WifiNotificationController()
110 filter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); in WifiNotificationController()
116 if (intent.getAction().equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { in WifiNotificationController()
117 mWifiState = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, in WifiNotificationController()
118 WifiManager.WIFI_STATE_UNKNOWN); in WifiNotificationController()
121 WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in WifiNotificationController()
123 WifiManager.EXTRA_NETWORK_INFO); in WifiNotificationController()
[all …]
DWifiStateMachine.java19 import static android.net.wifi.WifiManager.WIFI_AP_STATE_DISABLED;
20 import static android.net.wifi.WifiManager.WIFI_AP_STATE_DISABLING;
21 import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLED;
22 import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLING;
23 import static android.net.wifi.WifiManager.WIFI_AP_STATE_FAILED;
24 import static android.net.wifi.WifiManager.WIFI_STATE_DISABLED;
25 import static android.net.wifi.WifiManager.WIFI_STATE_DISABLING;
26 import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED;
27 import static android.net.wifi.WifiManager.WIFI_STATE_ENABLING;
28 import static android.net.wifi.WifiManager.WIFI_STATE_UNKNOWN;
[all …]
DWifiTrafficPoller.java27 import android.net.wifi.WifiManager;
79 filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); in WifiTrafficPoller()
90 if (WifiManager.NETWORK_STATE_CHANGED_ACTION.equals( in WifiTrafficPoller()
93 WifiManager.EXTRA_NETWORK_INFO); in WifiTrafficPoller()
185 int dataActivity = WifiManager.DATA_ACTIVITY_NONE; in notifyOnDataActivity()
201 dataActivity |= WifiManager.DATA_ACTIVITY_OUT; in notifyOnDataActivity()
204 dataActivity |= WifiManager.DATA_ACTIVITY_IN; in notifyOnDataActivity()
215 msg.what = WifiManager.DATA_ACTIVITY_NOTIFICATION; in notifyOnDataActivity()
DWifiController.java19 import static android.net.wifi.WifiManager.WIFI_MODE_FULL;
20 import static android.net.wifi.WifiManager.WIFI_MODE_FULL_HIGH_PERF;
21 import static android.net.wifi.WifiManager.WIFI_MODE_SCAN_ONLY;
33 import android.net.wifi.WifiManager;
183 filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); in WifiController()
184 filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION); in WifiController()
185 filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); in WifiController()
193 } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in WifiController()
195 WifiManager.EXTRA_NETWORK_INFO); in WifiController()
196 } else if (action.equals(WifiManager.WIFI_AP_STATE_CHANGED_ACTION)) { in WifiController()
[all …]
DWifiServiceImpl.java60 import android.net.wifi.WifiManager;
210 case WifiManager.CONNECT_NETWORK: in handleMessage()
211 case WifiManager.SAVE_NETWORK: { in handleMessage()
214 if (msg.what == WifiManager.SAVE_NETWORK) { in handleMessage()
221 if (msg.what == WifiManager.CONNECT_NETWORK) { in handleMessage()
238 if (msg.what == WifiManager.CONNECT_NETWORK) { in handleMessage()
239 replyFailed(msg, WifiManager.CONNECT_NETWORK_FAILED, in handleMessage()
240 WifiManager.INVALID_ARGS); in handleMessage()
242 replyFailed(msg, WifiManager.SAVE_NETWORK_FAILED, in handleMessage()
243 WifiManager.INVALID_ARGS); in handleMessage()
[all …]
DSoftApManager.java32 import android.net.wifi.WifiManager;
319 updateApState(WifiManager.WIFI_AP_STATE_ENABLING, 0); in processMessage()
322 updateApState(WifiManager.WIFI_AP_STATE_ENABLED, 0); in processMessage()
325 int reason = WifiManager.SAP_START_FAILURE_GENERAL; in processMessage()
327 reason = WifiManager.SAP_START_FAILURE_NO_CHANNEL; in processMessage()
329 updateApState(WifiManager.WIFI_AP_STATE_FAILED, reason); in processMessage()
348 updateApState(WifiManager.WIFI_AP_STATE_DISABLING, 0); in processMessage()
350 updateApState(WifiManager.WIFI_AP_STATE_DISABLED, 0); in processMessage()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DConnectivityManagerMobileTest.java22 import android.net.wifi.WifiManager;
100 WifiManager.WIFI_STATE_DISABLED, LONG_TIMEOUT)); in test3GToWifiNotification()
121 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT)); in testConnectToWifi()
143 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT)); in testConnectToWifWithKnownAP()
154 WifiManager.WIFI_STATE_DISABLED, LONG_TIMEOUT)); in testConnectToWifWithKnownAP()
169 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT)); in testConnectToWifWithKnownAP()
191 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT)); in testDisconnectWifi()
203 WifiManager.WIFI_STATE_DISABLED, LONG_TIMEOUT)); in testDisconnectWifi()
223 WifiManager.WIFI_STATE_DISABLED, LONG_TIMEOUT)); in testDataConnectionWith3GToAmTo3G()
277 WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT)); in testDataConnectionWithWifiToAMToWifi()
[all …]
/frameworks/base/packages/SettingsLib/tests/src/com/android/settingslib/wifi/
DWifiTrackerTest.java24 import android.net.wifi.WifiManager;
55 private WifiManager mWifiManager;
69 mWifiManager = Mockito.mock(WifiManager.class); in setUp()
108 final int TEST_WIFI_STATE = WifiManager.WIFI_STATE_ENABLED; in testWifiStateCallback()
110 Intent i = new Intent(WifiManager.WIFI_STATE_CHANGED_ACTION); in testWifiStateCallback()
111 i.putExtra(WifiManager.EXTRA_WIFI_STATE, TEST_WIFI_STATE); in testWifiStateCallback()
250 Intent i = new Intent(WifiManager.WIFI_STATE_CHANGED_ACTION); in testEnableResumeScanning()
252 i.putExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_DISABLED); in testEnableResumeScanning()
254 i.putExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_ENABLED); in testEnableResumeScanning()
258 i.putExtra(WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_DISABLED); in testEnableResumeScanning()
[all …]
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/
DTrackerService.java33 import android.net.wifi.WifiManager;
153 mIntentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); in initLocationListeners()
154 mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); in initLocationListeners()
388 if (action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) { in onReceive()
389 WifiManager wifiManager = in onReceive()
390 (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in onReceive()
409 } else if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { in onReceive()
410 int state = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, in onReceive()
411 WifiManager.WIFI_STATE_UNKNOWN); in onReceive()
415 case WifiManager.WIFI_STATE_DISABLED: in onReceive()
[all …]
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/
DConnectionUtil.java37 import android.net.wifi.WifiManager;
76 private WifiManager mWifiManager;
105 mIntentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); in initialize()
106 mIntentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); in initialize()
107 mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); in initialize()
108 mIntentFilter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION); in initialize()
109 mIntentFilter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION); in initialize()
116 mWifiManager =(WifiManager)mContext.getSystemService(Context.WIFI_SERVICE); in initialize()
187 if (action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) { in onReceive()
190 } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in onReceive()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DConnectivityManagerTestBase.java29 import android.net.wifi.WifiManager;
80 public WifiManager mWifiManager;
112 if (action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) { in onReceive()
130 mWifiManager =(WifiManager)mContext.getSystemService(Context.WIFI_SERVICE); in setUp()
145 mIntentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); in setUp()
146 mIntentFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); in setUp()
147 mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); in setUp()
148 mIntentFilter.addAction(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION); in setUp()
149 mIntentFilter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION); in setUp()
339 if (!waitForWifiState(WifiManager.WIFI_STATE_ENABLED, LONG_TIMEOUT)) { in connectToWifiWithConfiguration()
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/stress/
DWifiApStress.java23 import android.net.wifi.WifiManager;
88 WifiManager.WIFI_AP_STATE_DISABLED, 2 * LONG_TIMEOUT)); in testWifiHotSpot()
95 WifiManager.WIFI_STATE_DISABLED, LONG_TIMEOUT)); in testWifiHotSpot()
106 WifiManager.WIFI_AP_STATE_ENABLED, 2 * LONG_TIMEOUT)); in testWifiHotSpot()
120 WifiManager.WIFI_AP_STATE_DISABLED, 2 * LONG_TIMEOUT)); in testWifiHotSpot()
/frameworks/base/wifi/java/android/net/wifi/
DWifiManager.java69 public class WifiManager { class
684 public WifiManager(Context context, IWifiManager service, Looper looper) { in WifiManager() method in WifiManager
1881 case WifiManager.CONNECT_NETWORK_FAILED:
1882 case WifiManager.FORGET_NETWORK_FAILED:
1883 case WifiManager.SAVE_NETWORK_FAILED:
1884 case WifiManager.DISABLE_NETWORK_FAILED:
1890 case WifiManager.CONNECT_NETWORK_SUCCEEDED:
1891 case WifiManager.FORGET_NETWORK_SUCCEEDED:
1892 case WifiManager.SAVE_NETWORK_SUCCEEDED:
1893 case WifiManager.DISABLE_NETWORK_SUCCEEDED:
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DTetherUtil.java19 import android.net.wifi.WifiManager;
26 final WifiManager wifiManager = in setWifiTethering()
27 (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in setWifiTethering()

1234