mic exception fix

This commit is contained in:
Yuriy Liskov
2025-01-27 02:09:20 +02:00
parent 7448abc430
commit a5f3541eff

View File

@ -751,7 +751,13 @@ public class SearchBar extends RelativeLayout {
});
mListening = true;
mSpeechRecognizer.startListening(recognizerIntent);
try {
mSpeechRecognizer.startListening(recognizerIntent);
} catch (SecurityException e) {
// MOD: Swallow the exception
// Not allowed to bind to service Intent { act=android.speech.RecognitionService cmp=com.touchtype.swiftkey/com.swiftkey.microsoftspeechservice.MicrosoftSpeechRecognitionService }
e.printStackTrace();
}
}
void updateUi(boolean hasFocus) {