Merge "Allow BAL for Autofill" into udc-dev am: ab9ab096e6

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

Change-Id: Ifbca8417cfce376160eafab8e510d17a9da95fe0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Achim Thesmann
2023-05-08 23:52:57 +00:00
committed by Automerger Merge Worker

View File

@@ -19,6 +19,7 @@ package android.view.autofill;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.app.Activity; import android.app.Activity;
import android.app.ActivityOptions;
import android.app.Application; import android.app.Application;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Intent; import android.content.Intent;
@@ -486,8 +487,11 @@ public final class AutofillClientController implements AutofillManager.AutofillC
public void autofillClientAuthenticate(int authenticationId, IntentSender intent, public void autofillClientAuthenticate(int authenticationId, IntentSender intent,
Intent fillInIntent, boolean authenticateInline) { Intent fillInIntent, boolean authenticateInline) {
try { try {
ActivityOptions activityOptions = ActivityOptions.makeBasic()
.setPendingIntentBackgroundActivityStartMode(
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED);
mActivity.startIntentSenderForResult(intent, AUTO_FILL_AUTH_WHO_PREFIX, mActivity.startIntentSenderForResult(intent, AUTO_FILL_AUTH_WHO_PREFIX,
authenticationId, fillInIntent, 0, 0, null); authenticationId, fillInIntent, 0, 0, activityOptions.toBundle());
} catch (IntentSender.SendIntentException e) { } catch (IntentSender.SendIntentException e) {
Log.e(TAG, "authenticate() failed for intent:" + intent, e); Log.e(TAG, "authenticate() failed for intent:" + intent, e);
} }