summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMangesh Ghiware <mghiware@google.com>2012-10-25 17:44:54 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-25 17:44:55 -0700
commit95a0734d7996db52ecbc128223e17b69a6663684 (patch)
treea361359f4cc2fe398d5b7cc1b46e05a94df88c42 /src
parent7993e1f8392e8c1c84fc4efc9c79996eb85a9122 (diff)
parent5dbcddd9298fc85be0ab178fbb71b97c0495b1bb (diff)
downloadandroid_packages_apps_Snap-95a0734d7996db52ecbc128223e17b69a6663684.tar.gz
android_packages_apps_Snap-95a0734d7996db52ecbc128223e17b69a6663684.tar.bz2
android_packages_apps_Snap-95a0734d7996db52ecbc128223e17b69a6663684.zip
Merge "Handle 360 panorama specific MIME type." into gb-ub-photos-arches
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/Gallery.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/Gallery.java b/src/com/android/gallery3d/app/Gallery.java
index 6ca4bab2d..78fedd838 100644
--- a/src/com/android/gallery3d/app/Gallery.java
+++ b/src/com/android/gallery3d/app/Gallery.java
@@ -118,7 +118,10 @@ public final class Gallery extends AbstractGalleryActivity implements OnCancelLi
private String getContentType(Intent intent) {
String type = intent.getType();
- if (type != null) return type;
+ if (type != null) {
+ return GalleryUtils.MIME_TYPE_PANORAMA360.equals(type)
+ ? MediaItem.MIME_TYPE_JPEG : type;
+ }
Uri uri = intent.getData();
try {
@@ -192,7 +195,7 @@ public final class Gallery extends AbstractGalleryActivity implements OnCancelLi
startDefaultPage();
}
} else {
- Path itemPath = dm.findPathByUri(uri, intent.getType());
+ Path itemPath = dm.findPathByUri(uri, contentType);
Path albumPath = dm.getDefaultSetOf(itemPath);
data.putString(PhotoPage.KEY_MEDIA_ITEM_PATH, itemPath.toString());