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

Commit 9209ce85 authored by Sanket Padawe's avatar Sanket Padawe Committed by Android (Google) Code Review
Browse files

Merge "Changing sim selection dialog in Settings to use phoneAccount" into lmp-mr1-dev

parents cd1846fa 79e44da1
Loading
Loading
Loading
Loading
+19 −4
Original line number Diff line number Diff line
@@ -372,10 +372,25 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable

            if (mDialogId == CALLS_PICK) {
                holder.title.setText(getItem(position));
                holder.summary.setText("");
                if (position == 0) {
                    holder.icon.setImageDrawable(getResources()
                            .getDrawable(R.drawable.ic_live_help));
                    holder.icon.setAlpha(OPACITY);
                    holder.summary.setText("");
                } else {
                    final TelecomManager telecomManager = TelecomManager.from(getActivity());
                    final Iterator<PhoneAccountHandle> phoneAccounts =
                            telecomManager.getCallCapablePhoneAccounts().listIterator();
                    while (phoneAccounts.hasNext()) {
                        final PhoneAccount phoneAccount =
                                telecomManager.getPhoneAccount(phoneAccounts.next());
                        if (getItem(position).equals((String) phoneAccount.getLabel())) {
                            holder.icon.setImageBitmap(phoneAccount.getIconBitmap());
                            holder.summary
                                    .setText(phoneAccount.getAddress().getSchemeSpecificPart());
                        }
                    }
                }
            } else {
                sir = mSelectableSubInfos.get(position);
                holder.title.setText(sir.getDisplayName());