forked from upstream-mirrors/quik
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:
@@ -275,6 +275,9 @@
|
|||||||
<intent>
|
<intent>
|
||||||
<action android:name="android.intent.action.TTS_SERVICE" />
|
<action android:name="android.intent.action.TTS_SERVICE" />
|
||||||
</intent>
|
</intent>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.speech.RecognitionService" />
|
||||||
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -566,11 +566,12 @@ class ComposeActivity : QkThemedActivity(), ComposeView {
|
|||||||
if (state.scheduling)
|
if (state.scheduling)
|
||||||
scheduleAction.onNext(true)
|
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
|
speechToTextFrame.isVisible = true
|
||||||
|
|
||||||
var xPercent = prefs.showSttOffsetX.get()
|
val xPercent = prefs.showSttOffsetX.get()
|
||||||
var yPercent = prefs.showSttOffsetY.get()
|
val yPercent = prefs.showSttOffsetY.get()
|
||||||
|
|
||||||
// if the stt icon has a custom position, move it
|
// if the stt icon has a custom position, move it
|
||||||
if ((xPercent != Float.MAX_VALUE) && (yPercent != Float.MAX_VALUE)) {
|
if ((xPercent != Float.MAX_VALUE) && (yPercent != Float.MAX_VALUE)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user