summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Bird <sbird@cyngn.com>2015-07-07 18:37:40 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-07-16 15:26:48 -0700
commita433e1da44fdc487cef01c5136e9ce8029eaff2f (patch)
tree3c4eae3de328f9f8c05ddbcb6c7fbf7ffdf448cf
parent0b93e24e66ff267e304e8977f7dde966cc9ec95b (diff)
downloadandroid_packages_apps_Trebuchet-a433e1da44fdc487cef01c5136e9ce8029eaff2f.tar.gz
android_packages_apps_Trebuchet-a433e1da44fdc487cef01c5136e9ce8029eaff2f.tar.bz2
android_packages_apps_Trebuchet-a433e1da44fdc487cef01c5136e9ce8029eaff2f.zip
Trebuchet: fix voice button proxy
Change-Id: I1f7243063fa0596f5f9cb3b40c4cee63545d04e3
-rw-r--r--src/com/android/launcher3/Launcher.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 5331f04a4..5ae3a30d7 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -359,6 +359,8 @@ public class Launcher extends Activity
private boolean mHasFocus = false;
private boolean mAttached = false;
+ private boolean mShouldShowVoice = false;
+
private static LocaleConfiguration sLocaleConfiguration = null;
private static HashMap<Long, FolderInfo> sFolders = new HashMap<Long, FolderInfo>();
@@ -4705,6 +4707,7 @@ public class Launcher extends Activity
if (voiceButtonContainer != null) voiceButtonContainer.setVisibility(View.GONE);
if (searchButton != null) searchButton.setVisibility(View.GONE);
if (voiceButton != null) voiceButton.setVisibility(View.GONE);
+ mShouldShowVoice = false;
updateVoiceButtonProxyVisible(true);
return false;
}
@@ -4756,10 +4759,12 @@ public class Launcher extends Activity
voiceButton.setVisibility(View.VISIBLE);
updateVoiceButtonProxyVisible(false);
invalidatePressedFocusedStates(voiceButtonContainer, voiceButton);
+ mShouldShowVoice = true;
return true;
} else {
if (voiceButtonContainer != null) voiceButtonContainer.setVisibility(View.GONE);
if (voiceButton != null) voiceButton.setVisibility(View.GONE);
+ mShouldShowVoice = false;
updateVoiceButtonProxyVisible(true);
return false;
}
@@ -4776,7 +4781,7 @@ public class Launcher extends Activity
final View voiceButtonProxy = findViewById(R.id.voice_button_proxy);
if (voiceButtonProxy != null) {
boolean visible = !forceDisableVoiceButtonProxy &&
- mWorkspace.shouldVoiceButtonProxyBeVisible();
+ mWorkspace.shouldVoiceButtonProxyBeVisible() && mShouldShowVoice;
voiceButtonProxy.setVisibility(visible ? View.VISIBLE : View.GONE);
voiceButtonProxy.bringToFront();
}