diff options
author | Stephen Bird <sbird@cyngn.com> | 2015-07-07 18:37:40 -0700 |
---|---|---|
committer | Stephen Bird <sbird@cyngn.com> | 2015-07-16 15:42:30 -0700 |
commit | 004115fe4b3abbf27115ebbde18473353b405407 (patch) | |
tree | cc9fcfc2e7028b0696aee9689c649884a29c84f4 | |
parent | 34831388dcfcec739487ebe4eea8b31976c40757 (diff) | |
download | android_packages_apps_Trebuchet-004115fe4b3abbf27115ebbde18473353b405407.tar.gz android_packages_apps_Trebuchet-004115fe4b3abbf27115ebbde18473353b405407.tar.bz2 android_packages_apps_Trebuchet-004115fe4b3abbf27115ebbde18473353b405407.zip |
Trebuchet: fix voice button proxy
Change-Id: I1f7243063fa0596f5f9cb3b40c4cee63545d04e3
(cherry picked from commit a433e1da44fdc487cef01c5136e9ce8029eaff2f)
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 40199fdd5..eef52060a 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -346,6 +346,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>(); @@ -4552,6 +4554,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; } @@ -4601,10 +4604,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; } @@ -4621,7 +4626,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(); } |