From 083950ac002d3aef471a3078637fe4ffe8ff8b80 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 13 Oct 2016 14:03:50 +0200 Subject: [PATCH] Improved findContact to use the aliases as well --- src/org/linphone/ContactsManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/linphone/ContactsManager.java b/src/org/linphone/ContactsManager.java index 3c91f7618..dd9d24c6d 100644 --- a/src/org/linphone/ContactsManager.java +++ b/src/org/linphone/ContactsManager.java @@ -204,8 +204,9 @@ public class ContactsManager extends ContentObserver { if (lpc != null) { normalized = lpc.normalizePhoneNumber(noa.getValue()); } + String alias = c.getPresenceModelForUri(noa.getValue()); - if ((noa.isSIPAddress() && noa.getValue().equals(sipUri)) || (normalized != null && !noa.isSIPAddress() && normalized.equals(username)) || (!noa.isSIPAddress() && noa.getValue().equals(username))) { + if ((noa.isSIPAddress() && noa.getValue().equals(sipUri)) || (alias != null && alias.equals(sipUri)) || (normalized != null && !noa.isSIPAddress() && normalized.equals(username)) || (!noa.isSIPAddress() && noa.getValue().equals(username))) { return c; } }