summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/gallery3d/app/Gallery.java7
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java15
2 files changed, 20 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());
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 55a0103b7..7b4ae6691 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -393,6 +393,10 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
}
private void startLoadBitmap(Uri uri) {
+ final View filters = findViewById(R.id.filtersPanel);
+ final View loading = findViewById(R.id.loading);
+ loading.setVisibility(View.VISIBLE);
+ filters.setVisibility(View.INVISIBLE);
View tinyPlanetView = findViewById(R.id.tinyplanetButton);
if (tinyPlanetView != null) {
tinyPlanetView.setVisibility(View.GONE);
@@ -413,10 +417,21 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
@Override
protected Boolean doInBackground(Uri... params) {
mImageLoader.loadBitmap(params[0], mBitmapSize);
+ publishProgress();
return mImageLoader.queryLightCycle360();
}
@Override
+ protected void onProgressUpdate(Void... values) {
+ super.onProgressUpdate(values);
+ if (isCancelled()) return;
+ final View filters = findViewById(R.id.filtersPanel);
+ final View loading = findViewById(R.id.loading);
+ loading.setVisibility(View.GONE);
+ filters.setVisibility(View.VISIBLE);
+ }
+
+ @Override
protected void onPostExecute(Boolean result) {
if (isCancelled()) {
return;