am 0badd0b7: Note net availability even when apn not enabled

Merge commit '0badd0b700ed618dac421cb6cde4654b51acb3a4' into eclair-plus-aosp

* commit '0badd0b700ed618dac421cb6cde4654b51acb3a4':
  Note net availability even when apn not enabled
This commit is contained in:
Robert Greenwalt
2009-08-24 17:47:01 -07:00
committed by Android Git Automerger
2 changed files with 5 additions and 2 deletions

View File

@ -147,7 +147,10 @@ public class MobileDataStateTracker extends NetworkStateTracker {
", unavailable = " + unavailable + ", reason = " +
(reason == null ? "(unspecified)" : reason));
if (isApnTypeIncluded(apnTypeList)) {
// set this even if the apn isn't Enabled
mNetworkInfo.setIsAvailable(!unavailable);
if (mEnabled == false) {
// if we're not enabled but the APN Type is supported by this connection
// we should record the interface name if one's provided. If the user
@ -168,7 +171,6 @@ public class MobileDataStateTracker extends NetworkStateTracker {
return;
}
mNetworkInfo.setIsAvailable(!unavailable);
if (mMobileDataState != state) {
mMobileDataState = state;
switch (state) {

View File

@ -453,7 +453,8 @@ public abstract class DataConnectionTracker extends Handler {
}
protected synchronized void setEnabled(int id, boolean enable) {
if (DBG) Log.d(LOG_TAG, "setEnabled(" + id + ", " + enable + ')');
if (DBG) Log.d(LOG_TAG, "setEnabled(" + id + ", " + enable + ") with old state = " +
dataEnabled[id] + " and enabledCount = " + enabledCount);
if (dataEnabled[id] != enable) {
dataEnabled[id] = enable;