Merge "Settings: only set phone number if it's not empty"

This commit is contained in:
Tsung-Mao Fang
2022-03-17 07:35:42 +00:00
committed by Gerrit Code Review

View File

@@ -184,7 +184,10 @@ public class RenameMobileNetworkDialogFragment extends InstrumentedDialogFragmen
phoneTitle.setVisibility(info.isOpportunistic() ? View.GONE : View.VISIBLE);
final TextView phoneNumber = view.findViewById(R.id.number_value);
phoneNumber.setText(DeviceInfoUtils.getBidiFormattedPhoneNumber(getContext(), info));
final String pn = DeviceInfoUtils.getBidiFormattedPhoneNumber(getContext(), info);
if (!TextUtils.isEmpty(pn)) {
phoneNumber.setText(pn);
}
}
@Override