From 0874af841f7e23357ceb2bb8825180b111d613b4 Mon Sep 17 00:00:00 2001 From: twyen Date: Wed, 24 Jan 2018 16:48:49 -0800 Subject: 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 --- .../calllog/datasources/phonelookup/PhoneLookupDataSource.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'java/com/android/dialer/calllog/datasources/phonelookup') 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 phoneLookup; private final ListeningExecutorService backgroundExecutorService; private final ListeningExecutorService lightweightExecutorService; @@ -95,11 +93,9 @@ public final class PhoneLookupDataSource @Inject PhoneLookupDataSource( PhoneLookup 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() -- cgit v1.2.3