From c089b0d2b1bf1bd511cd54dc51d9186b6ce41681 Mon Sep 17 00:00:00 2001 From: Jay Shrauner Date: Wed, 25 Sep 2013 10:01:44 -0700 Subject: Change cached info to interface Change AOSP cache API to interface and move DB data types to GoogleDialer Bug:10980951 Change-Id: I37eb07f672458ab4d8789ecc4e9f2f60745de862 --- .../dialer/service/CachedNumberLookupService.java | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/com/android/dialer/service') diff --git a/src/com/android/dialer/service/CachedNumberLookupService.java b/src/com/android/dialer/service/CachedNumberLookupService.java index cba158b53..62881d2fe 100644 --- a/src/com/android/dialer/service/CachedNumberLookupService.java +++ b/src/com/android/dialer/service/CachedNumberLookupService.java @@ -7,29 +7,27 @@ import com.android.dialer.calllog.ContactInfo; public interface CachedNumberLookupService { - public class CachedContactInfo extends ContactInfo { - public static final int SOURCE_TYPE_DIRECTORY = 1; - public static final int SOURCE_TYPE_EXTENDED = 2; - public static final int SOURCE_TYPE_PLACES = 3; - public static final int SOURCE_TYPE_PROFILE = 4; - - public String sourceName; - public int sourceType; - public int sourceId; - public String lookupKey; + public interface CachedContactInfo { + public ContactInfo getContactInfo(); + + public void setDirectorySource(String name, long directoryId); + public void setExtendedSource(String name, long directoryId); + public void setLookupKey(String lookupKey); } + public CachedContactInfo buildCachedContactInfo(ContactInfo info); + /** * Perform a lookup using the cached number lookup service to return contact * information stored in the cache that corresponds to the given number. * * @param context Valid context * @param number Phone number to lookup the cache for - * @return A {@link ContactInfo} containing the contact information if the phone + * @return A {@link CachedContactInfo} containing the contact information if the phone * number is found in the cache, {@link ContactInfo#EMPTY} if the phone number was * not found in the cache, and null if there was an error when querying the cache. */ - public ContactInfo lookupCachedContactFromNumber(Context context, String number); + public CachedContactInfo lookupCachedContactFromNumber(Context context, String number); public void addContact(Context context, CachedContactInfo info); -- cgit v1.2.3