summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-03-24 16:42:54 +0800
committeremancebo <emancebo@cyngn.com>2014-09-04 10:40:19 -0700
commit450a39349f2d0b27de110e68201b2844448f5d34 (patch)
treecab8ec56ee950757035c2ebfcdfc941a75e0f1da
parent1291323a43411b6a56bef67818c3a1e2c0108ec2 (diff)
downloadandroid_packages_apps_Gallery2-450a39349f2d0b27de110e68201b2844448f5d34.tar.gz
android_packages_apps_Gallery2-450a39349f2d0b27de110e68201b2844448f5d34.tar.bz2
android_packages_apps_Gallery2-450a39349f2d0b27de110e68201b2844448f5d34.zip
Gallery2: Fix gallery crash when view gif pic in Mms
When use data uri of file from fileExplorer to view gif picture, the activity can not be found. Add type to the intent of ViewGifActivity to make the Activity can be found successfully. CRs-fixed: 636457 Change-Id: I123c3551dc394d099e03713cd415ed008b716453
-rwxr-xr-xsrc/com/android/gallery3d/app/PhotoPage.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java
index 7f4671364..4fcd028c6 100755
--- a/src/com/android/gallery3d/app/PhotoPage.java
+++ b/src/com/android/gallery3d/app/PhotoPage.java
@@ -1546,7 +1546,8 @@ public abstract class PhotoPage extends ActivityState implements
}
private static void viewAnimateGif(Activity activity, Uri uri) {
- Intent intent = new Intent(ViewGifImage.VIEW_GIF_ACTION, uri);
+ Intent intent = new Intent(ViewGifImage.VIEW_GIF_ACTION);
+ intent.setDataAndType(uri, MediaItem.MIME_TYPE_GIF);
activity.startActivity(intent);
}
}