Rotate the camera screen nail correctly in gingerbread.
In gingerbread, camera screen nail is a static image.
Handle its rotation like a bitmap screen nail.
bug:6927809
Change-Id: I554483e58fc9e32399acb20f426d7ec35631b7ac
diff --git a/src/com/android/gallery3d/app/PhotoDataAdapter.java b/src/com/android/gallery3d/app/PhotoDataAdapter.java
index 7b979a7..b61e4f4 100644
--- a/src/com/android/gallery3d/app/PhotoDataAdapter.java
+++ b/src/com/android/gallery3d/app/PhotoDataAdapter.java
@@ -150,6 +150,7 @@
private Path mItemPath;
private int mCameraIndex;
private boolean mIsPanorama;
+ private boolean mIsStaticCamera;
private boolean mIsActive;
private boolean mNeedFullImage;
private int mFocusHintDirection = FOCUS_HINT_NEXT;
@@ -170,13 +171,14 @@
// 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) {
+ boolean isPanorama, boolean isStaticCamera) {
mSource = Utils.checkNotNull(mediaSet);
mPhotoView = Utils.checkNotNull(view);
mItemPath = Utils.checkNotNull(itemPath);
mCurrentIndex = indexHint;
mCameraIndex = cameraIndex;
mIsPanorama = isPanorama;
+ mIsStaticCamera = isStaticCamera;
mThreadPool = activity.getThreadPool();
mNeedFullImage = true;
@@ -463,6 +465,11 @@
}
@Override
+ public boolean isStaticCamera(int offset) {
+ return isCamera(offset) && mIsStaticCamera;
+ }
+
+ @Override
public boolean isVideo(int offset) {
MediaItem item = getItem(mCurrentIndex + offset);
return (item == null)