summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/spam
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-05-03 10:27:13 -0700
committerEric Erfanian <erfanian@google.com>2017-05-03 12:01:21 -0700
commit8369df095a73a77b3715f8ae7ba06089cebca4ce (patch)
tree1a45d60921e293c6088efeaf4d9c408456f3e0e2 /java/com/android/dialer/spam
parentafa29d4a8659eeffc8d92a6216b154f594eeb895 (diff)
This change reflects the Dialer V10 RC00 branch.
RC00 is based on: branch: dialer-android_release_branch/153304843.1 synced to: 153304843 following the instructions at go/dialer-aosp-release. In this release: * Removes final apache sources. * Uses native lite compilation. More drops will follow with subsequent release candidates until we reach our final v10 release, in cadence with our prebuilt drops. Test: TreeHugger, on device Change-Id: Ic9684057230f9b579c777820c746cd21bf45ec0f
Diffstat (limited to 'java/com/android/dialer/spam')
-rw-r--r--java/com/android/dialer/spam/SpamBindings.java43
-rw-r--r--java/com/android/dialer/spam/SpamBindingsStub.java28
2 files changed, 55 insertions, 16 deletions
diff --git a/java/com/android/dialer/spam/SpamBindings.java b/java/com/android/dialer/spam/SpamBindings.java
index b5d18b828..5631da696 100644
--- a/java/com/android/dialer/spam/SpamBindings.java
+++ b/java/com/android/dialer/spam/SpamBindings.java
@@ -18,6 +18,9 @@ package com.android.dialer.spam;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
+import com.android.dialer.logging.ContactLookupResult;
+import com.android.dialer.logging.ContactSource;
+import com.android.dialer.logging.ReportingLocation;
/** Allows the container application to mark calls as spam. */
public interface SpamBindings {
@@ -85,12 +88,16 @@ public interface SpamBindings {
* @param callType Whether the type of call is missed, voicemail, etc. Example of this is {@link
* android.provider.CallLog.Calls#VOICEMAIL_TYPE}.
* @param from Where in the dialer this was reported from. Must be one of {@link
- * com.android.dialer.logging.nano.ReportingLocation}.
+ * com.android.dialer.logging.ReportingLocation}.
* @param contactLookupResultType The result of the contact lookup for this phone number. Must be
- * one of {@link com.android.dialer.logging.nano.ContactLookupResult}.
+ * one of {@link com.android.dialer.logging.ContactLookupResult}.
*/
void reportSpamFromAfterCallNotification(
- String number, String countryIso, int callType, int from, int contactLookupResultType);
+ String number,
+ String countryIso,
+ int callType,
+ ReportingLocation.Type from,
+ ContactLookupResult.Type contactLookupResultType);
/**
* Reports number as spam.
@@ -100,12 +107,16 @@ public interface SpamBindings {
* @param callType Whether the type of call is missed, voicemail, etc. Example of this is {@link
* android.provider.CallLog.Calls#VOICEMAIL_TYPE}.
* @param from Where in the dialer this was reported from. Must be one of {@link
- * com.android.dialer.logging.nano.ReportingLocation}.
+ * com.android.dialer.logging.ReportingLocation}.
* @param contactSourceType If we have cached contact information for the phone number, this
- * indicates its source. Must be one of {@link com.android.dialer.logging.nano.ContactSource}.
+ * indicates its source. Must be one of {@link com.android.dialer.logging.ContactSource}.
*/
void reportSpamFromCallHistory(
- String number, String countryIso, int callType, int from, int contactSourceType);
+ String number,
+ String countryIso,
+ int callType,
+ ReportingLocation.Type from,
+ ContactSource.Type contactSourceType);
/**
* Reports number as not spam.
@@ -115,12 +126,16 @@ public interface SpamBindings {
* @param callType Whether the type of call is missed, voicemail, etc. Example of this is {@link
* android.provider.CallLog.Calls#VOICEMAIL_TYPE}.
* @param from Where in the dialer this was reported from. Must be one of {@link
- * com.android.dialer.logging.nano.ReportingLocation}.
+ * com.android.dialer.logging.ReportingLocation}.
* @param contactLookupResultType The result of the contact lookup for this phone number. Must be
- * one of {@link com.android.dialer.logging.nano.ContactLookupResult}.
+ * one of {@link com.android.dialer.logging.ContactLookupResult}.
*/
void reportNotSpamFromAfterCallNotification(
- String number, String countryIso, int callType, int from, int contactLookupResultType);
+ String number,
+ String countryIso,
+ int callType,
+ ReportingLocation.Type from,
+ ContactLookupResult.Type contactLookupResultType);
/**
* Reports number as not spam.
@@ -130,12 +145,16 @@ public interface SpamBindings {
* @param callType Whether the type of call is missed, voicemail, etc. Example of this is {@link
* android.provider.CallLog.Calls#VOICEMAIL_TYPE}.
* @param from Where in the dialer this was reported from. Must be one of {@link
- * com.android.dialer.logging.nano.ReportingLocation}.
+ * com.android.dialer.logging.ReportingLocation}.
* @param contactSourceType If we have cached contact information for the phone number, this
- * indicates its source. Must be one of {@link com.android.dialer.logging.nano.ContactSource}.
+ * indicates its source. Must be one of {@link com.android.dialer.logging.ContactSource}.
*/
void reportNotSpamFromCallHistory(
- String number, String countryIso, int callType, int from, int contactSourceType);
+ String number,
+ String countryIso,
+ int callType,
+ ReportingLocation.Type from,
+ ContactSource.Type contactSourceType);
/** Callback to be invoked when data is fetched. */
interface Listener {
diff --git a/java/com/android/dialer/spam/SpamBindingsStub.java b/java/com/android/dialer/spam/SpamBindingsStub.java
index 08939530c..b815dc97b 100644
--- a/java/com/android/dialer/spam/SpamBindingsStub.java
+++ b/java/com/android/dialer/spam/SpamBindingsStub.java
@@ -16,6 +16,10 @@
package com.android.dialer.spam;
+import com.android.dialer.logging.ContactLookupResult;
+import com.android.dialer.logging.ContactSource;
+import com.android.dialer.logging.ReportingLocation;
+
/** Default implementation of SpamBindings. */
public class SpamBindingsStub implements SpamBindings {
@@ -76,17 +80,33 @@ public class SpamBindingsStub implements SpamBindings {
@Override
public void reportSpamFromAfterCallNotification(
- String number, String countryIso, int callType, int from, int contactLookupResultType) {}
+ String number,
+ String countryIso,
+ int callType,
+ ReportingLocation.Type from,
+ ContactLookupResult.Type contactLookupResultType) {}
@Override
public void reportSpamFromCallHistory(
- String number, String countryIso, int callType, int from, int contactSourceType) {}
+ String number,
+ String countryIso,
+ int callType,
+ ReportingLocation.Type from,
+ ContactSource.Type contactSourceType) {}
@Override
public void reportNotSpamFromAfterCallNotification(
- String number, String countryIso, int callType, int from, int contactLookupResultType) {}
+ String number,
+ String countryIso,
+ int callType,
+ ReportingLocation.Type from,
+ ContactLookupResult.Type contactLookupResultType) {}
@Override
public void reportNotSpamFromCallHistory(
- String number, String countryIso, int callType, int from, int contactSourceType) {}
+ String number,
+ String countryIso,
+ int callType,
+ ReportingLocation.Type from,
+ ContactSource.Type contactSourceType) {}
}