Improved bis function

This commit is contained in:
Sylvain Berfini 2012-09-27 11:47:06 +02:00
parent e4fbe64162
commit 728c676b29

View file

@ -23,6 +23,7 @@ import org.linphone.R;
import org.linphone.core.CallDirection;
import org.linphone.core.LinphoneCallLog;
import org.linphone.core.LinphoneCoreException;
import org.linphone.core.LinphoneProxyConfig;
import android.content.Context;
import android.util.AttributeSet;
@ -65,7 +66,13 @@ public class CallButton extends ImageView implements OnClickListener, AddressAwa
if (log == null) {
return;
}
LinphoneProxyConfig lpc = LinphoneManager.getLc().getDefaultProxyConfig();
if (lpc != null && log.getTo().getDomain().equals(lpc.getDomain())) {
mAddress.setText(log.getTo().getUserName());
} else {
mAddress.setText(log.getTo().asStringUriOnly());
}
mAddress.setDisplayedName(log.getTo().getDisplayName());
}
}