summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog/datasources
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2018-01-24 16:48:49 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-24 19:09:39 -0800
commit0874af841f7e23357ceb2bb8825180b111d613b4 (patch)
tree23982c4a353490aa0a605b0e04b8656def2a3775 /java/com/android/dialer/calllog/datasources
parent2a422f719b70f6c292b954fb24f324b7f4ac1858 (diff)
Show Icon and label for blocked numbers
CallLogPhoto.getPhotoUri() returns a URI to a drawable so it will be easier to transition into glide. Meanwhile ContactPhotoManager will just show the drawable directly. Bug: 70989547 Test: Unit tests PiperOrigin-RevId: 183163818 Change-Id: I4ee4ff98782e35d2be03dfe14f8bf3dfd6ded074
Diffstat (limited to 'java/com/android/dialer/calllog/datasources')
-rw-r--r--java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java
index a0874f0cd..565a2a333 100644
--- a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java
+++ b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java
@@ -37,7 +37,6 @@ import com.android.dialer.common.Assert;
import com.android.dialer.common.LogUtil;
import com.android.dialer.common.concurrent.Annotations.BackgroundExecutor;
import com.android.dialer.common.concurrent.Annotations.LightweightExecutor;
-import com.android.dialer.inject.ApplicationContext;
import com.android.dialer.phonelookup.PhoneLookup;
import com.android.dialer.phonelookup.PhoneLookupInfo;
import com.android.dialer.phonelookup.consolidator.PhoneLookupInfoConsolidator;
@@ -68,7 +67,6 @@ import javax.inject.Inject;
public final class PhoneLookupDataSource
implements CallLogDataSource, PhoneLookup.ContentObserverCallbacks {
- private final Context appContext;
private final PhoneLookup<PhoneLookupInfo> phoneLookup;
private final ListeningExecutorService backgroundExecutorService;
private final ListeningExecutorService lightweightExecutorService;
@@ -95,11 +93,9 @@ public final class PhoneLookupDataSource
@Inject
PhoneLookupDataSource(
PhoneLookup<PhoneLookupInfo> phoneLookup,
- @ApplicationContext Context appContext,
@BackgroundExecutor ListeningExecutorService backgroundExecutorService,
@LightweightExecutor ListeningExecutorService lightweightExecutorService) {
this.phoneLookup = phoneLookup;
- this.appContext = appContext;
this.backgroundExecutorService = backgroundExecutorService;
this.lightweightExecutorService = lightweightExecutorService;
}
@@ -584,7 +580,7 @@ public final class PhoneLookupDataSource
private void updateContentValues(ContentValues contentValues, PhoneLookupInfo phoneLookupInfo) {
PhoneLookupInfoConsolidator phoneLookupInfoConsolidator =
- new PhoneLookupInfoConsolidator(appContext, phoneLookupInfo);
+ new PhoneLookupInfoConsolidator(phoneLookupInfo);
contentValues.put(
AnnotatedCallLog.NUMBER_ATTRIBUTES,
NumberAttributes.newBuilder()
@@ -595,6 +591,7 @@ public final class PhoneLookupDataSource
.setNumberTypeLabel(phoneLookupInfoConsolidator.getNumberLabel())
.setIsBusiness(phoneLookupInfoConsolidator.isBusiness())
.setIsVoicemail(phoneLookupInfoConsolidator.isVoicemail())
+ .setIsBlocked(phoneLookupInfoConsolidator.isBlocked())
.setCanReportAsInvalidNumber(phoneLookupInfoConsolidator.canReportAsInvalidNumber())
.setIsCp2InfoIncomplete(phoneLookupInfoConsolidator.isCp2LocalInfoIncomplete())
.build()