summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2013-09-09 14:29:06 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-09 14:29:06 -0700
commit10944596b81a641b3ef84152da6f7df5512036dc (patch)
treed27ba4d31690008183a49a530b58c21a6ba6f0ae
parent7f2b5a42ec2709cebe30a39ca46d70b262214f9d (diff)
parentc788b6d10296ecfa31db19a7495ae1646e06ab90 (diff)
am c788b6d1: am 13a58c38: Merge "Add directory source name to cache" into klp-dev
* commit 'c788b6d10296ecfa31db19a7495ae1646e06ab90': Add directory source name to cache
-rw-r--r--src/com/android/dialer/list/RegularSearchListAdapter.java12
-rw-r--r--src/com/android/dialer/service/CachedNumberLookupService.java1
2 files changed, 6 insertions, 7 deletions
diff --git a/src/com/android/dialer/list/RegularSearchListAdapter.java b/src/com/android/dialer/list/RegularSearchListAdapter.java
index 627262ebe..58779124e 100644
--- a/src/com/android/dialer/list/RegularSearchListAdapter.java
+++ b/src/com/android/dialer/list/RegularSearchListAdapter.java
@@ -50,13 +50,11 @@ public class RegularSearchListAdapter extends DialerPhoneNumberListAdapter {
final DirectoryPartition partition =
(DirectoryPartition) getPartition(partitionIndex);
final long directoryId = partition.getDirectoryId();
- if (isExtendedDirectory(directoryId)) {
- info.sourceType = CachedContactInfo.SOURCE_TYPE_EXTENDED;
- // TODO source_id for extended directory?
- } else {
- info.sourceType = CachedContactInfo.SOURCE_TYPE_DIRECTORY;
- info.sourceId = (int) directoryId;
- }
+ info.sourceName = partition.getLabel();
+ info.sourceType = isExtendedDirectory(directoryId) ?
+ CachedContactInfo.SOURCE_TYPE_EXTENDED :
+ CachedContactInfo.SOURCE_TYPE_DIRECTORY;
+ info.sourceId = (int) directoryId;
}
return info;
}
diff --git a/src/com/android/dialer/service/CachedNumberLookupService.java b/src/com/android/dialer/service/CachedNumberLookupService.java
index 27bf58918..b04593493 100644
--- a/src/com/android/dialer/service/CachedNumberLookupService.java
+++ b/src/com/android/dialer/service/CachedNumberLookupService.java
@@ -13,6 +13,7 @@ public interface CachedNumberLookupService {
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;