diff options
author | Wink Saville <wink@google.com> | 2014-12-09 17:52:19 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-09 17:52:20 +0000 |
commit | 85d3b0fa6e2e8988f48a5a830dc3d279d05619fd (patch) | |
tree | 1bc06ada9d07f5f618198fd6f7d11f93c70dca05 /src | |
parent | 1e1251cc04ee9636721719aa0a13d94e15500258 (diff) | |
parent | a4f4d185cf0a3c55cc4350f422e154dd4c637e16 (diff) | |
download | packages_apps_Settings-85d3b0fa6e2e8988f48a5a830dc3d279d05619fd.zip packages_apps_Settings-85d3b0fa6e2e8988f48a5a830dc3d279d05619fd.tar.gz packages_apps_Settings-85d3b0fa6e2e8988f48a5a830dc3d279d05619fd.tar.bz2 |
Merge "Add debug dataEnable." into lmp-mr1-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/DataUsageSummary.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java index c24e0d6..3296ba1 100644 --- a/src/com/android/settings/DataUsageSummary.java +++ b/src/com/android/settings/DataUsageSummary.java @@ -966,22 +966,29 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable } /** - * Local cache of value, used to work around delay when - * {@link ConnectivityManager#setMobileDataEnabled(boolean)} is async. + * Local cache of value, used to work around delays. */ private Boolean mMobileDataEnabled; private boolean isMobileDataEnabled(int subId) { + if (LOGD) Log.d(TAG, "isMobileDataEnabled:+ subId=" + subId); boolean isEnable = false; if (mMobileDataEnabled != null) { // TODO: deprecate and remove this once enabled flag is on policy // Multiple Subscriptions, the value need to be reseted isEnable = mMobileDataEnabled.booleanValue(); + if (LOGD) { + Log.d(TAG, "isMobileDataEnabled: != null, subId=" + subId + + " isEnable=" + isEnable); + } mMobileDataEnabled = null; } else { - //SUB SELECT - isEnable = mTelephonyManager.getDataEnabled() - && (subId == mSubscriptionManager.getDefaultDataSubId()); + // SUB SELECT + isEnable = mTelephonyManager.getDataEnabled(subId); + if (LOGD) { + Log.d(TAG, "isMobileDataEnabled: == null, subId=" + subId + + " isEnable=" + isEnable); + } } return isEnable; } |