Loading core/java/android/net/DhcpStateMachine.java +7 −1 Original line number Diff line number Diff line Loading @@ -92,10 +92,12 @@ public class DhcpStateMachine extends StateMachine { /* Notification from DHCP state machine post DHCP discovery/renewal. Indicates * success/failure */ public static final int CMD_POST_DHCP_ACTION = BASE + 5; /* Notification from DHCP state machine before quitting */ public static final int CMD_ON_QUIT = BASE + 6; /* Command from controller to indicate DHCP discovery/renewal can continue * after pre DHCP action is complete */ public static final int CMD_PRE_DHCP_ACTION_COMPLETE = BASE + 6; public static final int CMD_PRE_DHCP_ACTION_COMPLETE = BASE + 7; /* Message.arg1 arguments to CMD_POST_DHCP notification */ public static final int DHCP_SUCCESS = 1; Loading Loading @@ -172,6 +174,10 @@ public class DhcpStateMachine extends StateMachine { quit(); } protected void onQuitting() { mController.sendMessage(CMD_ON_QUIT); } class DefaultState extends State { @Override public void exit() { Loading services/java/com/android/server/WifiService.java +3 −3 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ public class WifiService extends IWifiManager.Stub { switch (msg.what) { case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED: { if (msg.arg1 == AsyncChannel.STATUS_SUCCESSFUL) { Slog.d(TAG, "New client listening to asynchronous messages"); if (DBG) Slog.d(TAG, "New client listening to asynchronous messages"); mClients.add((AsyncChannel) msg.obj); } else { Slog.e(TAG, "Client connection failure, error=" + msg.arg1); Loading @@ -249,9 +249,9 @@ public class WifiService extends IWifiManager.Stub { } case AsyncChannel.CMD_CHANNEL_DISCONNECTED: { if (msg.arg1 == AsyncChannel.STATUS_SEND_UNSUCCESSFUL) { Slog.d(TAG, "Send failed, client connection lost"); if (DBG) Slog.d(TAG, "Send failed, client connection lost"); } else { Slog.d(TAG, "Client connection lost with reason: " + msg.arg1); if (DBG) Slog.d(TAG, "Client connection lost with reason: " + msg.arg1); } mClients.remove((AsyncChannel) msg.obj); break; Loading wifi/java/android/net/wifi/WifiStateMachine.java +11 −5 Original line number Diff line number Diff line Loading @@ -1672,10 +1672,7 @@ public class WifiStateMachine extends StateMachine { /* In case we were in middle of DHCP operation restore back powermode */ handlePostDhcpSetup(); mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_STOP_DHCP); mDhcpStateMachine.doQuit(); mDhcpStateMachine = null; } try { Loading Loading @@ -1928,6 +1925,9 @@ public class WifiStateMachine extends StateMachine { case CMD_CLEAR_SUSPEND_OPTIMIZATIONS: case CMD_NO_NETWORKS_PERIODIC_SCAN: break; case DhcpStateMachine.CMD_ON_QUIT: mDhcpStateMachine = null; break; case CMD_SET_SUSPEND_OPTIMIZATIONS: mSuspendWakeLock.release(); break; Loading Loading @@ -2498,6 +2498,9 @@ public class WifiStateMachine extends StateMachine { /* Send any reset commands to supplicant before shutting it down */ handleNetworkDisconnect(); if (mDhcpStateMachine != null) { mDhcpStateMachine.doQuit(); } if (DBG) log("stopping supplicant"); if (!mWifiNative.stopSupplicant()) { Loading Loading @@ -3197,8 +3200,11 @@ public class WifiStateMachine extends StateMachine { if (!mWifiConfigStore.isUsingStaticIp(mLastNetworkId)) { //start DHCP if (mDhcpStateMachine == null) { mDhcpStateMachine = DhcpStateMachine.makeDhcpStateMachine( mContext, WifiStateMachine.this, mInterfaceName); } mDhcpStateMachine.registerForPreDhcpNotification(); mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_START_DHCP); } else { Loading Loading
core/java/android/net/DhcpStateMachine.java +7 −1 Original line number Diff line number Diff line Loading @@ -92,10 +92,12 @@ public class DhcpStateMachine extends StateMachine { /* Notification from DHCP state machine post DHCP discovery/renewal. Indicates * success/failure */ public static final int CMD_POST_DHCP_ACTION = BASE + 5; /* Notification from DHCP state machine before quitting */ public static final int CMD_ON_QUIT = BASE + 6; /* Command from controller to indicate DHCP discovery/renewal can continue * after pre DHCP action is complete */ public static final int CMD_PRE_DHCP_ACTION_COMPLETE = BASE + 6; public static final int CMD_PRE_DHCP_ACTION_COMPLETE = BASE + 7; /* Message.arg1 arguments to CMD_POST_DHCP notification */ public static final int DHCP_SUCCESS = 1; Loading Loading @@ -172,6 +174,10 @@ public class DhcpStateMachine extends StateMachine { quit(); } protected void onQuitting() { mController.sendMessage(CMD_ON_QUIT); } class DefaultState extends State { @Override public void exit() { Loading
services/java/com/android/server/WifiService.java +3 −3 Original line number Diff line number Diff line Loading @@ -240,7 +240,7 @@ public class WifiService extends IWifiManager.Stub { switch (msg.what) { case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED: { if (msg.arg1 == AsyncChannel.STATUS_SUCCESSFUL) { Slog.d(TAG, "New client listening to asynchronous messages"); if (DBG) Slog.d(TAG, "New client listening to asynchronous messages"); mClients.add((AsyncChannel) msg.obj); } else { Slog.e(TAG, "Client connection failure, error=" + msg.arg1); Loading @@ -249,9 +249,9 @@ public class WifiService extends IWifiManager.Stub { } case AsyncChannel.CMD_CHANNEL_DISCONNECTED: { if (msg.arg1 == AsyncChannel.STATUS_SEND_UNSUCCESSFUL) { Slog.d(TAG, "Send failed, client connection lost"); if (DBG) Slog.d(TAG, "Send failed, client connection lost"); } else { Slog.d(TAG, "Client connection lost with reason: " + msg.arg1); if (DBG) Slog.d(TAG, "Client connection lost with reason: " + msg.arg1); } mClients.remove((AsyncChannel) msg.obj); break; Loading
wifi/java/android/net/wifi/WifiStateMachine.java +11 −5 Original line number Diff line number Diff line Loading @@ -1672,10 +1672,7 @@ public class WifiStateMachine extends StateMachine { /* In case we were in middle of DHCP operation restore back powermode */ handlePostDhcpSetup(); mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_STOP_DHCP); mDhcpStateMachine.doQuit(); mDhcpStateMachine = null; } try { Loading Loading @@ -1928,6 +1925,9 @@ public class WifiStateMachine extends StateMachine { case CMD_CLEAR_SUSPEND_OPTIMIZATIONS: case CMD_NO_NETWORKS_PERIODIC_SCAN: break; case DhcpStateMachine.CMD_ON_QUIT: mDhcpStateMachine = null; break; case CMD_SET_SUSPEND_OPTIMIZATIONS: mSuspendWakeLock.release(); break; Loading Loading @@ -2498,6 +2498,9 @@ public class WifiStateMachine extends StateMachine { /* Send any reset commands to supplicant before shutting it down */ handleNetworkDisconnect(); if (mDhcpStateMachine != null) { mDhcpStateMachine.doQuit(); } if (DBG) log("stopping supplicant"); if (!mWifiNative.stopSupplicant()) { Loading Loading @@ -3197,8 +3200,11 @@ public class WifiStateMachine extends StateMachine { if (!mWifiConfigStore.isUsingStaticIp(mLastNetworkId)) { //start DHCP if (mDhcpStateMachine == null) { mDhcpStateMachine = DhcpStateMachine.makeDhcpStateMachine( mContext, WifiStateMachine.this, mInterfaceName); } mDhcpStateMachine.registerForPreDhcpNotification(); mDhcpStateMachine.sendMessage(DhcpStateMachine.CMD_START_DHCP); } else { Loading