summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoUI.java
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-08-25 14:47:58 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-25 14:47:58 -0700
commite3d899eaa76b143410ac3047d4fc3c0edeb2e13b (patch)
treeaec23e8adddebf3097f41d5d38d6ab5ce8a4800c /src/com/android/camera/VideoUI.java
parent1d5c28bd33a303dee406da2bf80529f2648a98c5 (diff)
parent8f4c85f6cc70934a4ecec31bad05fef8b5b67d42 (diff)
downloadandroid_packages_apps_Snap-e3d899eaa76b143410ac3047d4fc3c0edeb2e13b.tar.gz
android_packages_apps_Snap-e3d899eaa76b143410ac3047d4fc3c0edeb2e13b.tar.bz2
android_packages_apps_Snap-e3d899eaa76b143410ac3047d4fc3c0edeb2e13b.zip
Merge "SnapdragonCamera:Fix abnormal menu after switch camcorder to camera" into camera.lnx.1.0-dev.1.0
Diffstat (limited to 'src/com/android/camera/VideoUI.java')
-rw-r--r--src/com/android/camera/VideoUI.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 41b9cfd89..00f3c705a 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -295,17 +295,19 @@ public class VideoUI implements PieRenderer.PieListener,
Point size = new Point();
mActivity.getWindowManager().getDefaultDisplay().getSize(size);
mScreenRatio = CameraUtil.determineRatio(size.x, size.y);
- if (mScreenRatio == CameraUtil.RATIO_16_9) {
- int l = size.x > size.y ? size.x : size.y;
- int tm = mActivity.getResources().getDimensionPixelSize(R.dimen.preview_top_margin);
- int bm = mActivity.getResources().getDimensionPixelSize(R.dimen.preview_bottom_margin);
- mTopMargin = l / 4 * tm / (tm + bm);
- mBottomMargin = l / 4 - mTopMargin;
- }
+ calculateMargins(size);
mCameraControls.setMargins(mTopMargin, mBottomMargin);
((ViewGroup)mRootView).removeView(mRecordingTimeRect);
}
+ private void calculateMargins(Point size) {
+ int l = size.x > size.y ? size.x : size.y;
+ int tm = mActivity.getResources().getDimensionPixelSize(R.dimen.preview_top_margin);
+ int bm = mActivity.getResources().getDimensionPixelSize(R.dimen.preview_bottom_margin);
+ mTopMargin = l / 4 * tm / (tm + bm);
+ mBottomMargin = l / 4 - mTopMargin;
+ }
+
public void cameraOrientationPreviewResize(boolean orientation){
mPrevOrientationResize = mOrientationResize;
mOrientationResize = orientation;