From f05c8f7c3f7e8d3a91f4c092b73dc5edb67d664b Mon Sep 17 00:00:00 2001 From: Sarmad Hashmi Date: Thu, 14 Apr 2016 20:38:08 -0700 Subject: Update ExtendedCallInfoService reporting methods to accept location. +Add IntDef which contains all the possible locations numbers can be reported as spam or not spam from. +Updated method calls to include location BUG=27323295 Change-Id: I549e439af328447fbbf0c61116cdff9b1b877334 --- .../dialer/service/ExtendedCallInfoService.java | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/com/android/dialer/service') diff --git a/src/com/android/dialer/service/ExtendedCallInfoService.java b/src/com/android/dialer/service/ExtendedCallInfoService.java index 0bf5badd3..5481cc90d 100644 --- a/src/com/android/dialer/service/ExtendedCallInfoService.java +++ b/src/com/android/dialer/service/ExtendedCallInfoService.java @@ -16,10 +16,25 @@ package com.android.dialer.service; +import android.support.annotation.IntDef; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + /** * Interface of service to get extended call information. */ public interface ExtendedCallInfoService { + /** + * All the possible locations that a user can report a number as spam or not spam. + */ + @Retention(RetentionPolicy.SOURCE) + @IntDef({REPORTING_LOCATION_UNKNOWN, REPORTING_LOCATION_CALL_LOG_HISTORY, + REPORTING_LOCATION_FEEDBACK_PROMPT}) + @interface ReportingLocation {} + int REPORTING_LOCATION_UNKNOWN = 0; + int REPORTING_LOCATION_CALL_LOG_HISTORY = 1; + int REPORTING_LOCATION_FEEDBACK_PROMPT = 2; /** * Interface for a callback to be invoked when data is fetched. @@ -46,8 +61,10 @@ public interface ExtendedCallInfoService { * @param countryIso The country ISO of the number. * @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 ReportingLocation}. */ - void reportSpam(String number, String countryIso, int callType); + void reportSpam(String number, String countryIso, int callType, @ReportingLocation int from); /** * Reports number as not spam. @@ -55,6 +72,8 @@ public interface ExtendedCallInfoService { * @param countryIso The country ISO of the number. * @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 ReportingLocation}. */ - void reportNotSpam(String number, String countryIso, int callType); + void reportNotSpam(String number, String countryIso, int callType, @ReportingLocation int from); } -- cgit v1.2.3