Revert "Remove searchable metadata."

We are not deprecating the global search API in this release, so we
should keep this for now.

Bug: 10487397
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e954390..bae0341 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -141,6 +141,9 @@
                 <data android:mimeType="vnd.android.cursor.dir/contact" />
             </intent-filter>
 
+            <meta-data android:name="android.app.searchable"
+                android:resource="@xml/searchable"
+            />
         </activity>
 
         <activity android:name=".activities.ContactSelectionActivity"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index cedb547..8326603 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -85,6 +85,9 @@
     <!-- The tab label for the contact detail activity that displays information about the contact [CHAR LIMIT=15] -->
     <string name="contactDetailUpdates">Updates</string>
 
+    <!-- Hint text in the search box when the user hits the Search key while in the contacts app -->
+    <string name="searchHint">Search contacts</string>
+
     <!-- Menu item used to view the details for a specific contact -->
     <string name="menu_viewContact">View contact</string>
 
@@ -320,6 +323,9 @@
     <!-- Message in progress bar while exporting contact list to a file "(current number) of (total number) contacts" The order of "current number" and "total number" cannot be changed (like "total: (total number), current: (current number)")-->
     <string name="exporting_contact_list_progress"><xliff:g id="current_number">%s</xliff:g> of <xliff:g id="total_number">%s</xliff:g> contacts</string>
 
+    <!-- The string used to describe Contacts as a searchable item within system search settings. -->
+    <string name="search_settings_description">Names of your contacts</string>
+
     <!-- Shown as a toast when the user taps on a QuickContact icon, and no application
          was found that could perform the selected action. [CHAR LIMIT=NONE] -->
     <string name="quickcontact_missing_app">No app was found to handle this action.</string>
diff --git a/res/xml/searchable.xml b/res/xml/searchable.xml
new file mode 100644
index 0000000..3d6876e
--- /dev/null
+++ b/res/xml/searchable.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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.
+-->
+
+<searchable xmlns:android="http://schemas.android.com/apk/res/android"
+    android:label="@string/contactsList"
+    android:hint="@string/searchHint"
+    android:searchMode="queryRewriteFromText"
+
+    android:includeInGlobalSearch="true"
+    android:queryAfterZeroResults="true"
+    android:searchSuggestAuthority="com.android.contacts"
+    android:searchSuggestIntentAction="android.provider.Contacts.SEARCH_SUGGESTION_CLICKED"
+    android:searchSuggestIntentData="content://com.android.contacts/contacts/lookup"
+    android:searchSettingsDescription="@string/search_settings_description"
+>
+</searchable>