diff options
| -rw-r--r-- | core/java/android/speech/RecognitionService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/speech/RecognitionService.java b/core/java/android/speech/RecognitionService.java index 6a65efb891ca..6b59f5480e04 100644 --- a/core/java/android/speech/RecognitionService.java +++ b/core/java/android/speech/RecognitionService.java @@ -129,8 +129,9 @@ public abstract class RecognitionService extends Service { @NonNull AttributionSource attributionSource) { try { if (mCurrentCallback == null) { - boolean preflightPermissionCheckPassed = checkPermissionForPreflightNotHardDenied( - attributionSource); + boolean preflightPermissionCheckPassed = + intent.hasExtra(RecognizerIntent.EXTRA_AUDIO_SOURCE) + || checkPermissionForPreflightNotHardDenied(attributionSource); if (preflightPermissionCheckPassed) { if (DBG) { Log.d(TAG, "created new mCurrentCallback, listener = " |