Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0eb8d2fe authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Only dismiss media notification on user interaction

Calling NotifCollection.dismissNotification causes the deleteIntent for
the notification to be sent. This API is used to tell when the
notification has been explicitly dismissed by the user, so we shouldn't
trigger it when the media control is removed automatically by the system.

Currently, the system only dismisses the notification automatically when
the media session is destroyed, or when the notification is already removed
by other means such as when pausing the app.

User-initated dismissal can happen via the long press menu, or by
swiping away paused media when the resumption setting is off.

Bug: 335875159
Bug: 339904764
Test: atest com.android.systemui.media.controls
Test: manual with test app: verify intent is sent when dismissing via long press
      and is not sent when destroying the session
Test: manual, as above with media_controls_refactor flag enabled
Test: manual, turn off resumption, verify intent is sent after swiping
      away paused media
Flag: aconfig com.android.systemui.media_controls_user_initiated_dismiss DEVELOPMENT

Change-Id: I49e9b8e5c84383fc3bb2633ec39b71a8f2b9bdb6
parent 34086990
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment