CachedNumberLookupService.java revision 034a2b329e469bf6888fbbcf91992f974015c2a8
1034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Leepackage com.android.dialer.service;
2034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee
3034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Leeimport android.content.Context;
4034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee
5034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Leeimport com.android.dialer.calllog.ContactInfo;
6034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee
7034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Leepublic interface CachedNumberLookupService {
8034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee    /**
9034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     * Perform a lookup using the cached number lookup service to return contact
10034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     * information stored in the cache that corresponds to the given number.
11034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     *
12034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     * @param context Valid context
13034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     * @param number Phone number to lookup the cache for
14034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     * @return A {@link ContactInfo} containing the contact information if the phone
15034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     * number is found in the cache, {@link ContactInfo#EMPTY} if the phone number was
16034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     * not found in the cache, and null if there was an error when querying the cache.
17034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee     */
18034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee    public ContactInfo lookupCachedContactFromNumber(Context context, String number);
19034a2b329e469bf6888fbbcf91992f974015c2a8Yorke Lee}
20