diff options
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java | 8 | ||||
-rw-r--r-- | src/com/android/dialer/filterednumber/FilteredNumbersUtil.java | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java b/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java index 7af1a1339..52ef49ac0 100644 --- a/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java +++ b/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java @@ -158,7 +158,13 @@ public class FilteredNumberAsyncQueryHandler extends AsyncQueryHandler { new Listener() { @Override protected void onQueryComplete(int token, Object cookie, Cursor cursor) { - if (cursor == null || cursor.getCount() != 1) { + /* + * In the frameworking blocking, numbers can be blocked in both e164 format + * and not, resulting in multiple rows being returned for this query. For + * example, both '16502530000' and '6502530000' can exist at the same time + * and will be returned by this query. + */ + if (cursor == null || cursor.getCount() == 0) { listener.onCheckComplete(null); return; } diff --git a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java index e3870ded9..498b10a45 100644 --- a/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java +++ b/src/com/android/dialer/filterednumber/FilteredNumbersUtil.java @@ -33,6 +33,7 @@ import android.widget.Toast; import com.android.contacts.common.testing.NeededForTesting; import com.android.dialer.R; +import com.android.dialer.compat.FilteredNumberCompat; import com.android.dialer.database.FilteredNumberAsyncQueryHandler; import com.android.dialer.database.FilteredNumberAsyncQueryHandler.OnHasBlockedNumbersListener; import com.android.dialer.database.FilteredNumberContract.FilteredNumber; @@ -298,6 +299,10 @@ public class FilteredNumbersUtil { } public static void maybeNotifyCallBlockingDisabled(final Context context) { + // The Dialer is not responsible for this notification after migrating + if (FilteredNumberCompat.useNewFiltering()) { + return; + } // Skip if the user has already received a notification for the most recent emergency call. if (PreferenceManager.getDefaultSharedPreferences(context) .getBoolean(NOTIFIED_CALL_BLOCKING_DISABLED_BY_EMERGENCY_CALL_PREF_KEY, false)) { |