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

Commit 8f3aa782 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Fix NPE in ContactSaveService"

parents 7ecd6f56 7983b8c1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1099,6 +1099,9 @@ public class ContactSaveService extends IntentService {
        // Undemote the contact if necessary
        final Cursor c = getContentResolver().query(contactUri, new String[] {Contacts._ID},
                null, null, null);
        if (c == null) {
            return;
        }
        try {
            if (c.moveToFirst()) {
                final long id = c.getLong(0);
@@ -1301,6 +1304,11 @@ public class ContactSaveService extends IntentService {
                JoinContactQuery.PROJECTION,
                JoinContactQuery.SELECTION,
                new String[]{String.valueOf(contactId1), String.valueOf(contactId2)}, null);
        if (c == null) {
            Log.e(TAG, "Unable to open Contacts DB cursor");
            showToast(R.string.contactSavedErrorToast);
            return;
        }

        long rawContactIds[];
        long verifiedNameRawContactId = -1;