Fix FC depending on contact(s)

This commit is contained in:
Sylvain Berfini 2012-10-10 17:22:17 +02:00
parent fecf74ea74
commit 27c9b4bf7d

View file

@ -239,7 +239,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
TextView sipUri = (TextView) view.findViewById(R.id.sipUri);
if (getResources().getBoolean(R.bool.only_display_username_if_unknown) && LinphoneUtils.isSipAddress(address.getDisplayName())) {
if (getResources().getBoolean(R.bool.only_display_username_if_unknown) && address.getDisplayName() != null && LinphoneUtils.isSipAddress(address.getDisplayName())) {
address.setDisplayName(LinphoneUtils.getUsernameFromAddress(address.getDisplayName()));
} else if (getResources().getBoolean(R.bool.only_display_username_if_unknown) && LinphoneUtils.isSipAddress(contact)) {
contact = LinphoneUtils.getUsernameFromAddress(contact);