am a5f158bd: Merge change 2347 into donut

Merge commit 'a5f158bdde77f8d173d1f1c95d0f92405c519b0f'

* commit 'a5f158bdde77f8d173d1f1c95d0f92405c519b0f':
  Fix Disconnect path for CDMA.
This commit is contained in:
Android (Google) Code Review
2009-05-26 10:11:35 -07:00
committed by The Android Open Source Project

View File

@@ -146,12 +146,16 @@ public class CdmaDataConnection extends DataConnection {
null, obtainMessage(EVENT_SETUP_DATA_CONNECTION_DONE));
}
private void tearDownData(Message msg) {
if (phone.mCM.getRadioState().isOn()) {
phone.mCM.deactivateDataCall(cid, obtainMessage(EVENT_DEACTIVATE_DONE, msg));
}
}
protected void disconnect(Message msg) {
onDisconnect = msg;
if (state == State.ACTIVE) {
if (phone.mCM.getRadioState().isOn()) {
phone.mCM.deactivateDataCall(cid, obtainMessage(EVENT_DEACTIVATE_DONE, msg));
}
tearDownData(msg);
} else if (state == State.ACTIVATING) {
receivedDisconnectReq = true;
} else {
@@ -280,7 +284,7 @@ public class CdmaDataConnection extends DataConnection {
// Don't bother reporting success if there's already a
// pending disconnect request, since DataConnectionTracker
// has already updated its state.
disconnect(onDisconnect);
tearDownData(onDisconnect);
} else {
String[] response = ((String[]) ar.result);
cid = Integer.parseInt(response[0]);