am 80db4381: Merge "DO NOT MERGE Enable all networks on screen on" into gingerbread
Merge commit '80db4381c010c4dec74c2bf1e02380759e4ff97b' into gingerbread-plus-aosp * commit '80db4381c010c4dec74c2bf1e02380759e4ff97b': DO NOT MERGE Enable all networks on screen on
This commit is contained in:
@@ -171,6 +171,7 @@ public class WifiService extends IWifiManager.Stub {
|
||||
private static final int MESSAGE_START_ACCESS_POINT = 6;
|
||||
private static final int MESSAGE_STOP_ACCESS_POINT = 7;
|
||||
private static final int MESSAGE_SET_CHANNELS = 8;
|
||||
private static final int MESSAGE_ENABLE_NETWORKS = 9;
|
||||
|
||||
|
||||
private final WifiHandler mWifiHandler;
|
||||
@@ -1663,6 +1664,12 @@ public class WifiService extends IWifiManager.Stub {
|
||||
mDeviceIdle = false;
|
||||
mScreenOff = false;
|
||||
mWifiStateTracker.enableRssiPolling(true);
|
||||
/* DHCP or other temporary failures in the past can prevent
|
||||
* a disabled network from being connected to, enable on screen on
|
||||
*/
|
||||
if (mWifiStateTracker.isAnyNetworkDisabled()) {
|
||||
sendEnableNetworksMessage();
|
||||
}
|
||||
} else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
|
||||
Slog.d(TAG, "ACTION_SCREEN_OFF");
|
||||
mScreenOff = true;
|
||||
@@ -1794,6 +1801,10 @@ public class WifiService extends IWifiManager.Stub {
|
||||
uid, 0, wifiConfig).sendToTarget();
|
||||
}
|
||||
|
||||
private void sendEnableNetworksMessage() {
|
||||
Message.obtain(mWifiHandler, MESSAGE_ENABLE_NETWORKS).sendToTarget();
|
||||
}
|
||||
|
||||
private void updateWifiState() {
|
||||
// send a message so it's all serialized
|
||||
Message.obtain(mWifiHandler, MESSAGE_UPDATE_STATE, 0, 0).sendToTarget();
|
||||
@@ -1956,6 +1967,10 @@ public class WifiService extends IWifiManager.Stub {
|
||||
setNumAllowedChannelsBlocking(msg.arg1, msg.arg2 == 1);
|
||||
break;
|
||||
|
||||
case MESSAGE_ENABLE_NETWORKS:
|
||||
mWifiStateTracker.enableAllNetworks(getConfiguredNetworks());
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user