When we disconnect shutdown the StateMachine.
Need to stop the StateMachine threads and release all resources when we disconnect. bug: 6342470 Change-Id: Ibf7a2ebf4f7ecd667c5d95579e66ecd5086103ea
This commit is contained in:
@@ -444,6 +444,16 @@ public class AsyncChannel {
|
||||
if ((mConnection != null) && (mSrcContext != null)) {
|
||||
mSrcContext.unbindService(mConnection);
|
||||
}
|
||||
try {
|
||||
// Send the DISCONNECTED, although it may not be received
|
||||
// but its the best we can do.
|
||||
Message msg = Message.obtain();
|
||||
msg.what = CMD_CHANNEL_DISCONNECTED;
|
||||
msg.replyTo = mSrcMessenger;
|
||||
mDstMessenger.send(msg);
|
||||
} catch(Exception e) {
|
||||
}
|
||||
// Tell source we're disconnected.
|
||||
if (mSrcHandler != null) {
|
||||
replyDisconnected(STATUS_SUCCESSFUL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user