diff options
author | Wei-Ta Chen <weita@google.com> | 2009-09-27 16:20:23 -0700 |
---|---|---|
committer | Wei-Ta Chen <weita@google.com> | 2009-09-27 20:30:59 -0700 |
commit | bf45b96e76d84856ab510508ea5dafd9ab834eba (patch) | |
tree | 0be1cb9c779954fc8252aaf8906773f982bbabdd /src | |
parent | e985b604a0fc0cea55f595ec82e96bc4ddd221da (diff) | |
download | LegacyCamera-bf45b96e76d84856ab510508ea5dafd9ab834eba.zip LegacyCamera-bf45b96e76d84856ab510508ea5dafd9ab834eba.tar.gz LegacyCamera-bf45b96e76d84856ab510508ea5dafd9ab834eba.tar.bz2 |
Fix http://b/2149062 by showing on-screen setting when clicking the menu key.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Camera.java | 8 | ||||
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 6 |
2 files changed, 13 insertions, 1 deletions
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); } |