Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit e418d681 authored by Timi Rautamäki's avatar Timi Rautamäki Committed by Michael Bestas
Browse files

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

Only set the phone number in Rename mobile network dialog if it's not
empty in order to preserve the ´Not available´ -text.

Test: m, open ´SIMs´ in settings, click Pen-icon to edit SIM, verify
      either mobile number or ´Not available´ -text is shown.
Change-Id: I3bc1f1f4eb26cda38e5cc7a12bd4db1bf922f076
parent 2828a9ea
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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