From c3efe1a530a2cfe672c5fefdb4086b092126ca94 Mon Sep 17 00:00:00 2001 From: SuperDragonXD <70206496+SuperDragonXD@users.noreply.github.com> Date: Tue, 6 Aug 2024 22:55:30 +0800 Subject: [PATCH] Hide voice search in drawer qsb on invalid intent This commit fixes an issue where the mic icon shows up when the search bar text has been changed, even with an invalid intent. --- lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt b/lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt index fb18fbb44f..1d7079d7e7 100644 --- a/lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt +++ b/lawnchair/src/app/lawnchair/allapps/AllAppsSearchInput.kt @@ -128,7 +128,7 @@ class AllAppsSearchInput(context: Context, attrs: AttributeSet?) : } addTextChangedListener { actionButton.isVisible = !it.isNullOrEmpty() - micIcon.isVisible = shouldShowIcons && it.isNullOrEmpty() + micIcon.isVisible = shouldShowIcons && voiceIntent != null && it.isNullOrEmpty() lensIcon.isVisible = shouldShowIcons && supportsLens && lensIntent != null && it.isNullOrEmpty() } }