summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/data/MediaObject.java
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-10-18 14:20:39 -0700
committerGeorge Mount <mount@google.com>2012-10-18 16:32:48 -0700
commit16b3bfbbd2a6447684ac406554f862b29c873751 (patch)
treef2363be751273002eb7716404c601d230ce2cc18 /src/com/android/gallery3d/data/MediaObject.java
parent79b74e0fd52cd2ba92130c5131474d52170d6f7e (diff)
downloadandroid_packages_apps_Snap-16b3bfbbd2a6447684ac406554f862b29c873751.tar.gz
android_packages_apps_Snap-16b3bfbbd2a6447684ac406554f862b29c873751.tar.bz2
android_packages_apps_Snap-16b3bfbbd2a6447684ac406554f862b29c873751.zip
Remove panorama checks from supported operations.
Bug 7351383 Bug 7349438 Move panorama support checks from getSupportedOperations so that calls to getSupportedOperations are consistent. Panorama checks are moved to only based on callbacks. Change-Id: Id9ff138204df84c6fb0a4c971dcea59f1220aee2
Diffstat (limited to 'src/com/android/gallery3d/data/MediaObject.java')
-rw-r--r--src/com/android/gallery3d/data/MediaObject.java23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/com/android/gallery3d/data/MediaObject.java b/src/com/android/gallery3d/data/MediaObject.java
index 14cd5242a..a41b275fb 100644
--- a/src/com/android/gallery3d/data/MediaObject.java
+++ b/src/com/android/gallery3d/data/MediaObject.java
@@ -18,8 +18,6 @@ package com.android.gallery3d.data;
import android.net.Uri;
-import com.android.gallery3d.util.ThreadPool;
-
public abstract class MediaObject {
@SuppressWarnings("unused")
private static final String TAG = "MediaObject";
@@ -43,16 +41,8 @@ public abstract class MediaObject {
public static final int SUPPORT_BACK = 1 << 14;
public static final int SUPPORT_ACTION = 1 << 15;
public static final int SUPPORT_CAMERA_SHORTCUT = 1 << 16;
- // The panorama specific bits are expensive to compute.
- // Use SupportedOperationsListener to request them.
- public static final int SUPPORT_PANORAMA = 1 << 30;
- public static final int SUPPORT_PANORAMA360 = 1 << 31;
public static final int SUPPORT_ALL = 0xffffffff;
- public static interface SupportedOperationsListener {
- public void onChange(MediaObject item, int operations);
- }
-
// These are the bits returned from getMediaType():
public static final int MEDIA_TYPE_UNKNOWN = 1;
public static final int MEDIA_TYPE_IMAGE = 2;
@@ -80,9 +70,9 @@ public abstract class MediaObject {
protected final Path mPath;
- private static ThreadPool sThreadPool = new ThreadPool(1, 1);
- public static ThreadPool getThreadPool() {
- return sThreadPool;
+ public interface PanoramaSupportCallback {
+ void panoramaInfoAvailable(MediaObject mediaObject, boolean isPanorama,
+ boolean isPanorama360);
}
public MediaObject(Path path, long version) {
@@ -99,12 +89,11 @@ public abstract class MediaObject {
return 0;
}
- public int getSupportedOperations(boolean getAll) {
- return getSupportedOperations();
+ public void getPanoramaSupport(PanoramaSupportCallback callback) {
+ callback.panoramaInfoAvailable(this, false, false);
}
- public void setSupportedOperationsListener(SupportedOperationsListener l) {
- // nothing to do
+ public void clearCachedPanoramaSupport() {
}
public void delete() {