summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhisek Devkota <ciwrl@cyanogenmod.com>2014-01-30 06:10:33 (GMT)
committerAbhisek Devkota <ciwrl@cyanogenmod.com>2014-12-13 01:51:33 (GMT)
commitc321997e01a26712ca4e708c12a05cbec3b43d3e (patch)
tree26a557b5626c8703bd2717e51b54c06362462a24
parent57cf82af7cb9d53261d6a929a3d14a5ff83186fe (diff)
downloadandroid_packages_apps_Trebuchet-c321997e01a26712ca4e708c12a05cbec3b43d3e.zip
android_packages_apps_Trebuchet-c321997e01a26712ca4e708c12a05cbec3b43d3e.tar.gz
android_packages_apps_Trebuchet-c321997e01a26712ca4e708c12a05cbec3b43d3e.tar.bz2
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
-rw-r--r--src/com/android/launcher3/Launcher.java2
-rw-r--r--src/com/android/launcher3/Workspace.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2103c39..714c589 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 6ab3642..3fc6f63 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() {