summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorVictor Chang <vichang@google.com>2016-03-30 15:30:58 +0100
committerVictor Chang <vichang@google.com>2016-03-30 19:23:33 +0100
commitabbbf058f5a72d8b6b709da18248d690e58f317a (patch)
tree99a7d683505d5892fde3783e0e6c1fb2f19bd5f6 /InCallUI
parent1d764e39c9f9c94d81dd22cd2a53e2c94ce22cfc (diff)
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 2 fixes are included to avoid this happening 1. slient IllegalArgumentException since alternative name is not very important to crash dialer. (It's a fix by reverting some changes in ag/880910) 2. Check directory id before querying CP2 either one should fix this bug. Include both to make sure that it's not crashed. Unit test added. Bug:27905000 Change-Id: Ib8eab5f718a168fcec2785c3101e96bb91521d40
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/CallerInfo.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/CallerInfo.java b/InCallUI/src/com/android/incallui/CallerInfo.java
index f270678e0..f3d0e0763 100644
--- a/InCallUI/src/com/android/incallui/CallerInfo.java
+++ b/InCallUI/src/com/android/incallui/CallerInfo.java
@@ -322,7 +322,7 @@ public class CallerInfo {
info.userType = ContactsUtils.determineUserType(directoryId, contactId);
info.nameAlternative = ContactInfoHelper.lookUpDisplayNameAlternative(
- context, info.lookupKeyOrNull, info.userType);
+ context, info.lookupKeyOrNull, info.userType, directoryId);
}
cursor.close();
}