diff options
author | Android Dialer <noreply@google.com> | 2018-03-23 21:10:59 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-26 22:22:40 -0700 |
commit | 07d6d00a5cc6c1aeb1befaccc1e832b3d5b398d8 (patch) | |
tree | 91cf3d0fc7f850ae7fcb334532ba54517e1b5108 /java/com/android/incallui/spam/SpamNotificationActivity.java | |
parent | 43293286a257c39e173b0dc9a93ff473276eba89 (diff) |
Move spam setting related methods out of spam interface into a separate spam
setting interface.
Test: All the existing tests
PiperOrigin-RevId: 190314880
Change-Id: I030acbd70120f508c5a4616757d89113524110fa
Diffstat (limited to 'java/com/android/incallui/spam/SpamNotificationActivity.java')
-rw-r--r-- | java/com/android/incallui/spam/SpamNotificationActivity.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/com/android/incallui/spam/SpamNotificationActivity.java b/java/com/android/incallui/spam/SpamNotificationActivity.java index 61d04a0d6..cb5f8e514 100644 --- a/java/com/android/incallui/spam/SpamNotificationActivity.java +++ b/java/com/android/incallui/spam/SpamNotificationActivity.java @@ -197,7 +197,7 @@ public class SpamNotificationActivity extends FragmentActivity { /** Creates and displays the dialog for whitelisting a number. */ private void maybeShowNotSpamDialog( final String number, final ContactLookupResult.Type contactLookupResultType) { - if (SpamComponent.get(this).spam().isDialogEnabledForSpamNotification()) { + if (SpamComponent.get(this).spamSettings().isDialogEnabledForSpamNotification()) { DialogFragmentForReportingNotSpam.newInstance( getFormattedNumber(number, this), new BlockReportSpamDialogs.OnConfirmListener() { @@ -216,7 +216,7 @@ public class SpamNotificationActivity extends FragmentActivity { /** Creates and displays the dialog for blocking/reporting a number as spam. */ private void maybeShowBlockReportSpamDialog( final String number, final ContactLookupResult.Type contactLookupResultType) { - if (SpamComponent.get(this).spam().isDialogEnabledForSpamNotification()) { + if (SpamComponent.get(this).spamSettings().isDialogEnabledForSpamNotification()) { String displayNumber = getFormattedNumber(number, this); maybeShowBlockNumberMigrationDialog( new BlockedNumbersMigrator.Listener() { @@ -225,7 +225,7 @@ public class SpamNotificationActivity extends FragmentActivity { DialogFragmentForBlockingNumberAndOptionallyReportingAsSpam.newInstance( displayNumber, SpamComponent.get(SpamNotificationActivity.this) - .spam() + .spamSettings() .isDialogReportSpamCheckedByDefault(), new BlockReportSpamDialogs.OnSpamDialogClickListener() { @Override @@ -319,7 +319,7 @@ public class SpamNotificationActivity extends FragmentActivity { } private void assertDialogsEnabled() { - if (!SpamComponent.get(this).spam().isDialogEnabledForSpamNotification()) { + if (!SpamComponent.get(this).spamSettings().isDialogEnabledForSpamNotification()) { throw new IllegalStateException( "Cannot start this activity with given action because dialogs are not enabled."); } |