summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PhotoModule.java
diff options
context:
space:
mode:
authorAlan Newberger <alann@google.com>2014-09-10 15:03:27 -0700
committerAlan Newberger <alann@google.com>2014-09-10 17:23:19 -0700
commit7351415ddfaf7f563a4a12c9204e6feb20fdf49d (patch)
tree5ec046a46b0b5c3df488da093579419e391372cd /src/com/android/camera/PhotoModule.java
parent87a2300ff2b49b8bd6a69815d1e4f3db477fcf4d (diff)
downloadandroid_packages_apps_Camera2-7351415ddfaf7f563a4a12c9204e6feb20fdf49d.tar.gz
android_packages_apps_Camera2-7351415ddfaf7f563a4a12c9204e6feb20fdf49d.tar.bz2
android_packages_apps_Camera2-7351415ddfaf7f563a4a12c9204e6feb20fdf49d.zip
Reset aspect ratio on pause
When resuming the app we do resize things but the old aspect ratio is cached, thus skipping a reset of the transform matrices because the app thinks it is already at the correct aspect ratio. In certain cases (changing orientation when paused) this leads to layout bugs. Bug: 17304671 Change-Id: Ia171190b3c76dc05519bdf4d1947d9664d5fb604
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-rw-r--r--src/com/android/camera/PhotoModule.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 104ef9b38..f0998a08c 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2136,6 +2136,7 @@ public class PhotoModule
(double) size.width() / size.height());
Size original = mCameraSettings.getCurrentPreviewSize();
if (!optimalSize.equals(original)) {
+ Log.v(TAG, "setting preview size");
mCameraSettings.setPreviewSize(optimalSize);
// Zoom related settings will be changed for different preview
@@ -2150,10 +2151,11 @@ public class PhotoModule
}
if (optimalSize.width() != 0 && optimalSize.height() != 0) {
+ Log.v(TAG, "updating aspect ratio");
mUI.updatePreviewAspectRatio((float) optimalSize.width()
/ (float) optimalSize.height());
}
- Log.i(TAG, "Preview size is " + optimalSize);
+ Log.d(TAG, "Preview size is " + optimalSize);
}
private void updateParametersPictureQuality() {