summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/Camera.java
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2011-11-01 19:05:51 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-01 19:05:51 -0700
commitcd2256375a71ae4c19808d22c313d999cc750d0c (patch)
treef0f655c22fcbb0ffcf47ef2feca6e4ce79c36046 /src/com/android/camera/Camera.java
parentf587df73563cee9dccbcd29390734152d9fe99f6 (diff)
parentd33109730e0ab81230f84e2bd35599e8e24fc4ba (diff)
downloadLegacyCamera-cd2256375a71ae4c19808d22c313d999cc750d0c.zip
LegacyCamera-cd2256375a71ae4c19808d22c313d999cc750d0c.tar.gz
LegacyCamera-cd2256375a71ae4c19808d22c313d999cc750d0c.tar.bz2
Merge "Change the default orientation to portrait." into ics-mr1
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r--src/com/android/camera/Camera.java7
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 {