summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/Camera.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r--src/com/android/camera/Camera.java21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 311f56d..77ed9c7 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -2021,6 +2021,11 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
}
private void addBaseMenuItems(Menu menu) {
+ MenuHelper.addSwitchModeMenuItem(menu, true, new Runnable() {
+ public void run() {
+ switchToVideoMode();
+ }
+ });
MenuItem gallery = menu.add(Menu.NONE, Menu.NONE,
MenuHelper.POSITION_GOTO_GALLERY,
R.string.camera_gallery_photos_text)
@@ -2034,14 +2039,20 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
mGalleryItems.add(gallery);
}
+ private boolean switchToVideoMode() {
+ if (!isCameraIdle()) return false;
+ MenuHelper.gotoVideoMode(this);
+ ((ViewGroup) mGLRootView.getParent()).removeView(mGLRootView);
+ finish();
+ return true;
+ }
+
public boolean onSwitchChanged(Switcher source, boolean onOff) {
if (onOff == SWITCH_VIDEO) {
- if (!isCameraIdle()) return false;
- MenuHelper.gotoVideoMode(this);
- ((ViewGroup) mGLRootView.getParent()).removeView(mGLRootView);
- finish();
+ return switchToVideoMode();
+ } else {
+ return true;
}
- return true;
}
private void onSharedPreferenceChanged() {