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

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

Merge "Dialer: Fix SecurityException when query contacts database"

parents 399e2e7b fceead3d
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -158,8 +158,13 @@ public class ContactInfoHelper {
     */
    private ContactInfo lookupContactFromUri(Uri uri) {
        final ContactInfo info;
        Cursor phonesCursor =
                mContext.getContentResolver().query(uri, PhoneQuery._PROJECTION, null, null, null);
        Cursor phonesCursor;
        try {
            phonesCursor = mContext.getContentResolver()
                    .query(uri, PhoneQuery._PROJECTION, null, null, null);
        } catch (Exception e) {
            phonesCursor = null;
        }
        long id = -1;

        if (phonesCursor != null) {