diff options
author | Jay Shrauner <shrauner@google.com> | 2013-09-25 10:01:44 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2013-09-28 12:10:07 -0700 |
commit | c089b0d2b1bf1bd511cd54dc51d9186b6ce41681 (patch) | |
tree | effeac55094aa7885249c7f9e9db0dfb65a0da22 /src/com/android/dialer/service | |
parent | 990c95f104c01a2f3417e48ac51b58d989d0f21b (diff) |
Change cached info to interface
Change AOSP cache API to interface and move DB data types to GoogleDialer
Bug:10980951
Change-Id: I37eb07f672458ab4d8789ecc4e9f2f60745de862
Diffstat (limited to 'src/com/android/dialer/service')
-rw-r--r-- | src/com/android/dialer/service/CachedNumberLookupService.java | 22 |
1 files changed, 10 insertions, 12 deletions
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); |