From 20824a011cd8792568e922bbc374a1a51ea25e41 Mon Sep 17 00:00:00 2001 From: linyuh Date: Thu, 8 Mar 2018 11:05:37 -0800 Subject: Implement logic for unblocking a number from the new call log's bottom sheet. Bug: 70989547 Test: ShowBlockReportSpamDialogNotifierEndToEndTest PiperOrigin-RevId: 188357953 Change-Id: Ie1b1f439f043805892876790d7590a4c721dbf8c --- .../dialer/historyitemactions/SharedModules.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'java/com/android/dialer/historyitemactions') diff --git a/java/com/android/dialer/historyitemactions/SharedModules.java b/java/com/android/dialer/historyitemactions/SharedModules.java index 1147289db..fa7062653 100644 --- a/java/com/android/dialer/historyitemactions/SharedModules.java +++ b/java/com/android/dialer/historyitemactions/SharedModules.java @@ -22,7 +22,6 @@ import android.net.Uri; import android.provider.ContactsContract; import android.support.annotation.Nullable; import android.text.TextUtils; -import android.widget.Toast; import com.android.dialer.DialerPhoneNumber; import com.android.dialer.blockreportspam.BlockReportSpamDialogInfo; import com.android.dialer.blockreportspam.ShowBlockReportSpamDialogNotifier; @@ -32,7 +31,6 @@ import com.android.dialer.util.UriUtils; import com.google.common.base.Optional; import java.util.ArrayList; import java.util.List; -import java.util.Locale; /** * Modules for the bottom sheet that are shared between NewVoicemailFragment and NewCallLogFragment @@ -187,19 +185,12 @@ public class SharedModules { @Override public boolean onClick() { - if (!isBlocked) { - ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumber( + if (isBlocked) { + ShowBlockReportSpamDialogNotifier.notifyShowDialogToUnblockNumber( context, blockReportSpamDialogInfo); } else { - // TODO(a bug): implement this method. - Toast.makeText( - context, - String.format( - Locale.ENGLISH, - "TODO: Unblock number %s.", - blockReportSpamDialogInfo.getNormalizedNumber()), - Toast.LENGTH_SHORT) - .show(); + ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumber( + context, blockReportSpamDialogInfo); } return true; // Close the bottom sheet. } -- cgit v1.2.3