diff options
author | Wink Saville <wink@google.com> | 2011-01-30 23:12:35 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-30 23:12:35 -0800 |
commit | cde85d573873adce9ebcf0d2c4c2c5c1b8d465cc (patch) | |
tree | bc3546cdf5a9816388696e1e2e4fbc2c3d099b49 | |
parent | e3004e7867925e70bf4930384a265106f45f87d6 (diff) | |
parent | ea9af9e97b143200ef2d572c580b0e3368feab11 (diff) | |
download | frameworks_base-cde85d573873adce9ebcf0d2c4c2c5c1b8d465cc.zip frameworks_base-cde85d573873adce9ebcf0d2c4c2c5c1b8d465cc.tar.gz frameworks_base-cde85d573873adce9ebcf0d2c4c2c5c1b8d465cc.tar.bz2 |
Merge "Add debug for tracking bug 3404006." into honeycomb
-rw-r--r-- | telephony/java/com/android/internal/telephony/DataConnectionTracker.java | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java index 2343dd8..7f8485b 100644 --- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java @@ -531,7 +531,9 @@ public abstract class DataConnectionTracker extends Handler { * {@code true} otherwise. */ public synchronized boolean getAnyDataEnabled() { - return (mInternalDataEnabled && mDataEnabled && (enabledCount != 0)); + boolean result = (mInternalDataEnabled && mDataEnabled && (enabledCount != 0)); + if (!result && DBG) log("getAnyDataEnabled " + result); + return result; } protected abstract void startNetStatPoll(); @@ -657,7 +659,13 @@ public abstract class DataConnectionTracker extends Handler { // disabled apn's still need avail/unavail notificiations - send them out protected void notifyOffApnsOfAvailability(String reason, boolean availability) { - if (mAvailability == availability) return; + if (mAvailability == availability) { + if (DBG) { + log("notifyOffApnsOfAvailability: no change in availability, " + + "not nofitying about reason='" + reason + "' availability=" + availability); + } + return; + } mAvailability = availability; for (int id = 0; id < APN_NUM_TYPES; id++) { if (!isApnIdEnabled(id)) { @@ -685,10 +693,13 @@ public abstract class DataConnectionTracker extends Handler { * @return {@code true} if data connectivity is possible, {@code false} otherwise. */ protected boolean isDataPossible() { - boolean possible = (isDataAllowed() - && !(getAnyDataEnabled() && (mState == State.FAILED || mState == State.IDLE))); - if (!possible && DBG && isDataAllowed()) { - log("Data not possible. No coverage: dataState = " + mState); + boolean dataAllowed = isDataAllowed(); + boolean anyDataEnabled = getAnyDataEnabled(); + boolean possible = (dataAllowed + && !(anyDataEnabled && (mState == State.FAILED || mState == State.IDLE))); + if (!possible && DBG) { + log("isDataPossible() " + possible + ", dataAllowed=" + dataAllowed + + " anyDataEnabled=" + anyDataEnabled + " dataState=" + mState); } return possible; } |