Merge "Skip preflight RECORD_AUDIO in RecognitionService if FD provided" into tm-dev

This commit is contained in:
Nate Myren
2022-05-14 01:42:26 +00:00
committed by Android (Google) Code Review

View File

@@ -129,8 +129,9 @@ public abstract class RecognitionService extends Service {
@NonNull AttributionSource attributionSource) { @NonNull AttributionSource attributionSource) {
try { try {
if (mCurrentCallback == null) { if (mCurrentCallback == null) {
boolean preflightPermissionCheckPassed = checkPermissionForPreflightNotHardDenied( boolean preflightPermissionCheckPassed =
attributionSource); intent.hasExtra(RecognizerIntent.EXTRA_AUDIO_SOURCE)
|| checkPermissionForPreflightNotHardDenied(attributionSource);
if (preflightPermissionCheckPassed) { if (preflightPermissionCheckPassed) {
if (DBG) { if (DBG) {
Log.d(TAG, "created new mCurrentCallback, listener = " Log.d(TAG, "created new mCurrentCallback, listener = "