Merge "Allow remote input to send intent from background" into udc-dev am: 890f17187f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24284580 Change-Id: I62de9cd3a8a77688fbd3b02a58296c5255729fe3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package com.android.systemui.statusbar.policy
|
package com.android.systemui.statusbar.policy
|
||||||
|
|
||||||
|
import android.app.ActivityOptions
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
import android.app.PendingIntent
|
import android.app.PendingIntent
|
||||||
import android.app.RemoteInput
|
import android.app.RemoteInput
|
||||||
@@ -275,7 +276,10 @@ class RemoteInputViewControllerImpl @Inject constructor(
|
|||||||
entry.sbn.instanceId)
|
entry.sbn.instanceId)
|
||||||
|
|
||||||
try {
|
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) {
|
} catch (e: PendingIntent.CanceledException) {
|
||||||
Log.i(TAG, "Unable to send remote input result", e)
|
Log.i(TAG, "Unable to send remote input result", e)
|
||||||
uiEventLogger.logWithInstanceId(
|
uiEventLogger.logWithInstanceId(
|
||||||
|
|||||||
Reference in New Issue
Block a user