Skip to content

Commit

Permalink
Revert "Remove searchable metadata."
Browse files Browse the repository at this point in the history
We are not deprecating the global search API in this release, so we
should keep this for now.

Bug: 10487397
  • Loading branch information
mathewinwood committed Sep 30, 2013
1 parent 9642118 commit 700d369
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
3 changes: 3 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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>
Expand Down
29 changes: 29 additions & 0 deletions res/xml/searchable.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 700d369

Please sign in to comment.