Offer to "merge" subscribers for data usage.
When picking a template to use for querying statistics and setting policies, normalize it so we widen the template to cover any merged subscribers. Also remove some code related to long-dormant split policies. Bug: 18012787 Change-Id: I1e07dc09016df21ecfd7b3fad49759fa57570391
This commit is contained in:
@@ -769,8 +769,15 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
||||
if (LOGD) Log.d(TAG, "updateBody() mobile tab");
|
||||
setPreferenceTitle(mDataEnabledView, R.string.data_usage_enable_mobile);
|
||||
setPreferenceTitle(mDisableAtLimitView, R.string.data_usage_disable_mobile_limit);
|
||||
mTemplate = buildTemplateMobileAll(getActiveSubscriberId(context,getSubId(currentTab)));
|
||||
mDataEnabledSupported = isMobileDataAvailable(getSubId(currentTab));
|
||||
|
||||
// Match mobile traffic for this subscriber, but normalize it to
|
||||
// catch any other merged subscribers.
|
||||
mTemplate = buildTemplateMobileAll(
|
||||
getActiveSubscriberId(context, getSubId(currentTab)));
|
||||
mTemplate = NetworkTemplate.normalize(mTemplate,
|
||||
mTelephonyManager.getMergedSubscriberIds());
|
||||
|
||||
} else if (TAB_3G.equals(currentTab)) {
|
||||
if (LOGD) Log.d(TAG, "updateBody() 3g tab");
|
||||
setPreferenceTitle(mDataEnabledView, R.string.data_usage_enable_3g);
|
||||
@@ -1394,30 +1401,6 @@ public class DataUsageSummary extends HighlightingFragment implements Indexable
|
||||
}
|
||||
};
|
||||
|
||||
@Deprecated
|
||||
private boolean isMobilePolicySplit() {
|
||||
final Context context = getActivity();
|
||||
boolean retVal;
|
||||
if (hasReadyMobileRadio(context)) {
|
||||
final TelephonyManager tele = TelephonyManager.from(context);
|
||||
retVal = mPolicyEditor.isMobilePolicySplit(getActiveSubscriberId(context));
|
||||
} else {
|
||||
retVal = false;
|
||||
}
|
||||
if (LOGD) Log.d(TAG, "isMobilePolicySplit: retVal=" + retVal);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private void setMobilePolicySplit(boolean split) {
|
||||
final Context context = getActivity();
|
||||
if (hasReadyMobileRadio(context)) {
|
||||
final TelephonyManager tele = TelephonyManager.from(context);
|
||||
if (LOGD) Log.d(TAG, "setMobilePolicySplit: split=" + split);
|
||||
mPolicyEditor.setMobilePolicySplit(getActiveSubscriberId(context), split);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getActiveSubscriberId(Context context) {
|
||||
final TelephonyManager tele = TelephonyManager.from(context);
|
||||
final String actualSubscriberId = tele.getSubscriberId();
|
||||
|
Reference in New Issue
Block a user