diff options
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r-- | src/com/android/camera/Camera.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index f78d51f..1bd759b 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -33,6 +33,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences.Editor; +import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.hardware.Camera.CameraInfo; import android.hardware.Camera.Face; @@ -823,7 +824,11 @@ public class Camera extends ActivityBase implements FocusManager.Listener, r.width = width; r.height = height; r.dateTaken = System.currentTimeMillis(); - r.previewWidth = mPreviewFrameLayout.getWidth(); + if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) { + r.previewWidth = mPreviewFrameLayout.getHeight(); + } else { + r.previewWidth = mPreviewFrameLayout.getWidth(); + } synchronized (this) { while (mQueue.size() >= QUEUE_LIMIT) { try { |