From 01e958792b6ffe7dce044a5f80ee23ade96be99c Mon Sep 17 00:00:00 2001 From: Beth Thibodeau Date: Thu, 3 Feb 2022 17:26:44 -0500 Subject: [PATCH] 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 --- .../src/com/android/systemui/media/MediaDataManager.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt b/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt index 0223c60424998..240ca3678765a 100644 --- a/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt +++ b/packages/SystemUI/src/com/android/systemui/media/MediaDataManager.kt @@ -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