Add debug dataEnable.
Change-Id: I4c2c49d9283652429affc190abacf7775ef3fe43
This commit is contained in:
@@ -959,22 +959,29 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local cache of value, used to work around delay when
|
* Local cache of value, used to work around delays.
|
||||||
* {@link ConnectivityManager#setMobileDataEnabled(boolean)} is async.
|
|
||||||
*/
|
*/
|
||||||
private Boolean mMobileDataEnabled;
|
private Boolean mMobileDataEnabled;
|
||||||
|
|
||||||
private boolean isMobileDataEnabled(int subId) {
|
private boolean isMobileDataEnabled(int subId) {
|
||||||
|
if (LOGD) Log.d(TAG, "isMobileDataEnabled:+ subId=" + subId);
|
||||||
boolean isEnable = false;
|
boolean isEnable = false;
|
||||||
if (mMobileDataEnabled != null) {
|
if (mMobileDataEnabled != null) {
|
||||||
// TODO: deprecate and remove this once enabled flag is on policy
|
// TODO: deprecate and remove this once enabled flag is on policy
|
||||||
// Multiple Subscriptions, the value need to be reseted
|
// Multiple Subscriptions, the value need to be reseted
|
||||||
isEnable = mMobileDataEnabled.booleanValue();
|
isEnable = mMobileDataEnabled.booleanValue();
|
||||||
|
if (LOGD) {
|
||||||
|
Log.d(TAG, "isMobileDataEnabled: != null, subId=" + subId
|
||||||
|
+ " isEnable=" + isEnable);
|
||||||
|
}
|
||||||
mMobileDataEnabled = null;
|
mMobileDataEnabled = null;
|
||||||
} else {
|
} else {
|
||||||
// SUB SELECT
|
// SUB SELECT
|
||||||
isEnable = mTelephonyManager.getDataEnabled()
|
isEnable = mTelephonyManager.getDataEnabled(subId);
|
||||||
&& (subId == mSubscriptionManager.getDefaultDataSubId());
|
if (LOGD) {
|
||||||
|
Log.d(TAG, "isMobileDataEnabled: == null, subId=" + subId
|
||||||
|
+ " isEnable=" + isEnable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return isEnable;
|
return isEnable;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user