summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2013-09-08 14:46:19 -0700
committerJay Shrauner <shrauner@google.com>2013-09-08 14:47:26 -0700
commitba61ecd888c9f46e42f6ef3f4bec7e08f5a00a5f (patch)
treea4912ef4cc01ad35bdf2dafbf98f3ca396d097ef /src
parent88517c68bac750e467f4b21caf7805c8b44b27f6 (diff)
Add directory source name to cache
Add directory source name and id for extended directories. Bug:10609551 Change-Id: I6ef7e320dde8e706233ab32afeff15ba1a7666bb
Diffstat (limited to 'src')
-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;