From 81670b01f8a43ee1036295f1c8b1c51398016b1e Mon Sep 17 00:00:00 2001 From: linyuh Date: Wed, 28 Feb 2018 09:49:44 -0800 Subject: Group info needed to show a block/report spam dialog into a proto to avoid long method signatures. Test: Existing tests PiperOrigin-RevId: 187338094 Change-Id: I0d7a5206d127931d322b5604b2bb81f5202b8de8 --- java/com/android/dialer/calllog/ui/menu/Modules.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'java/com/android/dialer/calllog') diff --git a/java/com/android/dialer/calllog/ui/menu/Modules.java b/java/com/android/dialer/calllog/ui/menu/Modules.java index 147972710..9df122331 100644 --- a/java/com/android/dialer/calllog/ui/menu/Modules.java +++ b/java/com/android/dialer/calllog/ui/menu/Modules.java @@ -20,6 +20,7 @@ import android.content.Context; import android.provider.CallLog.Calls; import android.telecom.PhoneAccountHandle; import android.text.TextUtils; +import com.android.dialer.blockreportspam.BlockReportSpamDialogInfo; import com.android.dialer.calldetails.CallDetailsActivity; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.calllog.model.CoalescedRow; @@ -83,15 +84,19 @@ final class Modules { modules.add(moduleForAddingToContacts.get()); } + BlockReportSpamDialogInfo blockReportSpamDialogInfo = + BlockReportSpamDialogInfo.newBuilder() + .setNormalizedNumber(row.number().getNormalizedNumber()) + .setCountryIso(row.number().getCountryIso()) + .setCallType(row.callType()) + .setReportingLocation(ReportingLocation.Type.CALL_LOG_HISTORY) + .build(); modules.addAll( SharedModules.createModulesHandlingBlockedOrSpamNumber( context, - row.number().getNormalizedNumber(), - row.number().getCountryIso(), - row.callType(), + blockReportSpamDialogInfo, row.numberAttributes().getIsBlocked(), - row.numberAttributes().getIsSpam(), - ReportingLocation.Type.CALL_LOG_HISTORY)); + row.numberAttributes().getIsSpam())); Optional moduleForCopyingNumber = SharedModules.createModuleForCopyingNumber(context, normalizedNumber); -- cgit v1.2.3