diff options
author | Brandon Maxwell <maxwelb@google.com> | 2016-01-14 15:31:42 -0800 |
---|---|---|
committer | Brandon Maxwell <maxwelb@google.com> | 2016-01-14 17:09:28 -0800 |
commit | 6773df0b1a6f8fd7f50c7ddc7a0fcf21c9df0253 (patch) | |
tree | d02ea8f9731462ec5997c93a6e02b0023991d597 /src | |
parent | 662aed1de350c38751a962528651535a35a22789 (diff) |
Changes needed to make Incoming calls work while fbe locked
+ Necessary in-call components are marked as encryptionAware.
+ Added needed null checks since the filtered number table isn't
available when fbe locked.
Bug=26542121
Change-Id: I316cd62c1faec471356794db433b9f631f293c4f
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java b/src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java index 06aca78b5..ff9b1be5d 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.getCount() > 0); + listener.onHasBlockedNumbers(cursor != null && 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.getCount() != 1) { + if (cursor == null || cursor.getCount() != 1) { listener.onCheckComplete(null); return; } @@ -246,9 +246,10 @@ public class FilteredNumberAsyncQueryHandler extends AsyncQueryHandler { startQuery(NO_TOKEN, new Listener() { @Override public void onQueryComplete(int token, Object cookie, Cursor cursor) { - if (cursor.getCount() != 1) { + int rowsReturned = cursor == null ? 0 : cursor.getCount(); + if (rowsReturned != 1) { throw new SQLiteDatabaseCorruptException - ("Returned " + cursor.getCount() + " rows for uri " + ("Returned " + rowsReturned + " rows for uri " + uri + "where 1 expected."); } cursor.moveToFirst(); |