Normalize numbers in contact
This commit is contained in:
parent
4d5d4869bb
commit
383c6a10fb
1 changed files with 3 additions and 1 deletions
|
@ -79,8 +79,9 @@ public class ContactFragment extends Fragment implements OnClickListener {
|
||||||
private OnClickListener chatListener = new OnClickListener() {
|
private OnClickListener chatListener = new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (LinphoneActivity.isInstanciated())
|
if (LinphoneActivity.isInstanciated()) {
|
||||||
LinphoneActivity.instance().displayChat(v.getTag().toString());
|
LinphoneActivity.instance().displayChat(v.getTag().toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -147,6 +148,7 @@ public class ContactFragment extends Fragment implements OnClickListener {
|
||||||
v.findViewById(R.id.start_chat).setOnClickListener(chatListener);
|
v.findViewById(R.id.start_chat).setOnClickListener(chatListener);
|
||||||
LinphoneProxyConfig lpc = LinphoneManager.getLc().getDefaultProxyConfig();
|
LinphoneProxyConfig lpc = LinphoneManager.getLc().getDefaultProxyConfig();
|
||||||
if (lpc != null) {
|
if (lpc != null) {
|
||||||
|
displayednumberOrAddress = lpc.normalizePhoneNumber(displayednumberOrAddress);
|
||||||
if (!displayednumberOrAddress.startsWith("sip:")) {
|
if (!displayednumberOrAddress.startsWith("sip:")) {
|
||||||
numberOrAddress = "sip:" + displayednumberOrAddress;
|
numberOrAddress = "sip:" + displayednumberOrAddress;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue