Home
last modified time | relevance | path

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

123

/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DWifiSignalController.java24 import android.net.wifi.WifiManager;
40 private final WifiManager mWifiManager;
48 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in WifiSignalController()
97 if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { in handleBroadcast()
98 mCurrentState.enabled = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, in handleBroadcast()
99 WifiManager.WIFI_STATE_UNKNOWN) == WifiManager.WIFI_STATE_ENABLED; in handleBroadcast()
100 } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in handleBroadcast()
102 intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); in handleBroadcast()
107 WifiInfo info = intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO) != null in handleBroadcast()
108 ? (WifiInfo) intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO) in handleBroadcast()
[all …]
DHotspotControllerImpl.java23 import android.net.wifi.WifiManager;
61 case WifiManager.WIFI_AP_STATE_DISABLED: in stateToString()
63 case WifiManager.WIFI_AP_STATE_DISABLING: in stateToString()
65 case WifiManager.WIFI_AP_STATE_ENABLED: in stateToString()
67 case WifiManager.WIFI_AP_STATE_ENABLING: in stateToString()
69 case WifiManager.WIFI_AP_STATE_FAILED: in stateToString()
91 return mHotspotState == WifiManager.WIFI_AP_STATE_ENABLED; in isHotspotEnabled()
122 filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION); in setListening()
136 WifiManager.EXTRA_WIFI_AP_STATE, WifiManager.WIFI_AP_STATE_FAILED); in onReceive()
138 fireCallback(mHotspotState == WifiManager.WIFI_AP_STATE_ENABLED); in onReceive()
/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/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/service/java/com/android/server/wifi/
DWifiNotificationController.java30 import android.net.wifi.WifiManager;
98 mWifiState = WifiManager.WIFI_STATE_UNKNOWN; in WifiNotificationController()
101 filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); in WifiNotificationController()
102 filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); in WifiNotificationController()
103 filter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); in WifiNotificationController()
109 if (intent.getAction().equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { in WifiNotificationController()
110 mWifiState = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, in WifiNotificationController()
111 WifiManager.WIFI_STATE_UNKNOWN); in WifiNotificationController()
114 WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in WifiNotificationController()
116 WifiManager.EXTRA_NETWORK_INFO); in WifiNotificationController()
[all …]
DWifiWatchdogStateMachine.java31 import android.net.wifi.WifiManager;
115 private static final int LINK_MONITOR_LEVEL_THRESHOLD = WifiManager.RSSI_LEVELS - 1;
263 private WifiManager mWifiManager;
309 mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in WifiWatchdogStateMachine()
360 if (action.equals(WifiManager.RSSI_CHANGED_ACTION)) { in setupNetworkReceiver()
362 intent.getIntExtra(WifiManager.EXTRA_NEW_RSSI, -200), 0).sendToTarget(); in setupNetworkReceiver()
363 } else if (action.equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION)) { in setupNetworkReceiver()
365 } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in setupNetworkReceiver()
371 } else if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) { in setupNetworkReceiver()
373 WifiManager.EXTRA_WIFI_STATE, WifiManager.WIFI_STATE_UNKNOWN)); in setupNetworkReceiver()
[all …]
DWifiTrafficPoller.java26 import android.net.wifi.WifiManager;
77 filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); in WifiTrafficPoller()
86 WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in WifiTrafficPoller()
88 WifiManager.EXTRA_NETWORK_INFO); in WifiTrafficPoller()
176 int dataActivity = WifiManager.DATA_ACTIVITY_NONE; in notifyOnDataActivity()
192 dataActivity |= WifiManager.DATA_ACTIVITY_OUT; in notifyOnDataActivity()
195 dataActivity |= WifiManager.DATA_ACTIVITY_IN; in notifyOnDataActivity()
206 msg.what = WifiManager.DATA_ACTIVITY_NOTIFICATION; in notifyOnDataActivity()
DWifiServiceImpl.java49 import android.net.wifi.WifiManager;
198 case WifiManager.CONNECT_NETWORK: in handleMessage()
199 case WifiManager.SAVE_NETWORK: { in handleMessage()
202 if (msg.what == WifiManager.SAVE_NETWORK) { in handleMessage()
209 if (msg.what == WifiManager.CONNECT_NETWORK) { in handleMessage()
226 if (msg.what == WifiManager.CONNECT_NETWORK) { in handleMessage()
227 replyFailed(msg, WifiManager.CONNECT_NETWORK_FAILED, in handleMessage()
228 WifiManager.INVALID_ARGS); in handleMessage()
230 replyFailed(msg, WifiManager.SAVE_NETWORK_FAILED, in handleMessage()
231 WifiManager.INVALID_ARGS); in handleMessage()
[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;
32 import static android.net.wifi.WifiManager.WIFI_STATE_UNKNOWN;
[all …]
DWifiController.java29 import android.net.wifi.WifiManager;
30 import static android.net.wifi.WifiManager.WIFI_MODE_FULL;
31 import static android.net.wifi.WifiManager.WIFI_MODE_FULL_HIGH_PERF;
32 import static android.net.wifi.WifiManager.WIFI_MODE_SCAN_ONLY;
175 filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION); in WifiController()
176 filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION); in WifiController()
184 } else if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { in WifiController()
186 WifiManager.EXTRA_NETWORK_INFO); in WifiController()
187 } else if (action.equals(WifiManager.WIFI_AP_STATE_CHANGED_ACTION)) { in WifiController()
189 WifiManager.EXTRA_WIFI_AP_STATE, in WifiController()
[all …]
DSupplicantStateTracker.java31 import android.net.wifi.WifiManager;
202 Intent intent = new Intent(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION); in sendSupplicantStateChangedBroadcast()
205 intent.putExtra(WifiManager.EXTRA_NEW_STATE, (Parcelable) state); in sendSupplicantStateChangedBroadcast()
208 WifiManager.EXTRA_SUPPLICANT_ERROR, in sendSupplicantStateChangedBroadcast()
209 WifiManager.ERROR_AUTHENTICATING); in sendSupplicantStateChangedBroadcast()
241 case WifiManager.CONNECT_NETWORK: in processMessage()
DWifiNetworkScoreCache.java25 import android.net.wifi.WifiManager;
176 WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); in dump()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DTetherUtil.java24 import android.net.wifi.WifiManager;
55 final WifiManager wifiManager = in setWifiTethering()
56 (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in setWifiTethering()
62 if (enable && ((wifiState == WifiManager.WIFI_STATE_ENABLING) || in setWifiTethering()
63 (wifiState == WifiManager.WIFI_STATE_ENABLED))) { in setWifiTethering()
83 WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); in isWifiTetherEnabled()
84 return wifiManager.getWifiApState() == WifiManager.WIFI_AP_STATE_ENABLED; in isWifiTetherEnabled()
/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 …]
DWifiAssociationTest.java25 import android.net.wifi.WifiManager;
88 frequencyBand = WifiManager.WIFI_FREQUENCY_BAND_2GHZ; in setFrequencyBand()
90 frequencyBand = WifiManager.WIFI_FREQUENCY_BAND_5GHZ; in setFrequencyBand()
92 frequencyBand = WifiManager.WIFI_FREQUENCY_BAND_AUTO; in setFrequencyBand()
/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/packages/SettingsLib/src/com/android/settingslib/wifi/
DWifiTracker.java27 import android.net.wifi.WifiManager;
63 private final WifiManager mWifiManager;
107 (WifiManager) context.getSystemService(Context.WIFI_SERVICE), Looper.myLooper()); in WifiTracker()
113 WifiManager wifiManager, Looper currentLooper) { in WifiTracker()
135 mFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION); in WifiTracker()
136 mFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION); in WifiTracker()
137 mFilter.addAction(WifiManager.NETWORK_IDS_CHANGED_ACTION); in WifiTracker()
138 mFilter.addAction(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION); in WifiTracker()
139 mFilter.addAction(WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION); in WifiTracker()
140 mFilter.addAction(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION); in WifiTracker()
[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.java74 public class WifiManager { class
642 public WifiManager(Context context, IWifiManager service) { in WifiManager() method in WifiManager
1915 case WifiManager.CONNECT_NETWORK_FAILED:
1916 case WifiManager.FORGET_NETWORK_FAILED:
1917 case WifiManager.SAVE_NETWORK_FAILED:
1918 case WifiManager.DISABLE_NETWORK_FAILED:
1924 case WifiManager.CONNECT_NETWORK_SUCCEEDED:
1925 case WifiManager.FORGET_NETWORK_SUCCEEDED:
1926 case WifiManager.SAVE_NETWORK_SUCCEEDED:
1927 case WifiManager.DISABLE_NETWORK_SUCCEEDED:
[all …]
/frameworks/base/core/tests/hosttests/test-apps/DownloadManagerTestApp/src/com/android/frameworks/downloadmanagertests/
DDownloadManagerTestRunner.java20 import android.net.wifi.WifiManager;
60 ((WifiManager)getContext().getSystemService(Context.WIFI_SERVICE)) in onCreate()
/frameworks/base/core/java/android/net/
DNetworkIdentity.java25 import android.net.wifi.WifiManager;
178 final WifiManager wifi = (WifiManager) context.getSystemService( in buildNetworkIdentity()

123