From a4f4d185cf0a3c55cc4350f422e154dd4c637e16 Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Fri, 5 Dec 2014 15:34:46 -0800 Subject: Add debug dataEnable. Change-Id: I4c2c49d9283652429affc190abacf7775ef3fe43 --- src/com/android/settings/DataUsageSummary.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java index 1c17ce5..e523fa7 100644 --- a/src/com/android/settings/DataUsageSummary.java +++ b/src/com/android/settings/DataUsageSummary.java @@ -959,22 +959,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; } -- cgit v1.1