diff options
Diffstat (limited to 'src/com/android/gallery3d/app/PhotoPage.java')
-rwxr-xr-x | src/com/android/gallery3d/app/PhotoPage.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 90e47ab82..793b1d75a 100755 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -81,6 +81,7 @@ import com.android.gallery3d.ui.SynchronizedHandler; import com.android.gallery3d.util.GDepth; import com.android.gallery3d.util.GalleryUtils; import com.android.gallery3d.util.UsageStatistics; +import com.android.gallery3d.util.ViewGifImage; import java.util.List; import java.util.Locale; @@ -1343,6 +1344,10 @@ public abstract class PhotoPage extends ActivityState implements // item is not ready or it is camera preview, ignore return; } + if (item.getMimeType().equals(MediaItem.MIME_TYPE_GIF)) { + viewAnimateGif((Activity) mActivity, item.getContentUri()); + return; + } int supported = item.getSupportedOperations(); boolean playVideo = ((supported & MediaItem.SUPPORT_PLAY) != 0); @@ -1842,4 +1847,9 @@ public abstract class PhotoPage extends ActivityState implements m3DButton.refresh(); } } + + private static void viewAnimateGif(Activity activity, Uri uri) { + Intent intent = new Intent(ViewGifImage.VIEW_GIF_ACTION, uri); + activity.startActivity(intent); + } } |