am de78352c: am ac9c73ae: Merge "Fix notification of disconnected networks." into honeycomb-LTE
* commit 'de78352c6c048e009fbeefb40a2b06a8573f7b7e':
Fix notification of disconnected networks.
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 53cbad5..ecc29e6 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -1569,13 +1569,16 @@
if(DBG) log("EVENT_DISCONNECT_DONE connId=" + connId);
if (ar.userObj instanceof ApnContext) {
apnContext = (ApnContext) ar.userObj;
+ } else {
+ loge("Invalid ar in onDisconnectDone");
+ return;
}
- mPhone.notifyDataConnection(apnContext.getReason(), apnContext.getApnType());
-
apnContext.setState(State.IDLE);
apnContext.setApnSetting(null);
+ mPhone.notifyDataConnection(apnContext.getReason(), apnContext.getApnType());
+
// if all data connection are gone, check whether Airplane mode request was
// pending.
if (!isConnected()) {