diff options
author | linyuh <linyuh@google.com> | 2018-03-08 10:28:04 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-08 11:18:10 -0800 |
commit | e987eb096f40ab987690e9bd10b058ef2dfe2de3 (patch) | |
tree | f432cab51154071587b7d7fcf55c93796103d368 /java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java | |
parent | d2186758f163f0808379cfdce56223032ed8b437 (diff) |
Implement logic for blocking a number from the new call log's bottom sheet.
Bug: 70989547
Test: ShowBlockReportSpamDialogNotifierEndToEndTest
PiperOrigin-RevId: 188351591
Change-Id: I634fb821592bdc890df291fdf83cdf307c94ffa9
Diffstat (limited to 'java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java')
-rw-r--r-- | java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java | 13 |
1 files changed, 13 insertions, 0 deletions
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) { |