added missing manifest query intent for SpeechRecognizer.isRecognitionAvailable() call

made stt button only become visible if stt service is available regardless of settings value
This commit is contained in:
gavine99
2025-04-01 10:42:46 +11:00
parent d2074c13d3
commit aad5d2fedc
2 changed files with 7 additions and 3 deletions
@@ -275,6 +275,9 @@
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
<intent>
<action android:name="android.speech.RecognitionService" />
</intent>
</queries>
</manifest>
@@ -566,11 +566,12 @@ class ComposeActivity : QkThemedActivity(), ComposeView {
if (state.scheduling)
scheduleAction.onNext(true)
if (prefs.showStt.get()) {
// if stt is available and preference is set to show stt button
if (isSpeechRecognitionAvailable() && prefs.showStt.get()) {
speechToTextFrame.isVisible = true
var xPercent = prefs.showSttOffsetX.get()
var yPercent = prefs.showSttOffsetY.get()
val xPercent = prefs.showSttOffsetX.get()
val yPercent = prefs.showSttOffsetY.get()
// if the stt icon has a custom position, move it
if ((xPercent != Float.MAX_VALUE) && (yPercent != Float.MAX_VALUE)) {