diff options
| author | 2023-08-03 18:22:01 +0000 | |
|---|---|---|
| committer | 2023-08-03 18:22:01 +0000 | |
| commit | 0cfa63f8347c853dda2f6ce27566fd0db019f435 (patch) | |
| tree | 1c2fcacf803da1984704416f79aa0bc3c8156bde | |
| parent | 01e94383242f9d54c73afe17b30b7d92376d9f3e (diff) | |
| parent | 3446a6be97a92a486b47c5ad204b972d2749cc85 (diff) | |
Merge "Allow remote input to send intent from background" into udc-dev am: 890f17187f am: 3446a6be97
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24284580
Change-Id: I30dff12656bc8504c845b3a2e76460009a4ef9ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt index 22b4c9d81d25..736b14574da0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.policy +import android.app.ActivityOptions import android.app.Notification import android.app.PendingIntent import android.app.RemoteInput @@ -275,7 +276,10 @@ class RemoteInputViewControllerImpl @Inject constructor( entry.sbn.instanceId) try { - pendingIntent.send(view.context, 0, intent) + val options = ActivityOptions.makeBasic() + options.setPendingIntentBackgroundActivityStartMode( + ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED) + pendingIntent.send(view.context, 0, intent, null, null, null, options.toBundle()) } catch (e: PendingIntent.CanceledException) { Log.i(TAG, "Unable to send remote input result", e) uiEventLogger.logWithInstanceId( |