summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWei Huang <weih@google.com>2012-01-20 11:22:32 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-20 11:22:32 -0800
commitbd7cbbf021a10005e23fb61e0dd58601bbf1fac0 (patch)
treeed1a64585bf40b71d0265b15d3005eaed9ab6b4e /src
parent62bbca8320c3861fa9b18a7eab26a42116bef9df (diff)
parent1413860cab487d4dfeaf9856e553665dadc5ef1c (diff)
downloadLegacyCamera-bd7cbbf021a10005e23fb61e0dd58601bbf1fac0.zip
LegacyCamera-bd7cbbf021a10005e23fb61e0dd58601bbf1fac0.tar.gz
LegacyCamera-bd7cbbf021a10005e23fb61e0dd58601bbf1fac0.tar.bz2
Merge "Do not allow switching to other activities during panorama capture. (do not merge)" into ics-mr1
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/android/camera/panorama/PanoramaActivity.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java
index e45a841..46f9e34 100755
--- a/src/com/android/camera/panorama/PanoramaActivity.java
+++ b/src/com/android/camera/panorama/PanoramaActivity.java
@@ -63,6 +63,7 @@ import android.os.PowerManager;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
+import android.view.MenuItem;
import android.view.OrientationEventListener;
import android.view.View;
import android.view.ViewGroup;
@@ -237,6 +238,20 @@ public class PanoramaActivity extends ActivityBase implements
return true;
}
+ @Override
+ public boolean onPrepareOptionsMenu(Menu menu) {
+ super.onPrepareOptionsMenu(menu);
+ // Only show the menu when idle.
+ boolean idle = (mCaptureState == CAPTURE_STATE_VIEWFINDER && !mThreadRunning);
+ for (int i = 0; i < menu.size(); i++) {
+ MenuItem item = menu.getItem(i);
+ item.setVisible(idle);
+ item.setEnabled(idle);
+ }
+
+ return true;
+ }
+
private void addBaseMenuItems(Menu menu) {
MenuHelper.addSwitchModeMenuItem(menu, ModePicker.MODE_CAMERA, new Runnable() {
public void run() {