diff options
author | Angus Kong <shkong@google.com> | 2012-05-17 11:50:38 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-17 11:50:38 -0700 |
commit | 9723770a40d230092204dd685f19ff4bce6dabd5 (patch) | |
tree | 5ccb5e6943cdcbac36a813cbb53dc4c223956f9d /src | |
parent | 41832d9f1568c7d8227fb9ffebaf7830345cffff (diff) | |
download | android_packages_apps_Gallery2-9723770a40d230092204dd685f19ff4bce6dabd5.tar.gz android_packages_apps_Gallery2-9723770a40d230092204dd685f19ff4bce6dabd5.tar.bz2 android_packages_apps_Gallery2-9723770a40d230092204dd685f19ff4bce6dabd5.zip |
Revert "Support Panorama preview."
This reverts commit 41832d9f1568c7d8227fb9ffebaf7830345cffff
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/app/AppBridge.java | 1 | ||||
-rw-r--r-- | src/com/android/gallery3d/app/PhotoDataAdapter.java | 10 | ||||
-rw-r--r-- | src/com/android/gallery3d/app/PhotoPage.java | 3 | ||||
-rw-r--r-- | src/com/android/gallery3d/app/SinglePhotoDataAdapter.java | 5 | ||||
-rw-r--r-- | src/com/android/gallery3d/ui/PhotoView.java | 19 |
5 files changed, 4 insertions, 34 deletions
diff --git a/src/com/android/gallery3d/app/AppBridge.java b/src/com/android/gallery3d/app/AppBridge.java index 5d6b1ec52..90cbd0bbb 100644 --- a/src/com/android/gallery3d/app/AppBridge.java +++ b/src/com/android/gallery3d/app/AppBridge.java @@ -34,7 +34,6 @@ public abstract class AppBridge implements Parcelable { // These are requests sent from PhotoPage to the app ////////////////////////////////////////////////////////////////////////// - public abstract boolean isPanorama(); public abstract ScreenNail attachScreenNail(); public abstract void detachScreenNail(); diff --git a/src/com/android/gallery3d/app/PhotoDataAdapter.java b/src/com/android/gallery3d/app/PhotoDataAdapter.java index c92f7ed43..d88b72ca8 100644 --- a/src/com/android/gallery3d/app/PhotoDataAdapter.java +++ b/src/com/android/gallery3d/app/PhotoDataAdapter.java @@ -147,7 +147,6 @@ public class PhotoDataAdapter implements PhotoPage.Model { private int mSize = 0; private Path mItemPath; private int mCameraIndex; - private boolean mIsPanorama; private boolean mIsActive; private boolean mNeedFullImage; @@ -165,14 +164,12 @@ public class PhotoDataAdapter implements PhotoPage.Model { // find the image being viewed. cameraIndex is the index of the camera // preview. If cameraIndex < 0, there is no camera preview. public PhotoDataAdapter(GalleryActivity activity, PhotoView view, - MediaSet mediaSet, Path itemPath, int indexHint, int cameraIndex, - boolean isPanorama) { + MediaSet mediaSet, Path itemPath, int indexHint, int cameraIndex) { mSource = Utils.checkNotNull(mediaSet); mPhotoView = Utils.checkNotNull(view); mItemPath = Utils.checkNotNull(itemPath); mCurrentIndex = indexHint; mCameraIndex = cameraIndex; - mIsPanorama = isPanorama; mThreadPool = activity.getThreadPool(); mNeedFullImage = true; @@ -432,11 +429,6 @@ public class PhotoDataAdapter implements PhotoPage.Model { } @Override - public boolean isPanorama(int offset) { - return isCamera(offset) && mIsPanorama; - } - - @Override public boolean isVideo(int offset) { MediaItem item = getItem(mCurrentIndex + offset); return (item == null) diff --git a/src/com/android/gallery3d/app/PhotoPage.java b/src/com/android/gallery3d/app/PhotoPage.java index 595e35bb7..493e4aaf4 100644 --- a/src/com/android/gallery3d/app/PhotoPage.java +++ b/src/com/android/gallery3d/app/PhotoPage.java @@ -213,8 +213,7 @@ public class PhotoPage extends ActivityState implements } PhotoDataAdapter pda = new PhotoDataAdapter( mActivity, mPhotoView, mMediaSet, itemPath, mCurrentIndex, - mAppBridge == null ? -1 : 0, - mAppBridge == null ? false : mAppBridge.isPanorama()); + mAppBridge == null ? -1 : 0); mModel = pda; mPhotoView.setModel(mModel); diff --git a/src/com/android/gallery3d/app/SinglePhotoDataAdapter.java b/src/com/android/gallery3d/app/SinglePhotoDataAdapter.java index 563d55da6..4ee6a0144 100644 --- a/src/com/android/gallery3d/app/SinglePhotoDataAdapter.java +++ b/src/com/android/gallery3d/app/SinglePhotoDataAdapter.java @@ -190,11 +190,6 @@ public class SinglePhotoDataAdapter extends TileImageViewAdapter } @Override - public boolean isPanorama(int offset) { - return false; - } - - @Override public boolean isVideo(int offset) { return mItem.getMediaType() == MediaItem.MEDIA_TYPE_VIDEO; } diff --git a/src/com/android/gallery3d/ui/PhotoView.java b/src/com/android/gallery3d/ui/PhotoView.java index 2d543179e..7f3bee0a3 100644 --- a/src/com/android/gallery3d/ui/PhotoView.java +++ b/src/com/android/gallery3d/ui/PhotoView.java @@ -69,9 +69,6 @@ public class PhotoView extends GLView { // Returns true if the item is the Camera preview. public boolean isCamera(int offset); - // Returns true if the item is the Panorama. - public boolean isPanorama(int offset); - // Returns true if the item is a Video. public boolean isVideo(int offset); } @@ -404,10 +401,6 @@ public class PhotoView extends GLView { return (mCompensation - mDisplayRotation + 360) % 360; } - private int getPanoramaRotation() { - return mCompensation; - } - //////////////////////////////////////////////////////////////////////////// // Pictures //////////////////////////////////////////////////////////////////////////// @@ -423,7 +416,6 @@ public class PhotoView extends GLView { class FullPicture implements Picture { private int mRotation; private boolean mIsCamera; - private boolean mIsPanorama; private boolean mIsVideo; private boolean mWasCameraCenter; @@ -437,7 +429,6 @@ public class PhotoView extends GLView { mTileView.notifyModelInvalidated(); mIsCamera = mModel.isCamera(0); - mIsPanorama = mModel.isPanorama(0); mIsVideo = mModel.isVideo(0); setScreenNail(mModel.getScreenNail(0)); updateSize(false); @@ -446,9 +437,7 @@ public class PhotoView extends GLView { @Override public void updateSize(boolean force) { - if (mIsPanorama) { - mRotation = getPanoramaRotation(); - } else if (mIsCamera) { + if (mIsCamera) { mRotation = getCameraRotation(); } else { mRotation = mModel.getImageRotation(0); @@ -638,7 +627,6 @@ public class PhotoView extends GLView { private ScreenNail mScreenNail; private Size mSize = new Size(); private boolean mIsCamera; - private boolean mIsPanorama; private boolean mIsVideo; public ScreenNailPicture(int index) { @@ -648,7 +636,6 @@ public class PhotoView extends GLView { @Override public void reload() { mIsCamera = mModel.isCamera(mIndex); - mIsPanorama = mModel.isPanorama(mIndex); mIsVideo = mModel.isVideo(mIndex); setScreenNail(mModel.getScreenNail(mIndex)); } @@ -714,9 +701,7 @@ public class PhotoView extends GLView { @Override public void updateSize(boolean force) { - if (mIsPanorama) { - mRotation = getPanoramaRotation(); - } else if (mIsCamera) { + if (mIsCamera) { mRotation = getCameraRotation(); } else { mRotation = mModel.getImageRotation(mIndex); |