From bf45b96e76d84856ab510508ea5dafd9ab834eba Mon Sep 17 00:00:00 2001 From: Wei-Ta Chen Date: Sun, 27 Sep 2009 16:20:23 -0700 Subject: Fix http://b/2149062 by showing on-screen setting when clicking the menu key. --- src/com/android/camera/Camera.java | 8 +++++++- src/com/android/camera/VideoCamera.java | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index a8eb349..5896644 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -1227,6 +1227,12 @@ public class Camera extends Activity implements View.OnClickListener, doFocus(false); } return true; + case KeyEvent.KEYCODE_MENU: + if (mIsImageCaptureIntent) { + showOnScreenSettings(); + return true; + } + break; } return super.onKeyUp(keyCode, event); } @@ -1419,7 +1425,7 @@ public class Camera extends Activity implements View.OnClickListener, ViewGroup.LayoutParams params; params = v.getLayoutParams(); Size size = mParameters.getPreviewSize(); - params.width = (int) (params.height * size.width / size.height); + params.width = (params.height * size.width / size.height); Log.v(TAG, "resize to " + params.width + "x" + params.height); v.setLayoutParams(params); } diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index 1d62e23..1b72f15 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -702,6 +702,12 @@ public class VideoCamera extends Activity implements View.OnClickListener, case KeyEvent.KEYCODE_CAMERA: mShutterButton.setPressed(false); return true; + case KeyEvent.KEYCODE_MENU: + if (this.mIsVideoCaptureIntent) { + showOnScreenSettings(); + return true; + } + break; } return super.onKeyUp(keyCode, event); } -- cgit v1.1