Added ability to add extra views overlaying the search edit text box.

For bug: http://b/issue?id=2602198

Change-Id: Ibcaa6aaaad0e4a00ab28aed7680760f3b63847af
diff --git a/res/layout/search_activity.xml b/res/layout/search_activity.xml
index 153c396..6161dbd 100644
--- a/res/layout/search_activity.xml
+++ b/res/layout/search_activity.xml
@@ -55,28 +55,36 @@
 
         <include layout="@layout/corpus_indicator" />
 
-        <EditText
-            android:id="@+id/search_src_text"
+        <RelativeLayout
             android:layout_width="0dip"
             android:layout_height="wrap_content"
             android:layout_weight="1.0"
             android:layout_marginTop="6dip"
-            android:layout_marginBottom="6dip"
-            android:paddingLeft="10dip"
-            android:paddingRight="10dip"
-            android:paddingTop="5dip"
-            android:paddingBottom="5dip"
-            android:gravity="center_vertical|left"
-            android:singleLine="true"
-            android:ellipsize="end"
-            android:inputType="text|textAutoComplete"
-            android:background="@drawable/textfield_search_empty_google"
-            android:textSize="18sp"
-            android:textStyle="normal"
-            android:textColor="@android:color/primary_text_light"
-            android:textColorHint="@color/search_hint"
-            android:imeOptions="actionGo"
-        />
+            android:layout_marginBottom="6dip" >
+
+            <EditText
+                android:id="@+id/search_src_text"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingLeft="10dip"
+                android:paddingRight="10dip"
+                android:paddingTop="5dip"
+                android:paddingBottom="5dip"
+                android:gravity="center_vertical|left"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:inputType="text|textAutoComplete"
+                android:background="@drawable/textfield_search_empty_google"
+                android:textSize="18sp"
+                android:textStyle="normal"
+                android:textColor="@android:color/primary_text_light"
+                android:textColorHint="@color/search_hint"
+                android:imeOptions="actionGo"
+            />
+
+            <include layout="@layout/search_text_overlay"/>
+
+        </RelativeLayout>
 
         <ImageButton 
             android:id="@+id/search_go_btn"
diff --git a/res/layout/search_text_overlay.xml b/res/layout/search_text_overlay.xml
new file mode 100644
index 0000000..62d72e7
--- /dev/null
+++ b/res/layout/search_text_overlay.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<merge />
\ No newline at end of file
diff --git a/src/com/android/quicksearchbox/SearchActivity.java b/src/com/android/quicksearchbox/SearchActivity.java
index acce179..7537549 100644
--- a/src/com/android/quicksearchbox/SearchActivity.java
+++ b/src/com/android/quicksearchbox/SearchActivity.java
@@ -425,7 +425,7 @@
         }
     }
 
-    private void updateUi(boolean queryEmpty) {
+    protected void updateUi(boolean queryEmpty) {
         updateQueryTextView(queryEmpty);
         updateSearchGoButton(queryEmpty);
         updateVoiceSearchButton(queryEmpty);
diff --git a/src/com/android/quicksearchbox/ui/SuggestionsView.java b/src/com/android/quicksearchbox/ui/SuggestionsView.java
index a7c4453..934a46a 100644
--- a/src/com/android/quicksearchbox/ui/SuggestionsView.java
+++ b/src/com/android/quicksearchbox/ui/SuggestionsView.java
@@ -58,7 +58,7 @@
     }
 
     public void addSuggestionSelectionListener(SuggestionSelectionListener listener) {
-        if ((listener == null) || (mSuggestionSelectionListener.contains(listener))) {
+        if (listener == null) {
             return;
         }
         mSuggestionSelectionListener.add(listener);