diff options
author | Yorke Lee <yorkelee@google.com> | 2013-12-05 14:25:51 -0800 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2014-03-01 18:13:13 +0000 |
commit | 0b7577214a461ab9356f3493ec677051e3606e70 (patch) | |
tree | 20dee918af63ae27ad61514cb7692dc7bd3cbc5e /res | |
parent | b0b153f5fe5833d1a3b102e93e6e27481a90e4f7 (diff) | |
download | android_packages_apps_Dialer-0b7577214a461ab9356f3493ec677051e3606e70.tar.gz android_packages_apps_Dialer-0b7577214a461ab9356f3493ec677051e3606e70.tar.bz2 android_packages_apps_Dialer-0b7577214a461ab9356f3493ec677051e3606e70.zip |
Hide voice search button if intent cannot be handled
If the Google Search app is disabled (this only seems to be possible
on Nexus 4), the Dialer crashes if the voice search button is pressed.
This CL hides/shows the voice search button every time the dialer
is launched/resumed after checking to see if there exists an activity
that can handle the ACTION_RECOGNIZE_SPEECH intent.
A string to indicate that voice search is unavailable is also added
just in case the user ends up in a weird state where the button is
showing but clicking on it would throw an ActivityNotFoundException.
Bug: 12015318
Change-Id: Idd7ec2da422425dd95ae0060ebc9b85a2cf35fb0
(cherry picked from commit da0f9046b2457c8adc0b97896d7ea1e880eccf96)
Diffstat (limited to 'res')
-rw-r--r-- | res/values/strings.xml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 55cdea4de..3723fd77d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -519,6 +519,9 @@ <!-- Message displayed when there is no application available to handle the add contact menu option. [CHAR LIMIT=NONE] --> <string name="add_contact_not_available">Re-enable the People application to use this feature.</string> + <!-- Message displayed when there is no application available to handle voice search. [CHAR LIMIT=NONE] --> + <string name="voice_search_not_available">Voice search is not available.</string> + <!-- Hint displayed in dialer search box when there is no query that is currently typed. [CHAR LIMIT=30] --> <string name="dialer_hint_find_contact">Type a name or phone number</string> |