am a9378485: Merge "Telephony: GDCT - Set enabled state before notification is sent out." into honeycomb-LTE
* commit 'a9378485cb8d0968a9a177f730875e0f1d49d689': Telephony: GDCT - Set enabled state before notification is sent out.
This commit is contained in:
@@ -545,16 +545,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isEnabled(String apnType) {
|
|
||||||
ApnContext apnContext = mApnContexts.get(apnType);
|
|
||||||
if (apnContext == null) return false;
|
|
||||||
if (apnContext.getState() == State.DISCONNECTING
|
|
||||||
&& apnContext.getPendingAction() == ApnContext.PENDING_ACTION_APN_DISABLE) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report on whether data connectivity is enabled for any APN.
|
* Report on whether data connectivity is enabled for any APN.
|
||||||
* @return {@code false} if data connectivity has been explicitly disabled,
|
* @return {@code false} if data connectivity has been explicitly disabled,
|
||||||
@@ -1613,6 +1603,12 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
|||||||
|
|
||||||
mPhone.notifyDataConnection(apnContext.getReason(), apnContext.getApnType());
|
mPhone.notifyDataConnection(apnContext.getReason(), apnContext.getApnType());
|
||||||
|
|
||||||
|
// Check if APN disabled.
|
||||||
|
if (apnContext.getPendingAction() == ApnContext.PENDING_ACTION_APN_DISABLE) {
|
||||||
|
apnContext.setEnabled(false);
|
||||||
|
apnContext.setPendingAction(ApnContext.PENDING_ACTION_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
// if all data connection are gone, check whether Airplane mode request was
|
// if all data connection are gone, check whether Airplane mode request was
|
||||||
// pending.
|
// pending.
|
||||||
if (!isConnected()) {
|
if (!isConnected()) {
|
||||||
@@ -1622,12 +1618,6 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if APN disabled.
|
|
||||||
if (apnContext.getPendingAction() == ApnContext.PENDING_ACTION_APN_DISABLE) {
|
|
||||||
apnContext.setEnabled(false);
|
|
||||||
apnContext.setPendingAction(ApnContext.PENDING_ACTION_NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TextUtils.equals(apnContext.getApnType(), Phone.APN_TYPE_DEFAULT)
|
if (TextUtils.equals(apnContext.getApnType(), Phone.APN_TYPE_DEFAULT)
|
||||||
&& retryAfterDisconnected(apnContext.getReason())) {
|
&& retryAfterDisconnected(apnContext.getReason())) {
|
||||||
SystemProperties.set("gsm.defaultpdpcontext.active", "false");
|
SystemProperties.set("gsm.defaultpdpcontext.active", "false");
|
||||||
|
|||||||
Reference in New Issue
Block a user