diff options
author | linyuh <linyuh@google.com> | 2018-02-28 09:49:44 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-28 09:50:52 -0800 |
commit | 81670b01f8a43ee1036295f1c8b1c51398016b1e (patch) | |
tree | 356835e57e3e37e959ff951efe07604282a1a757 /java/com/android/dialer/voicemail | |
parent | ac3d0e58f15c1d38583f6bcecf20275cbbf17b35 (diff) |
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
Diffstat (limited to 'java/com/android/dialer/voicemail')
-rw-r--r-- | java/com/android/dialer/voicemail/listui/menu/Modules.java | 15 |
1 files changed, 10 insertions, 5 deletions
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<HistoryItemActionModule> moduleForCopyingNumber = |