Merge "Skip preflight RECORD_AUDIO in RecognitionService if FD provided" into tm-dev am: 39e65acd0a am: ee4e20c576

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18298904

Change-Id: I8e5a0d15fa232ca704c06f57e466a0956a1d81ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Nate Myren
2022-05-14 02:54:41 +00:00
committed by Automerger Merge Worker

View File

@@ -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 = "