diff options
author | linyuh <linyuh@google.com> | 2018-02-27 14:14:27 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-27 15:29:15 -0800 |
commit | afd8a64b1966372e14aa9f7bc05d598bd950eb71 (patch) | |
tree | 5aecfe984c8772a1917faa75048e6814208c4a62 /java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java | |
parent | 2e2b29a7466fd5f3d477f1c9483ad06a215d9362 (diff) |
Set the correct reporting location when reporting spam in the new call log.
Bug: 73816729
Test: Existing tests
PiperOrigin-RevId: 187230516
Change-Id: I59d70b9676e2972b80f124f29f2c1cb1858efef8
Diffstat (limited to 'java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java')
-rw-r--r-- | java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java b/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java index fd6a807cc..fd81568a8 100644 --- a/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java +++ b/java/com/android/dialer/blockreportspam/ShowBlockReportSpamDialogNotifier.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.Intent; import android.support.v4.content.LocalBroadcastManager; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.ReportingLocation; /** * Notifies that a dialog for blocking a number and/or marking it as spam/not spam should be shown. @@ -35,9 +36,15 @@ public final class ShowBlockReportSpamDialogNotifier { * @param normalizedNumber The number to be blocked/marked as spam * @param countryIso The ISO 3166-1 two letters country code for the number * @param callType Call type defined in {@link android.provider.CallLog.Calls} + * @param reportingLocation The location where the number is reported. See {@link + * ReportingLocation.Type}. */ public static void notifyShowDialogToBlockNumberAndOptionallyReportSpam( - Context context, String normalizedNumber, String countryIso, int callType) { + Context context, + String normalizedNumber, + String countryIso, + int callType, + ReportingLocation.Type reportingLocation) { LogUtil.enterBlock( "ShowBlockReportSpamDialogNotifier.notifyShowDialogToBlockNumberAndOptionallyReportSpam"); @@ -49,6 +56,8 @@ public final class ShowBlockReportSpamDialogNotifier { intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_NUMBER, normalizedNumber); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_COUNTRY_ISO, countryIso); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_CALL_TYPE, callType); + intent.putExtra( + ShowBlockReportSpamDialogReceiver.EXTRA_REPORTING_LOCATION, reportingLocation.getNumber()); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } @@ -60,9 +69,15 @@ public final class ShowBlockReportSpamDialogNotifier { * @param normalizedNumber The number to be reported as not spam * @param countryIso The ISO 3166-1 two letters country code for the number * @param callType Call type defined in {@link android.provider.CallLog.Calls} + * @param reportingLocation The location where the number is reported. See {@link + * ReportingLocation.Type}. */ public static void notifyShowDialogToReportNotSpam( - Context context, String normalizedNumber, String countryIso, int callType) { + Context context, + String normalizedNumber, + String countryIso, + int callType, + ReportingLocation.Type reportingLocation) { LogUtil.enterBlock("ShowBlockReportSpamDialogNotifier.notifyShowDialogToReportNotSpam"); Intent intent = new Intent(); @@ -70,6 +85,7 @@ public final class ShowBlockReportSpamDialogNotifier { intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_NUMBER, normalizedNumber); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_COUNTRY_ISO, countryIso); intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_CALL_TYPE, callType); + intent.putExtra(ShowBlockReportSpamDialogReceiver.EXTRA_REPORTING_LOCATION, reportingLocation); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); } |