Add null check for cursor in UndemoteOutgoingCallReceiver

Bug: 12179558
Change-Id: I2a991b981a76afdec0282936f63732c43652baea
(cherry picked from commit 3fee3e5a6ac02e4ddc536e4739d336341d22e19a)
diff --git a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
index 30d01d2..37fe870 100644
--- a/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
+++ b/src/com/android/dialer/interactions/UndemoteOutgoingCallReceiver.java
@@ -68,6 +68,9 @@
                 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);