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

Commit 656e9864 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fix non-dismissible resumption players.

Ensure resumption players created when a non-dismissible notification is cancelled
force the 'isClearable' flag to true. This fixes a bug where a resumption player is
non-dismissable.

Test: manual - Finish episode in Pocket Casts, attempt long-press dismiss.
Bug: 169271494
Change-Id: I186f9ee6fc228ad5bd1d49970fb44709783b74dc
parent a85a66e6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -641,7 +641,8 @@ class MediaDataManager(
            // Move to resume key (aka package name) if that key doesn't already exist.
            val resumeAction = getResumeMediaAction(removed.resumeAction!!)
            val updated = removed.copy(token = null, actions = listOf(resumeAction),
                    actionsToShowInCompact = listOf(0), active = false, resumption = true)
                    actionsToShowInCompact = listOf(0), active = false, resumption = true,
                    isClearable = true)
            val pkg = removed.packageName
            val migrate = mediaEntries.put(pkg, updated) == null
            // Notify listeners of "new" controls when migrating or removed and update when not