Skip to content

Commit

Permalink
refactor(android): Use lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Jun 7, 2024
1 parent 19f98d1 commit cc09214
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,11 @@ public void load() {
bridge
.getWebView()
.post(
new Runnable() {
@Override
public void run() {
speechRecognizer = SpeechRecognizer.createSpeechRecognizer(bridge.getActivity());
SpeechRecognitionListener listener = new SpeechRecognitionListener();
speechRecognizer.setRecognitionListener(listener);
Logger.info(getLogTag(), "Instantiated SpeechRecognizer in load()");
}
() -> {
speechRecognizer = SpeechRecognizer.createSpeechRecognizer(bridge.getActivity());
SpeechRecognitionListener listener = new SpeechRecognitionListener();
speechRecognizer.setRecognitionListener(listener);
Logger.info(getLogTag(), "Instantiated SpeechRecognizer in load()");
}
);
}
Expand Down

0 comments on commit cc09214

Please sign in to comment.