Fix 2182549: Disable search button when using camera.
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 45a2f9b..13d0465 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -82,7 +82,7 @@
 /**
  * Activity of the Camera which used to see preview and take pictures.
  */
-public class Camera extends Activity implements View.OnClickListener,
+public class Camera extends NoSearchActivity implements View.OnClickListener,
         ShutterButton.OnShutterButtonListener, SurfaceHolder.Callback,
         Switcher.OnSwitchListener, OnScreenSettings.OnVisibilityChangedListener,
         OnSharedPreferenceChangeListener {
diff --git a/src/com/android/camera/DeleteImage.java b/src/com/android/camera/DeleteImage.java
index 3a13466..dec65ee 100644
--- a/src/com/android/camera/DeleteImage.java
+++ b/src/com/android/camera/DeleteImage.java
@@ -26,7 +26,7 @@
 
 import java.util.ArrayList;
 
-public class DeleteImage extends Activity {
+public class DeleteImage extends NoSearchActivity {
 
     @SuppressWarnings("unused")
     private static final String TAG = "DeleteImage";
diff --git a/src/com/android/camera/GalleryPicker.java b/src/com/android/camera/GalleryPicker.java
index 29a06a6..1a6db37 100644
--- a/src/com/android/camera/GalleryPicker.java
+++ b/src/com/android/camera/GalleryPicker.java
@@ -67,7 +67,7 @@
 /**
  * The GalleryPicker activity.
  */
-public class GalleryPicker extends Activity {
+public class GalleryPicker extends NoSearchActivity {
     private static final String TAG = "GalleryPicker";
 
     Handler mHandler = new Handler();  // handler for the main thread
diff --git a/src/com/android/camera/ImageGallery.java b/src/com/android/camera/ImageGallery.java
index cfdc634..f288d27 100644
--- a/src/com/android/camera/ImageGallery.java
+++ b/src/com/android/camera/ImageGallery.java
@@ -62,7 +62,7 @@
 import java.util.ArrayList;
 import java.util.HashSet;
 
-public class ImageGallery extends Activity implements
+public class ImageGallery extends NoSearchActivity implements
         GridViewSpecial.Listener, GridViewSpecial.DrawAdapter {
     private static final String STATE_SCROLL_POSITION = "scroll_position";
     private static final String STATE_SELECTED_INDEX = "first_index";
diff --git a/src/com/android/camera/MonitoredActivity.java b/src/com/android/camera/MonitoredActivity.java
index 94c163f..4c8f77d 100644
--- a/src/com/android/camera/MonitoredActivity.java
+++ b/src/com/android/camera/MonitoredActivity.java
@@ -21,7 +21,7 @@
 
 import java.util.ArrayList;
 
-public class MonitoredActivity extends Activity {
+public class MonitoredActivity extends NoSearchActivity {
 
     private final ArrayList<LifeCycleListener> mListeners =
             new ArrayList<LifeCycleListener>();
diff --git a/src/com/android/camera/MovieView.java b/src/com/android/camera/MovieView.java
index 48001b8..54d3e8e 100644
--- a/src/com/android/camera/MovieView.java
+++ b/src/com/android/camera/MovieView.java
@@ -28,7 +28,7 @@
 /**
  * This activity plays a video from a specified URI.
  */
-public class MovieView extends Activity  {
+public class MovieView extends NoSearchActivity  {
     private static final String TAG = "MovieView";
 
     private MovieViewControl mControl;
diff --git a/src/com/android/camera/NoSearchActivity.java b/src/com/android/camera/NoSearchActivity.java
new file mode 100644
index 0000000..f859ce9
--- /dev/null
+++ b/src/com/android/camera/NoSearchActivity.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.camera;
+
+import android.app.Activity;
+
+public class NoSearchActivity extends Activity {
+    @Override
+    public boolean onSearchRequested() {
+        return false;
+    }
+}
diff --git a/src/com/android/camera/PhotoAppWidgetBind.java b/src/com/android/camera/PhotoAppWidgetBind.java
index 628fdc6..5c2aa50 100644
--- a/src/com/android/camera/PhotoAppWidgetBind.java
+++ b/src/com/android/camera/PhotoAppWidgetBind.java
@@ -28,7 +28,7 @@
 
 import java.util.ArrayList;
 
-class PhotoAppWidgetBind extends Activity {
+class PhotoAppWidgetBind extends NoSearchActivity {
     private static final String TAG = "PhotoAppWidgetBind";
     private static final String EXTRA_APPWIDGET_BITMAPS =
             "com.android.camera.appwidgetbitmaps";
diff --git a/src/com/android/camera/PhotoAppWidgetConfigure.java b/src/com/android/camera/PhotoAppWidgetConfigure.java
index 1755a71..76174c7 100644
--- a/src/com/android/camera/PhotoAppWidgetConfigure.java
+++ b/src/com/android/camera/PhotoAppWidgetConfigure.java
@@ -26,7 +26,7 @@
 import android.util.DisplayMetrics;
 import android.widget.RemoteViews;
 
-public class PhotoAppWidgetConfigure extends Activity {
+public class PhotoAppWidgetConfigure extends NoSearchActivity {
 
     @SuppressWarnings("unused")
     private static final String TAG = "PhotoAppWidgetConfigure";
diff --git a/src/com/android/camera/ReviewImage.java b/src/com/android/camera/ReviewImage.java
index 0633b18..d054184 100644
--- a/src/com/android/camera/ReviewImage.java
+++ b/src/com/android/camera/ReviewImage.java
@@ -48,7 +48,7 @@
 // the user view one image at a time, and can click "previous" and "next"
 // button to see the previous or next image. In slide show mode it shows one
 // image after another, with some transition effect.
-public class ReviewImage extends Activity implements View.OnClickListener {
+public class ReviewImage extends NoSearchActivity implements View.OnClickListener {
     private static final String STATE_URI = "uri";
     private static final String TAG = "ReviewImage";
     private static final double ASPECT_RATIO = 4.0 / 3.0;
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 4f22804..234fcff 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -81,7 +81,7 @@
 /**
  * The Camcorder activity.
  */
-public class VideoCamera extends Activity implements View.OnClickListener,
+public class VideoCamera extends NoSearchActivity implements View.OnClickListener,
         ShutterButton.OnShutterButtonListener, SurfaceHolder.Callback,
         MediaRecorder.OnErrorListener, MediaRecorder.OnInfoListener,
         Switcher.OnSwitchListener, OnSharedPreferenceChangeListener,
diff --git a/src/com/android/camera/ViewImage.java b/src/com/android/camera/ViewImage.java
index ea14117..835e505 100644
--- a/src/com/android/camera/ViewImage.java
+++ b/src/com/android/camera/ViewImage.java
@@ -53,7 +53,7 @@
 // the user view one image at a time, and can click "previous" and "next"
 // button to see the previous or next image. In slide show mode it shows one
 // image after another, with some transition effect.
-public class ViewImage extends Activity implements View.OnClickListener {
+public class ViewImage extends NoSearchActivity implements View.OnClickListener {
     private static final String PREF_SLIDESHOW_REPEAT =
             "pref_gallery_slideshow_repeat_key";
     private static final String PREF_SHUFFLE_SLIDESHOW =
diff --git a/src/com/android/camera/Wallpaper.java b/src/com/android/camera/Wallpaper.java
index 2d533b5..a715958 100644
--- a/src/com/android/camera/Wallpaper.java
+++ b/src/com/android/camera/Wallpaper.java
@@ -25,7 +25,7 @@
  * Wallpaper picker for the camera application. This just redirects to the
  * standard pick action.
  */
-public class Wallpaper extends Activity {
+public class Wallpaper extends NoSearchActivity {
     @SuppressWarnings("unused")
     private static final String TAG = "Wallpaper";
     private static final int PHOTO_PICKED = 1;