summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-12-17 10:07:50 -0800
committerYorke Lee <yorkelee@google.com>2013-12-17 10:07:50 -0800
commit3fee3e5a6ac02e4ddc536e4739d336341d22e19a (patch)
tree9f4e232665a8aa58a06583742838e27f5b400dd4
parent0d31e205eb569e1a1869c0dce329caa69942fa18 (diff)
Add null check for cursor in UndemoteOutgoingCallReceiver
Bug: 12179558 Change-Id: I2a991b981a76afdec0282936f63732c43652baea
-rw-r--r--src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
index fb9b1d1aa..c7e4c5f89 100644
--- a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
+++ b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
@@ -68,6 +68,9 @@ public class UndemoteOutgoingCallReceiver extends BroadcastReceiver {
Uri.encode(number));
final Cursor cursor = context.getContentResolver().query(contactUri, new String[] {
PhoneLookup._ID}, null, null, null);
+ if (cursor == null) {
+ return NO_CONTACT_FOUND;
+ }
try {
if (cursor.moveToFirst()) {
final long id = cursor.getLong(0);