summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMangesh Ghiware <mghiware@google.com>2012-10-25 17:46:49 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-25 17:46:49 -0700
commitb0c02467dee178f3c78dafabe2cb77f212339b4b (patch)
tree37e300482fa2e91124be3220c839085ae7925d85
parentdf6aa0fdf2be4349d4f9e3e9f4d9eea3165b23ad (diff)
parent95a0734d7996db52ecbc128223e17b69a6663684 (diff)
downloadandroid_packages_apps_Snap-b0c02467dee178f3c78dafabe2cb77f212339b4b.tar.gz
android_packages_apps_Snap-b0c02467dee178f3c78dafabe2cb77f212339b4b.tar.bz2
android_packages_apps_Snap-b0c02467dee178f3c78dafabe2cb77f212339b4b.zip
am 5388677d: Merge "Handle 360 panorama specific MIME type." into gb-ub-photos-arches
* commit '5388677d3078f2c218d22465c955e3df6b2ffbed': Handle 360 panorama specific MIME type.
-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());