public class AccessPointControllerImpl extends Object implements NetworkController.AccessPointController, WifiTracker.WifiListener
NetworkController.AccessPointController.AccessPointCallback
Constructor and Description |
---|
AccessPointControllerImpl(Context context,
Looper bgLooper) |
Modifier and Type | Method and Description |
---|---|
void |
addAccessPointCallback(NetworkController.AccessPointController.AccessPointCallback callback) |
boolean |
canConfigWifi() |
boolean |
connect(AccessPoint ap) |
void |
dump(PrintWriter pw) |
int |
getIcon(AccessPoint ap) |
void |
onAccessPointsChanged()
Called to indicate the list of AccessPoints has been updated and
getAccessPoints should be called to get the latest information.
|
void |
onConnectedChanged()
Called when the connection state of wifi has changed and isConnected
should be called to get the updated state.
|
void |
onUserSwitched(int newUserId) |
void |
onWifiStateChanged(int state)
Called when the state of Wifi has changed, the state will be one of
the following.
|
void |
removeAccessPointCallback(NetworkController.AccessPointController.AccessPointCallback callback) |
void |
scanForAccessPoints() |
public boolean canConfigWifi()
canConfigWifi
in interface NetworkController.AccessPointController
public void onUserSwitched(int newUserId)
public void addAccessPointCallback(NetworkController.AccessPointController.AccessPointCallback callback)
addAccessPointCallback
in interface NetworkController.AccessPointController
public void removeAccessPointCallback(NetworkController.AccessPointController.AccessPointCallback callback)
removeAccessPointCallback
in interface NetworkController.AccessPointController
public void scanForAccessPoints()
scanForAccessPoints
in interface NetworkController.AccessPointController
public int getIcon(AccessPoint ap)
getIcon
in interface NetworkController.AccessPointController
public boolean connect(AccessPoint ap)
connect
in interface NetworkController.AccessPointController
public void dump(PrintWriter pw)
public void onWifiStateChanged(int state)
WifiTracker.WifiListener
WifiManager.WIFI_STATE_DISABLED
WifiManager.WIFI_STATE_ENABLED
WifiManager.WIFI_STATE_DISABLING
WifiManager.WIFI_STATE_ENABLING
WifiManager.WIFI_STATE_UNKNOWN
onWifiStateChanged
in interface WifiTracker.WifiListener
state
- The new state of wifi.public void onConnectedChanged()
WifiTracker.WifiListener
onConnectedChanged
in interface WifiTracker.WifiListener
public void onAccessPointsChanged()
WifiTracker.WifiListener
onAccessPointsChanged
in interface WifiTracker.WifiListener