diff options
| author | 2023-06-02 17:06:33 +0000 | |
|---|---|---|
| committer | 2023-06-02 17:06:33 +0000 | |
| commit | b05728d1166f1e9af60c80ea84e5489fb1ba8b64 (patch) | |
| tree | 4016e4d5b5a199a389e9943e59ea75880d71c82f | |
| parent | eae29d6ed88016867a91b2d5e15e861552c2d8a8 (diff) | |
| parent | 2043d64d1ab1765154bc4ebad1b0802e56e3d24f (diff) | |
Merge "Opt in to allow BAL" into udc-dev am: 2043d64d1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23485897
Change-Id: I89c9833538f0d08875815c19ccfa12a739db43be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | core/java/android/view/textclassifier/TextClassification.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/view/textclassifier/TextClassification.java b/core/java/android/view/textclassifier/TextClassification.java index 8b04d35734ec..63bf5622fbb8 100644 --- a/core/java/android/view/textclassifier/TextClassification.java +++ b/core/java/android/view/textclassifier/TextClassification.java @@ -21,6 +21,7 @@ import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; +import android.app.ActivityOptions; import android.app.PendingIntent; import android.app.RemoteAction; import android.content.Context; @@ -301,7 +302,8 @@ public final class TextClassification implements Parcelable { Objects.requireNonNull(intent); return v -> { try { - intent.send(); + intent.send(ActivityOptions.makeBasic().setPendingIntentBackgroundActivityStartMode( + ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED).toBundle()); } catch (PendingIntent.CanceledException e) { Log.e(LOG_TAG, "Error sending PendingIntent", e); } |