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

Commit bb66a0ed authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Prevent NPE in ContactsContract"

parents 2a2ec864 da072b3e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2079,10 +2079,11 @@ public final class ContactsContract {
            if (preferHighres) {
                final Uri displayPhotoUri = Uri.withAppendedPath(contactUri,
                        Contacts.Photo.DISPLAY_PHOTO);
                InputStream inputStream;
                try {
                    AssetFileDescriptor fd = cr.openAssetFileDescriptor(displayPhotoUri, "r");
                    if (fd != null) {
                        return fd.createInputStream();
                    }
                } catch (IOException e) {
                    // fallback to the thumbnail code
                }