summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2012-01-20 15:54:08 +0800
committerWu-cheng Li <wuchengli@google.com>2012-01-20 17:43:50 +0800
commit1413860cab487d4dfeaf9856e553665dadc5ef1c (patch)
treeeefc792627a88e103f949d750f0ff24c739d35af
parentd72992e05197948b7b5bc96146362f6c6c5fcb46 (diff)
downloadpackages_apps_LegacyCamera-1413860cab487d4dfeaf9856e553665dadc5ef1c.zip
packages_apps_LegacyCamera-1413860cab487d4dfeaf9856e553665dadc5ef1c.tar.gz
packages_apps_LegacyCamera-1413860cab487d4dfeaf9856e553665dadc5ef1c.tar.bz2
Do not allow switching to other activities during panorama capture. (do not merge)
bug:5541182 Change-Id: I1cdbba9a8aec3b5c832f6e58baa26ff6312cf59a
-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 1a5a5aa..02816f4 100755
--- a/src/com/android/camera/panorama/PanoramaActivity.java
+++ b/src/com/android/camera/panorama/PanoramaActivity.java
@@ -62,6 +62,7 @@ import android.os.ParcelFileDescriptor;
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;
@@ -235,6 +236,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() {