Handle client loss for a full connection

Bug: 3513246
Change-Id: I928544a05702bb004457e2b0d2eeb3c34f98edf9
This commit is contained in:
Irfan Sheriff
2011-03-04 17:06:31 -08:00
parent c3549dd49b
commit c23971b3e4
2 changed files with 33 additions and 11 deletions

View File

@ -229,6 +229,15 @@ public class WifiService extends IWifiManager.Stub {
}
break;
}
case AsyncChannel.CMD_CHANNEL_DISCONNECTED: {
if (msg.arg1 == AsyncChannel.STATUS_SEND_UNSUCCESSFUL) {
Slog.d(TAG, "Send failed, client connection lost");
} else {
Slog.d(TAG, "Client connection lost with reason: " + msg.arg1);
}
mClients.remove((AsyncChannel) msg.obj);
break;
}
case AsyncChannel.CMD_CHANNEL_FULL_CONNECTION: {
AsyncChannel ac = new AsyncChannel();
ac.connect(mContext, this, msg.replyTo);