diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2015-01-21 15:14:47 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-01-21 16:05:49 -0800 |
commit | 9fca091600d01a8121c294dca590245e04221b20 (patch) | |
tree | b949b20c72e6257955274b3d031e3aef2e9915e0 /src | |
parent | 96dbdca1c7c62c5dfd4d9404cce052c6b52c2c1d (diff) | |
download | android_packages_apps_Gallery2-9fca091600d01a8121c294dca590245e04221b20.tar.gz android_packages_apps_Gallery2-9fca091600d01a8121c294dca590245e04221b20.tar.bz2 android_packages_apps_Gallery2-9fca091600d01a8121c294dca590245e04221b20.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/filtershow/tools/SaveImage.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/tools/SaveImage.java b/src/com/android/gallery3d/filtershow/tools/SaveImage.java index 24927f00c..94fed754f 100644 --- a/src/com/android/gallery3d/filtershow/tools/SaveImage.java +++ b/src/com/android/gallery3d/filtershow/tools/SaveImage.java @@ -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); |