summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2011-08-26 22:34:13 +0800
committerOwen Lin <owenlin@google.com>2011-08-26 22:34:13 +0800
commit1801ef094a8afe7973dc4ec877cc51262fd1544a (patch)
treecb4a46afea6225d59bda0590ec17ad737df73bb5
parentbd8e025f1bb39b2be236b183ea8e78f93b308ad1 (diff)
downloadandroid_packages_apps_Gallery2-1801ef094a8afe7973dc4ec877cc51262fd1544a.tar.gz
android_packages_apps_Gallery2-1801ef094a8afe7973dc4ec877cc51262fd1544a.tar.bz2
android_packages_apps_Gallery2-1801ef094a8afe7973dc4ec877cc51262fd1544a.zip
Fix: 5217165, cannot edit downloaded image
The contentUri of the download image is "file:///xxx". Thus, it cannot get the correct file type. So, we pass the mimetype in the intent to fix this issue. Change-Id: I49b4b96472eb6a1561fbada95190c829728c037e
-rw-r--r--src/com/android/gallery3d/ui/MenuExecutor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/ui/MenuExecutor.java b/src/com/android/gallery3d/ui/MenuExecutor.java
index 710ddc422..637c01ec4 100644
--- a/src/com/android/gallery3d/ui/MenuExecutor.java
+++ b/src/com/android/gallery3d/ui/MenuExecutor.java
@@ -345,7 +345,7 @@ public class MenuExecutor {
try {
activity.startActivity(Intent.createChooser(
new Intent(Intent.ACTION_EDIT)
- .setData(item.getContentUri())
+ .setDataAndType(item.getContentUri(), item.getMimeType())
.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION),
null));
} catch (Throwable t) {