Fix a crash caused by SIP addresses containing "%40" instead of "@"
ContactInfoHelper.lookupNumber() was assuming that SIP addresses would
always contain the character '@', but that's not always true since the
username/domainname delimiter can actually be "%40" (the URI-escaped
equivalent.)
This would cause Dialtacts to crash upon launch if you somehow managed to
get a SIP address like "123%40foo" in your call log.
TESTED:
(1) Make an outgoing call to the (malformed) SIP address "123%40foo"
(2) Launch Dialtacts ("Phone")
==> No longer crashes
This change should be submitted after change I62d15a in frameworks/base,
which adds the PhoneNumberUtils.getUsernameFromUriNumber() method.
Bug: 5637074
Change-Id: I06f333cf993ca5e33b88c0c8b9006116b6fd5cf7
1 file changed