diff options
author | Angus Kong <shkong@google.com> | 2011-11-01 19:05:51 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-01 19:05:51 -0700 |
commit | cd2256375a71ae4c19808d22c313d999cc750d0c (patch) | |
tree | f0f655c22fcbb0ffcf47ef2feca6e4ce79c36046 /src/com/android/camera/Camera.java | |
parent | f587df73563cee9dccbcd29390734152d9fe99f6 (diff) | |
parent | d33109730e0ab81230f84e2bd35599e8e24fc4ba (diff) | |
download | LegacyCamera-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.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 { |