From 450a39349f2d0b27de110e68201b2844448f5d34 Mon Sep 17 00:00:00 2001 From: kaiyiz Date: Mon, 24 Mar 2014 16:42:54 +0800 Subject: 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 --- src/com/android/gallery3d/app/PhotoPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } -- cgit v1.2.3