Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4a37141 authored by Yorke Lee's avatar Yorke Lee Committed by Jay Shrauner
Browse files

Add null check for cursor in UndemoteOutgoingCallReceiver

Bug: 12179558
Change-Id: I2a991b981a76afdec0282936f63732c43652baea
(cherry picked from commit 3fee3e5a)
parent b0b153f5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);