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

Commit 4873666f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Media - Don't clear unless active flag is false"

parents 1dae14ec 24993c6e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ class MediaCarouselController @Inject constructor(
        mediaManager.addListener(object : MediaDataManager.Listener {
            override fun onMediaDataLoaded(key: String, oldKey: String?, data: MediaData) {
                addOrUpdatePlayer(key, oldKey, data)
                val canRemove = data.isPlaying?.let { !it } ?: data.isClearable
                val canRemove = data.isPlaying?.let { !it } ?: data.isClearable && !data.active
                if (canRemove && !Utils.useMediaResumption(context)) {
                    // This view isn't playing, let's remove this! This happens e.g when
                    // dismissing/timing out a view. We still have the data around because