Skip to content

Commit

Permalink
mic exception fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliskov committed Jan 27, 2025
1 parent 7448abc commit a5f3541
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,13 @@ public void onEvent(int i, Bundle bundle) {
});

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) {
Expand Down

0 comments on commit a5f3541

Please sign in to comment.