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 --- .../com/android/dialer/voicemail/listui/menu/Modules.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'java/com/android/dialer/voicemail/listui/menu/Modules.java') diff --git a/java/com/android/dialer/voicemail/listui/menu/Modules.java b/java/com/android/dialer/voicemail/listui/menu/Modules.java index 9473b80e1..cc7bcbe6d 100644 --- a/java/com/android/dialer/voicemail/listui/menu/Modules.java +++ b/java/com/android/dialer/voicemail/listui/menu/Modules.java @@ -17,6 +17,7 @@ package com.android.dialer.voicemail.listui.menu; import android.content.Context; +import com.android.dialer.blockreportspam.BlockReportSpamDialogInfo; import com.android.dialer.historyitemactions.DividerModule; import com.android.dialer.historyitemactions.HistoryItemActionModule; import com.android.dialer.historyitemactions.SharedModules; @@ -64,15 +65,19 @@ final class Modules { modules.add(new DividerModule()); } + BlockReportSpamDialogInfo blockReportSpamDialogInfo = + BlockReportSpamDialogInfo.newBuilder() + .setNormalizedNumber(voicemailEntry.number().getNormalizedNumber()) + .setCountryIso(voicemailEntry.number().getCountryIso()) + .setCallType(voicemailEntry.callType()) + .setReportingLocation(ReportingLocation.Type.VOICEMAIL_HISTORY) + .build(); modules.addAll( SharedModules.createModulesHandlingBlockedOrSpamNumber( context, - voicemailEntry.number().getNormalizedNumber(), - voicemailEntry.number().getCountryIso(), - voicemailEntry.callType(), + blockReportSpamDialogInfo, voicemailEntry.numberAttributes().getIsBlocked(), - voicemailEntry.numberAttributes().getIsSpam(), - ReportingLocation.Type.VOICEMAIL_HISTORY)); + voicemailEntry.numberAttributes().getIsSpam())); // TODO(zachh): Module for CallComposer. Optional moduleForCopyingNumber = -- cgit v1.2.3