Dismiss shade and keyguard for media buttons that launch an activity

It's possible for a media notification to include a button that opens an
app - like regular notifications, we should dismiss keyguard/shade so
the user sees the activity that was launched.

Bug: 209683600
Test: manual - verify dismissed in both locked and unlocked state

Change-Id: Ibfc232dea69457b9d21c6a2dfec708b8c9f39866
This commit is contained in:
Beth Thibodeau
2022-02-03 17:26:44 -05:00
parent 22fa32e34f
commit 01e958792b

View File

@@ -657,7 +657,10 @@ class MediaDataManager(
}
val runnable = if (action.actionIntent != null) {
Runnable {
if (action.isAuthenticationRequired()) {
if (action.actionIntent.isActivity) {
activityStarter.startPendingIntentDismissingKeyguard(
action.actionIntent)
} else if (action.isAuthenticationRequired()) {
activityStarter.dismissKeyguardThenExecute({
var result = sendPendingIntent(action.actionIntent)
result