diff options
author | sail <sail@google.com> | 2017-08-17 08:17:46 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-08-30 15:45:16 +0000 |
commit | c12afe26997b6c4ad9ce8bccdd92228a15886b6c (patch) | |
tree | f9938eb39e1044b2c843483607a7052195f38831 | |
parent | dccc7d9438d8155d405d2e956d3e3b56135cb888 (diff) |
Fix retrieving contact lookup type in SpamNotificationService
Copying contact lookup type didn't work in SpamNotificationService. The
problem was that when we switched to proto lite we didn't convert the
contact lookup result from an enum to an int.
Bug: 62937258,64390178
Test: None
PiperOrigin-RevId: 165580330
Change-Id: I455bda35125644884a7af9c452439a0dac800d70
-rw-r--r-- | java/com/android/dialer/blocking/FilteredNumberAsyncQueryHandler.java | 4 | ||||
-rw-r--r-- | java/com/android/incallui/spam/SpamNotificationService.java | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/java/com/android/dialer/blocking/FilteredNumberAsyncQueryHandler.java b/java/com/android/dialer/blocking/FilteredNumberAsyncQueryHandler.java index d806a8303..62bb9f39b 100644 --- a/java/com/android/dialer/blocking/FilteredNumberAsyncQueryHandler.java +++ b/java/com/android/dialer/blocking/FilteredNumberAsyncQueryHandler.java @@ -297,7 +297,9 @@ public class FilteredNumberAsyncQueryHandler extends AsyncQueryHandler { public void blockNumber(final OnBlockNumberListener listener, ContentValues values) { blockedNumberCache.clear(); if (!FilteredNumberCompat.canAttemptBlockOperations(context)) { - listener.onBlockComplete(null); + if (listener != null) { + listener.onBlockComplete(null); + } return; } startInsert( diff --git a/java/com/android/incallui/spam/SpamNotificationService.java b/java/com/android/incallui/spam/SpamNotificationService.java index c92d61609..91377db83 100644 --- a/java/com/android/incallui/spam/SpamNotificationService.java +++ b/java/com/android/incallui/spam/SpamNotificationService.java @@ -61,7 +61,8 @@ public class SpamNotificationService extends Service { intent.putExtra(EXTRA_CALL_START_TIME_MILLIS, call.getTimeAddedMs()); intent.putExtra(EXTRA_NOTIFICATION_TAG, notificationTag); intent.putExtra(EXTRA_NOTIFICATION_ID, notificationId); - intent.putExtra(EXTRA_CONTACT_LOOKUP_RESULT_TYPE, call.getLogState().contactLookupResult); + intent.putExtra( + EXTRA_CONTACT_LOOKUP_RESULT_TYPE, call.getLogState().contactLookupResult.getNumber()); return intent; } |