diff options
Diffstat (limited to 'src/com/android/camera/panorama/PanoramaActivity.java')
-rwxr-xr-x | src/com/android/camera/panorama/PanoramaActivity.java | 15 |
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() { |