summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/filterednumber/FilteredNumbersUtil.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java
index 1f977de9a..83a85eb9c 100644
--- a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java
+++ b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java
@@ -235,7 +235,7 @@ public class FilteredNumbersUtil {
* Use {@code FilteredNumberAsyncQueryHandler} to asynchronously check if a number is blocked.
*/
public static boolean shouldBlockVoicemail(
- Context context, String number, String countryIso, long dateMs) {
+ Context context, String number, String countryIso, long voicemailDateMs) {
final String normalizedNumber = PhoneNumberUtils.formatNumberToE164(number, countryIso);
if (TextUtils.isEmpty(normalizedNumber)) {
return false;
@@ -256,7 +256,8 @@ public class FilteredNumbersUtil {
cursor.moveToFirst();
// Block if number is found and it was added before this voicemail was received.
- shouldBlock = cursor.getCount() > 0 && dateMs > cursor.getLong(0);
+ final long numberBlockedTimeMs = cursor.getLong(0);
+ shouldBlock = cursor.getCount() > 0 && voicemailDateMs > numberBlockedTimeMs;
} finally {
cursor.close();
}