Merge "speech: Null-check service connection before usage" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
671d962a8a
@@ -812,7 +812,7 @@ public class SpeechRecognizer {
|
|||||||
Intent recognizerIntent,
|
Intent recognizerIntent,
|
||||||
Executor callbackExecutor,
|
Executor callbackExecutor,
|
||||||
RecognitionSupportCallback recognitionSupportCallback) {
|
RecognitionSupportCallback recognitionSupportCallback) {
|
||||||
if (!maybeInitializeManagerService()) {
|
if (!maybeInitializeManagerService() || !checkOpenConnection()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@@ -831,7 +831,7 @@ public class SpeechRecognizer {
|
|||||||
Intent recognizerIntent,
|
Intent recognizerIntent,
|
||||||
@Nullable Executor callbackExecutor,
|
@Nullable Executor callbackExecutor,
|
||||||
@Nullable ModelDownloadListener modelDownloadListener) {
|
@Nullable ModelDownloadListener modelDownloadListener) {
|
||||||
if (!maybeInitializeManagerService()) {
|
if (!maybeInitializeManagerService() || !checkOpenConnection()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user