diff options
Diffstat (limited to 'src/com/android/gallery3d/data/MediaObject.java')
-rw-r--r-- | src/com/android/gallery3d/data/MediaObject.java | 23 |
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() { |