Merge "speech: Null-check service connection before usage" into udc-dev am: 671d962a8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23296601 Change-Id: I2a80a97c39995b5f971c015a6a5bb384cd9db00f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
committed by
Automerger Merge Worker
commit
a0ada72916
@@ -812,7 +812,7 @@ public class SpeechRecognizer {
|
||||
Intent recognizerIntent,
|
||||
Executor callbackExecutor,
|
||||
RecognitionSupportCallback recognitionSupportCallback) {
|
||||
if (!maybeInitializeManagerService()) {
|
||||
if (!maybeInitializeManagerService() || !checkOpenConnection()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -831,7 +831,7 @@ public class SpeechRecognizer {
|
||||
Intent recognizerIntent,
|
||||
@Nullable Executor callbackExecutor,
|
||||
@Nullable ModelDownloadListener modelDownloadListener) {
|
||||
if (!maybeInitializeManagerService()) {
|
||||
if (!maybeInitializeManagerService() || !checkOpenConnection()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user