summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamera Software Integration <camswint@localhost>2015-10-21 15:32:48 -0700
committerMichael Bestas <mikeioannina@cyanogenmod.org>2016-02-16 15:44:53 +0200
commit808bc73d3cb6f954eec9798c555373bd8c3bca93 (patch)
tree8baf2658b62dcfee09c026c9e675176b93a187fa
parent45f5ede011e3ebdbfa644c2fe4bf93e41f653192 (diff)
downloadandroid_packages_apps_Snap-808bc73d3cb6f954eec9798c555373bd8c3bca93.zip
android_packages_apps_Snap-808bc73d3cb6f954eec9798c555373bd8c3bca93.tar.gz
android_packages_apps_Snap-808bc73d3cb6f954eec9798c555373bd8c3bca93.tar.bz2
SnapdragonCamera: Updating preview size again
On layout change, need to call preview size change again as it's not guaranteed it's called first always. Change-Id: I8a687fbf162924f36f2ff7be2a3ba1c6304b27f6 CRs-Fixed: 893423
-rw-r--r--src/com/android/camera/PhotoModule.java5
-rw-r--r--src/com/android/camera/PhotoUI.java6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 3e5e9bf..8a0533a 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -381,6 +381,11 @@ public class PhotoModule
}
}
+ public Parameters getParameters()
+ {
+ return mParameters;
+ }
+
/**
* This Handler is used to post message back onto the main thread of the
* application
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index b00db14..3a9a2c1 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -157,6 +157,12 @@ public class PhotoUI implements PieListener,
int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
if (mMenu != null)
mMenu.tryToCloseSubList();
+
+ Camera.Parameters parameters = ((PhotoModule)mController).getParameters();
+ if(parameters != null) {
+ Camera.Size size = parameters.getPreviewSize();
+ setAspectRatio((float) size.width / size.height);
+ }
}
};