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>
This commit is contained in:
@@ -21,6 +21,7 @@ import android.annotation.IntDef;
|
|||||||
import android.annotation.IntRange;
|
import android.annotation.IntRange;
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
|
import android.app.ActivityOptions;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.app.RemoteAction;
|
import android.app.RemoteAction;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -301,7 +302,8 @@ public final class TextClassification implements Parcelable {
|
|||||||
Objects.requireNonNull(intent);
|
Objects.requireNonNull(intent);
|
||||||
return v -> {
|
return v -> {
|
||||||
try {
|
try {
|
||||||
intent.send();
|
intent.send(ActivityOptions.makeBasic().setPendingIntentBackgroundActivityStartMode(
|
||||||
|
ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED).toBundle());
|
||||||
} catch (PendingIntent.CanceledException e) {
|
} catch (PendingIntent.CanceledException e) {
|
||||||
Log.e(LOG_TAG, "Error sending PendingIntent", e);
|
Log.e(LOG_TAG, "Error sending PendingIntent", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user