diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-03-24 16:42:54 +0800 |
---|---|---|
committer | emancebo <emancebo@cyngn.com> | 2014-09-04 10:40:19 -0700 |
commit | 450a39349f2d0b27de110e68201b2844448f5d34 (patch) | |
tree | cab8ec56ee950757035c2ebfcdfc941a75e0f1da /src | |
parent | 1291323a43411b6a56bef67818c3a1e2c0108ec2 (diff) | |
download | android_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
Diffstat (limited to 'src')
-rwxr-xr-x | src/com/android/gallery3d/app/PhotoPage.java | 3 |
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); } } |