diff options
-rw-r--r-- | java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java index cdde638ee..508191cde 100644 --- a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java +++ b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java @@ -403,6 +403,7 @@ public final class PhoneLookupDataSource return idsByNumber; } + /** Returned map must have same keys as {@code uniqueDialerPhoneNumbers} */ private ImmutableMap<DialerPhoneNumber, PhoneLookupInfo> queryPhoneLookupHistoryForNumbers( Context appContext, Set<DialerPhoneNumber> uniqueDialerPhoneNumbers) { DialerPhoneNumberUtil dialerPhoneNumberUtil = @@ -431,13 +432,9 @@ public final class PhoneLookupDataSource selection, normalizedNumbers, null)) { - if (cursor == null) { LogUtil.e("PhoneLookupDataSource.queryPhoneLookupHistoryForNumbers", "null cursor"); - return ImmutableMap.of(); - } - - if (cursor.moveToFirst()) { + } else if (cursor.moveToFirst()) { int normalizedNumberColumn = cursor.getColumnIndexOrThrow(PhoneLookupHistory.NORMALIZED_NUMBER); int phoneLookupInfoColumn = |