diff options
-rw-r--r-- | src/com/android/dialer/filterednumber/FilteredNumbersUtil.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java index a9bb98321..4cc8e7594 100644 --- a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java +++ b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java @@ -251,11 +251,11 @@ public class FilteredNumbersUtil { boolean shouldBlock = false; if (cursor != null) { try { - cursor.moveToFirst(); - - // Block if number is found and it was added before this voicemail was received. - final long numberBlockedTimeMs = cursor.getLong(0); - shouldBlock = cursor.getCount() > 0 && voicemailDateMs > numberBlockedTimeMs; + if (cursor.moveToFirst()) { + // Block if number is found and it was added before this voicemail was received. + final long numberBlockedTimeMs = cursor.getLong(0); + shouldBlock = cursor.getCount() > 0 && voicemailDateMs > numberBlockedTimeMs; + } } finally { cursor.close(); } |