From 9a416f3c9261bc974e1366e832aae803eb47ad07 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 16 Feb 2017 16:54:22 +0100 Subject: [PATCH] Updated liblinphone + fixes for phone numbers --- src/org/linphone/ContactsManager.java | 11 +++-------- submodules/linphone | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/org/linphone/ContactsManager.java b/src/org/linphone/ContactsManager.java index 8da07cc7e..5326ae67d 100644 --- a/src/org/linphone/ContactsManager.java +++ b/src/org/linphone/ContactsManager.java @@ -237,14 +237,9 @@ public class ContactsManager extends ContentObserver { lpc = lc.getDefaultProxyConfig(); } String normalized = lpc.normalizePhoneNumber(phoneNumber); - LinphoneAddress addr = null; - try { - addr = LinphoneCoreFactory.instance().createLinphoneAddress(normalized); - } catch (LinphoneCoreException e) { - return null; - } - - LinphoneFriend lf = lc.findFriendByAddress(addr.asStringUriOnly()); + + LinphoneAddress addr = lpc.normalizeSipUri(normalized); + LinphoneFriend lf = lc.findFriendByAddress(addr.asStringUriOnly() + ";user=phone"); // Without this, the hashmap inside liblinphone won't find it... if (lf != null) { LinphoneContact contact = (LinphoneContact)((LinphoneFriendImpl)lf).getUserData(); return contact; diff --git a/submodules/linphone b/submodules/linphone index 9b7e5fabc..376f8ead9 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 9b7e5fabc35fe264a703affcf04571a8b0cee9bf +Subproject commit 376f8ead9c781e048e151aa4b66db1d0715914e7