diff options
Diffstat (limited to 'java/com/android/dialer/spam/Spam.java')
-rw-r--r-- | java/com/android/dialer/spam/Spam.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/java/com/android/dialer/spam/Spam.java b/java/com/android/dialer/spam/Spam.java index 99deb13b2..09b7ce9c6 100644 --- a/java/com/android/dialer/spam/Spam.java +++ b/java/com/android/dialer/spam/Spam.java @@ -16,6 +16,8 @@ package com.android.dialer.spam; +import android.content.Context; +import android.content.Intent; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.android.dialer.DialerPhoneNumber; @@ -33,6 +35,8 @@ public interface Spam { boolean isSpamNotificationEnabled(); + boolean isSpamBlockingAvailable(); + boolean isSpamBlockingEnabled(); boolean isDialogEnabledForSpamNotification(); @@ -180,10 +184,28 @@ public interface Spam { ReportingLocation.Type from, ContactSource.Type contactSourceType); + /** + * Modifies spam blocking setting. + * + * @param enabled Whether to enable or disable the setting. + * @param listener The callback to be invoked after setting change is done. + */ + void modifySpamBlockingSetting(boolean enabled, ModifySettingListener listener); + + /** Returns an intent to start spam blocking setting */ + Intent getSpamBlockingSettingIntent(Context context); + /** Callback to be invoked when data is fetched. */ interface Listener { /** Called when data is fetched. */ void onComplete(boolean isSpam); } + + /** Callback to be invoked when setting change completes. */ + interface ModifySettingListener { + + /** Called when setting change completes. */ + void onComplete(boolean success); + } } |