From 3ec50749b2c6661ce5b209da0f3dc4bdc4ded50f Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Thu, 14 Jan 2016 01:03:34 +0000 Subject: Revert "Changes needed to make Incoming calls work while fbe locked" This reverts commit 70b2cc2c5a9ca7f16c730f7329112416fee0fffd. Change-Id: I9ad37bf5bebf9a302c96038385d420e1c8c5f19b --- .../android/dialer/database/FilteredNumberAsyncQueryHandler.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/com/android') diff --git a/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java b/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java index ff9b1be5d..06aca78b5 100644 --- a/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java +++ b/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java @@ -134,7 +134,7 @@ public class FilteredNumberAsyncQueryHandler extends AsyncQueryHandler { new Listener() { @Override protected void onQueryComplete(int token, Object cookie, Cursor cursor) { - listener.onHasBlockedNumbers(cursor != null && cursor.getCount() > 0); + listener.onHasBlockedNumbers(cursor.getCount() > 0); } }, getContentUri(null), @@ -161,7 +161,7 @@ public class FilteredNumberAsyncQueryHandler extends AsyncQueryHandler { new Listener() { @Override protected void onQueryComplete(int token, Object cookie, Cursor cursor) { - if (cursor == null || cursor.getCount() != 1) { + if (cursor.getCount() != 1) { listener.onCheckComplete(null); return; } @@ -246,10 +246,9 @@ public class FilteredNumberAsyncQueryHandler extends AsyncQueryHandler { startQuery(NO_TOKEN, new Listener() { @Override public void onQueryComplete(int token, Object cookie, Cursor cursor) { - int rowsReturned = cursor == null ? 0 : cursor.getCount(); - if (rowsReturned != 1) { + if (cursor.getCount() != 1) { throw new SQLiteDatabaseCorruptException - ("Returned " + rowsReturned + " rows for uri " + ("Returned " + cursor.getCount() + " rows for uri " + uri + "where 1 expected."); } cursor.moveToFirst(); -- cgit v1.2.3