diff options
author | Brandon Maxwell <maxwelb@google.com> | 2016-01-13 23:50:33 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-01-13 23:50:33 +0000 |
commit | 755b7c2918f076a15f493104eed2242065a988b2 (patch) | |
tree | edf2a3f1b7e5ebfba03753c8571831ddbf5d58bc | |
parent | 1ab5805e616bfacb5d101660e33ddaec26ead3f1 (diff) | |
parent | 45a66c09a96e76fe6b0ecec3390bf0cb88a9dfe1 (diff) |
Merge "Changes needed to make Incoming calls work while fbe locked" into ub-contactsdialer-b-dev
am: 45a66c09a9
* commit '45a66c09a96e76fe6b0ecec3390bf0cb88a9dfe1':
Changes needed to make Incoming calls work while fbe locked
-rw-r--r-- | AndroidManifest.xml | 6 | ||||
-rw-r--r-- | src/com/android/dialer/database/FilteredNumberAsyncQueryHandler.java | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index f6aa4aad4..8d63dc139 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -296,7 +296,8 @@ android:launchMode="singleInstance" android:configChanges="keyboardHidden" android:exported="false" - android:screenOrientation="nosensor" > + android:screenOrientation="nosensor" + android:encryptionAware="true"> </activity> <!-- BroadcastReceiver for receiving Intents from Notification mechanism. --> @@ -304,7 +305,8 @@ android:exported="false" /> <service android:name="com.android.incallui.InCallServiceImpl" - android:permission="android.permission.BIND_INCALL_SERVICE" > + android:permission="android.permission.BIND_INCALL_SERVICE" + android:encryptionAware="true"> <meta-data android:name="android.telecom.IN_CALL_SERVICE_UI" android:value="true" /> <intent-filter> <action android:name="android.telecom.InCallService"/> 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(); |