summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/com/android/dialer/logging/contact_source.proto2
-rw-r--r--java/com/android/dialer/phonenumbercache/CachedNumberLookupService.java4
-rw-r--r--java/com/android/incallui/CallCardPresenter.java8
-rw-r--r--java/com/android/incallui/ConferenceParticipantListAdapter.java4
-rw-r--r--java/com/android/incallui/ContactInfoCache.java19
-rw-r--r--java/com/android/incallui/bindings/PhoneNumberService.java18
6 files changed, 7 insertions, 48 deletions
diff --git a/java/com/android/dialer/logging/contact_source.proto b/java/com/android/dialer/logging/contact_source.proto
index 7b90730ab..fbff642b2 100644
--- a/java/com/android/dialer/logging/contact_source.proto
+++ b/java/com/android/dialer/logging/contact_source.proto
@@ -16,8 +16,6 @@ message ContactSource {
// number's status at the time they made or received the call.
// Type definitions are from the CachedContactInfo interface in
// CachedNumberLookupService.java
- // When adding new sources here, consider updating the isPeopleApiSource() and
- // isBusiness() methods in LookupSourceUtils.java if needed.
enum Type {
UNKNOWN_SOURCE_TYPE = 0;
diff --git a/java/com/android/dialer/phonenumbercache/CachedNumberLookupService.java b/java/com/android/dialer/phonenumbercache/CachedNumberLookupService.java
index c398251e4..b2720d19d 100644
--- a/java/com/android/dialer/phonenumbercache/CachedNumberLookupService.java
+++ b/java/com/android/dialer/phonenumbercache/CachedNumberLookupService.java
@@ -43,8 +43,6 @@ public interface CachedNumberLookupService {
void addContact(Context context, CachedContactInfo info);
- boolean isCacheUri(String uri);
-
boolean isBusiness(ContactSource.Type sourceType);
boolean canReportAsInvalid(ContactSource.Type sourceType, String objectId);
@@ -71,8 +69,6 @@ public interface CachedNumberLookupService {
void setDirectorySource(String name, long directoryId);
- void setExtendedSource(String name, long directoryId);
-
void setLookupKey(String lookupKey);
}
}
diff --git a/java/com/android/incallui/CallCardPresenter.java b/java/com/android/incallui/CallCardPresenter.java
index 83c1aff5e..9772cb1df 100644
--- a/java/com/android/incallui/CallCardPresenter.java
+++ b/java/com/android/incallui/CallCardPresenter.java
@@ -321,9 +321,7 @@ public class CallCardPresenter
}
this.primary.addListener(this);
- primaryContactInfo =
- ContactInfoCache.buildCacheEntryFromCall(
- context, this.primary, this.primary.getState() == DialerCallState.INCOMING);
+ primaryContactInfo = ContactInfoCache.buildCacheEntryFromCall(context, this.primary);
updatePrimaryDisplayInfo();
maybeStartSearch(this.primary, true);
}
@@ -339,9 +337,7 @@ public class CallCardPresenter
updateSecondaryDisplayInfo();
} else {
// secondary call has changed
- secondaryContactInfo =
- ContactInfoCache.buildCacheEntryFromCall(
- context, this.secondary, this.secondary.getState() == DialerCallState.INCOMING);
+ secondaryContactInfo = ContactInfoCache.buildCacheEntryFromCall(context, this.secondary);
updateSecondaryDisplayInfo();
maybeStartSearch(this.secondary, false);
}
diff --git a/java/com/android/incallui/ConferenceParticipantListAdapter.java b/java/com/android/incallui/ConferenceParticipantListAdapter.java
index 5318fdb5f..c71bf59b2 100644
--- a/java/com/android/incallui/ConferenceParticipantListAdapter.java
+++ b/java/com/android/incallui/ConferenceParticipantListAdapter.java
@@ -397,9 +397,7 @@ public class ConferenceParticipantListAdapter extends BaseAdapter {
newCallIds.add(callId);
ContactCacheEntry contactCache = cache.getInfo(callId);
if (contactCache == null) {
- contactCache =
- ContactInfoCache.buildCacheEntryFromCall(
- getContext(), call, call.getState() == DialerCallState.INCOMING);
+ contactCache = ContactInfoCache.buildCacheEntryFromCall(getContext(), call);
}
if (participantsByCallId.containsKey(callId)) {
diff --git a/java/com/android/incallui/ContactInfoCache.java b/java/com/android/incallui/ContactInfoCache.java
index 81c7b724d..f01bddd58 100644
--- a/java/com/android/incallui/ContactInfoCache.java
+++ b/java/com/android/incallui/ContactInfoCache.java
@@ -138,8 +138,7 @@ public class ContactInfoCache implements OnImageLoadCompleteListener {
return cache;
}
- static ContactCacheEntry buildCacheEntryFromCall(
- Context context, DialerCall call, boolean isIncoming) {
+ static ContactCacheEntry buildCacheEntryFromCall(Context context, DialerCall call) {
final ContactCacheEntry entry = new ContactCacheEntry();
// TODO: get rid of caller info.
@@ -837,7 +836,7 @@ public class ContactInfoCache implements OnImageLoadCompleteListener {
final PhoneNumberServiceListener listener =
new PhoneNumberServiceListener(callId, queryToken.queryId);
cacheEntry.hasPendingQuery = true;
- phoneNumberService.getPhoneNumberInfo(cacheEntry.number, listener, listener, isIncoming);
+ phoneNumberService.getPhoneNumberInfo(cacheEntry.number, listener);
}
sendInfoNotifications(callId, cacheEntry);
if (!cacheEntry.hasPendingQuery) {
@@ -855,8 +854,7 @@ public class ContactInfoCache implements OnImageLoadCompleteListener {
}
}
- class PhoneNumberServiceListener
- implements PhoneNumberService.NumberLookupListener, PhoneNumberService.ImageLookupListener {
+ class PhoneNumberServiceListener implements PhoneNumberService.NumberLookupListener {
private final String callId;
private final int queryIdOfRemoteLookup;
@@ -924,17 +922,6 @@ public class ContactInfoCache implements OnImageLoadCompleteListener {
clearCallbacks(callId);
}
}
-
- @Override
- public void onImageFetchComplete(Bitmap bitmap) {
- Log.d(TAG, "PhoneNumberServiceListener.onImageFetchComplete");
- if (!isWaitingForThisQuery(callId, queryIdOfRemoteLookup)) {
- return;
- }
- CallerInfoQueryToken queryToken = new CallerInfoQueryToken(queryIdOfRemoteLookup, callId);
- loadImage(null, bitmap, queryToken);
- onImageLoadComplete(TOKEN_UPDATE_PHOTO_FOR_CALL_STATE, null, bitmap, queryToken);
- }
}
private boolean needForceQuery(DialerCall call, ContactCacheEntry cacheEntry) {
diff --git a/java/com/android/incallui/bindings/PhoneNumberService.java b/java/com/android/incallui/bindings/PhoneNumberService.java
index c40891a2c..2e1ae1f6c 100644
--- a/java/com/android/incallui/bindings/PhoneNumberService.java
+++ b/java/com/android/incallui/bindings/PhoneNumberService.java
@@ -16,7 +16,6 @@
package com.android.incallui.bindings;
-import android.graphics.Bitmap;
import com.android.dialer.logging.ContactLookupResult;
/** Provides phone number lookup services. */
@@ -27,13 +26,8 @@ public interface PhoneNumberService {
*
* @param phoneNumber The phone number to lookup.
* @param listener The listener to notify when the phone number lookup is complete.
- * @param imageListener The listener to notify when the image lookup is complete.
*/
- void getPhoneNumberInfo(
- String phoneNumber,
- NumberLookupListener listener,
- ImageLookupListener imageListener,
- boolean isIncoming);
+ void getPhoneNumberInfo(String phoneNumber, NumberLookupListener listener);
interface NumberLookupListener {
@@ -45,16 +39,6 @@ public interface PhoneNumberService {
void onPhoneNumberInfoComplete(PhoneNumberInfo info);
}
- interface ImageLookupListener {
-
- /**
- * Callback when a image has been fetched.
- *
- * @param bitmap The fetched image.
- */
- void onImageFetchComplete(Bitmap bitmap);
- }
-
interface PhoneNumberInfo {
String getDisplayName();