diff options
author | Yorke Lee <yorkelee@google.com> | 2013-12-17 10:07:50 -0800 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2014-03-01 18:33:08 +0000 |
commit | a4a3714176499f00330baf69f78d51901c633eca (patch) | |
tree | 7e84d779cfc8ed1040ba2b507f0ea241f88444d9 | |
parent | b0b153f5fe5833d1a3b102e93e6e27481a90e4f7 (diff) |
Add null check for cursor in UndemoteOutgoingCallReceiver
Bug: 12179558
Change-Id: I2a991b981a76afdec0282936f63732c43652baea
(cherry picked from commit 3fee3e5a6ac02e4ddc536e4739d336341d22e19a)
-rw-r--r-- | src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java | 3 |
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 30d01d2f8..37fe87082 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); |