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

Commit 9fca0916 authored by kaiyiz's avatar kaiyiz Committed by Gerrit - the friendly Code Review server
Browse files

Gallery2: Edit picture during mount SD

When SD card is mounted, the data of picture can't read to get mime type.
As a result, there will be NullPointerException happen for the mimeType's
value is null

Change position of 'mimeType' and 'JPEG_MIME_TYPE', so that the judgement
can go well without NullPointerException

CRs-Fixed: 783875

Change-Id: I0d48b4ade06dba1c23a76b9046163a027f38e514
parent 96dbdca1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ public class SaveImage {
        if (mimeType == null) {
            mimeType = ImageLoader.getMimeType(mSelectedImageUri);
        }
        if (mimeType.equals(ImageLoader.JPEG_MIME_TYPE)) {
        if (ImageLoader.JPEG_MIME_TYPE.equals(mimeType)) {
            InputStream inStream = null;
            try {
                inStream = mContext.getContentResolver().openInputStream(source);