From e987eb096f40ab987690e9bd10b058ef2dfe2de3 Mon Sep 17 00:00:00 2001 From: linyuh Date: Thu, 8 Mar 2018 10:28:04 -0800 Subject: Implement logic for blocking a number from the new call log's bottom sheet. Bug: 70989547 Test: ShowBlockReportSpamDialogNotifierEndToEndTest PiperOrigin-RevId: 188351591 Change-Id: I634fb821592bdc890df291fdf83cdf307c94ffa9 --- .../blockreportspam/ShowBlockReportSpamDialogNotifier.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java') diff --git a/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java b/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java index 58e1988fb..2fccdd115 100644 --- a/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java +++ b/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java @@ -47,6 +47,19 @@ public final class ShowBlockReportSpamDialogNotifier { LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } + /** Notifies that a dialog for blocking a number should be shown. */ + public static void notifyShowDialogToBlockNumber( + Context context, BlockReportSpamDialogInfo blockReportSpamDialogInfo) { + LogUtil.enterBlock("ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumber"); + + Intent intent = new Intent(); + intent.setAction(ShowBlockReportSpamDialogReceiver.ACTION_SHOW_DIALOG_TO_BLOCK_NUMBER); + ProtoParsers.put( + intent, ShowBlockReportSpamDialogReceiver.EXTRA_DIALOG_INFO, blockReportSpamDialogInfo); + + LocalBroadcastManager.getInstance(context).sendBroadcast(intent); + } + /** Notifies that a dialog for reporting a number as not spam should be shown. */ public static void notifyShowDialogToReportNotSpam( Context context, BlockReportSpamDialogInfo blockReportSpamDialogInfo) { -- cgit v1.2.3