diff options
author | Abhisek Devkota <ciwrl@cyanogenmod.com> | 2014-01-29 22:10:33 -0800 |
---|---|---|
committer | Abhisek Devkota <ciwrl@cyanogenmod.com> | 2014-12-13 01:51:33 +0000 |
commit | c321997e01a26712ca4e708c12a05cbec3b43d3e (patch) | |
tree | 26a557b5626c8703bd2717e51b54c06362462a24 /src/com/android/launcher3 | |
parent | 57cf82af7cb9d53261d6a929a3d14a5ff83186fe (diff) | |
download | android_packages_apps_Trebuchet-c321997e01a26712ca4e708c12a05cbec3b43d3e.tar.gz android_packages_apps_Trebuchet-c321997e01a26712ca4e708c12a05cbec3b43d3e.tar.bz2 android_packages_apps_Trebuchet-c321997e01a26712ca4e708c12a05cbec3b43d3e.zip |
Fix invisible voice search
When 'show search bar' is disabled, you can still tap the voice
search icon's position (even though view == gone) to launch search
action.
Partial fix borrowed from 10.2 http://review.cyanogenmod.org/#/c/21584
PS2: Use available variables instead of changing one to protected
PS3: Fix mis-paste
Change-Id: I268d0e1108992028fd324d42e7dc8b6e11c757eb
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 2103c39cc..714c5899d 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -4335,7 +4335,7 @@ public class Launcher extends Activity final SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); ComponentName activityName = searchManager.getGlobalSearchActivity(); - if (activityName != null) { + if (activityName != null && mWorkspace.shouldVoiceButtonProxyBeVisible()) { int coi = getCurrentOrientationIndexForGlobalIcons(); sGlobalSearchIcon[coi] = updateButtonWithIconFromExternalActivity( R.id.search_button, activityName, R.drawable.ic_home_search_normal_holo, diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 6ab3642ab..3fc6f63e4 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -2227,7 +2227,7 @@ public class Workspace extends SmoothPagedView if (mState != State.NORMAL) { return false; } - return true; + return mShowSearchBar; } public void updateInteractionForState() { |