Merge "[Provider Model] Fix preference summary not update." into sc-dev

This commit is contained in:
Tom Hsu
2021-03-05 03:25:59 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -257,9 +257,10 @@ public class SubscriptionsPreferenceController extends AbstractPreferenceControl
}
private CharSequence getMobilePreferenceSummary(int subId) {
TelephonyManager tm = mTelephonyManager.createForSubscriptionId(subId);
String result = mSubsPrefCtrlInjector.getNetworkType(
mContext, mConfig, mTelephonyDisplayInfo, subId);
if (!mTelephonyManager.isDataEnabled()) {
if (!tm.isDataEnabled()) {
return mContext.getString(R.string.mobile_data_off_summary);
}
if (!result.isEmpty() && mSubsPrefCtrlInjector.isActiveCellularNetwork(mContext)) {