diff options
author | Victor Chang <vichang@google.com> | 2016-03-30 19:18:18 +0100 |
---|---|---|
committer | Victor Chang <vichang@google.com> | 2016-03-30 18:20:42 +0000 |
commit | 758ba199a0a2bce7c69bfcc751bb16138bb6e609 (patch) | |
tree | d4f2fba37045599d1548efc26cf74fb3bc22b1f6 | |
parent | bddab395fc9de15edf4c09c67f09cfa3368b3631 (diff) |
[DO NOT MERGE] Fix Dialer crash loop for caller id in personal contact directory
The bug is dialer queries CP2 for alternative name by lookup key of personal directory
CP2 throws IllegalArgumentException as the lookup key is not found locally
slient IllegalArgumentException since alternative name is not very important to crash dialer.
(It's a fix by reverting some changes in ag/880910)
Bug:27905000
Change-Id: I1d61f52df63d93c9c7da436c7f2da2bdf3cced0c
-rw-r--r-- | src/com/android/dialer/calllog/ContactInfoHelper.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/dialer/calllog/ContactInfoHelper.java b/src/com/android/dialer/calllog/ContactInfoHelper.java index 6e84a92f9..b0ef0abf4 100644 --- a/src/com/android/dialer/calllog/ContactInfoHelper.java +++ b/src/com/android/dialer/calllog/ContactInfoHelper.java @@ -224,6 +224,8 @@ public class ContactInfoHelper { if (cursor != null && cursor.moveToFirst()) { return cursor.getString(PhoneQuery.NAME_ALTERNATIVE); } + } catch (IllegalArgumentException e) { + // Avoid dialer crash when lookup key is not valid } finally { if (cursor != null) { cursor.close(); |