diff options
author | linyuh <linyuh@google.com> | 2018-03-08 11:05:37 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-08 12:42:51 -0800 |
commit | 20824a011cd8792568e922bbc374a1a51ea25e41 (patch) | |
tree | 35c5a477eeb1743f8ab65e429f03426eae8a75e4 /java/com/android/dialer/historyitemactions | |
parent | e67eb83476525df47dce254c5c267191668bf042 (diff) |
Implement logic for unblocking a number from the new call log's bottom sheet.
Bug: 70989547
Test: ShowBlockReportSpamDialogNotifierEndToEndTest
PiperOrigin-RevId: 188357953
Change-Id: Ie1b1f439f043805892876790d7590a4c721dbf8c
Diffstat (limited to 'java/com/android/dialer/historyitemactions')
-rw-r--r-- | java/com/android/dialer/historyitemactions/SharedModules.java | 17 |
1 files changed, 4 insertions, 13 deletions
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. } |