Loading packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt +1 −0 Original line number Diff line number Diff line Loading @@ -948,6 +948,7 @@ internal object MediaPlayerData { .thenByDescending { shouldPrioritizeSs == it.isSsMediaRec } .thenByDescending { !it.data.resumption } .thenByDescending { it.data.playbackLocation != MediaData.PLAYBACK_CAST_REMOTE } .thenByDescending { it.data.lastActive } .thenByDescending { it.updateTime } .thenByDescending { it.data.notificationKey } Loading packages/SystemUI/tests/src/com/android/systemui/media/MediaCarouselControllerTest.kt +10 −1 Original line number Diff line number Diff line Loading @@ -139,6 +139,15 @@ class MediaCarouselControllerTest : SysuiTestCase() { playbackLocation = MediaData.PLAYBACK_LOCAL, resumption = true), 1000L) val activeMoreRecent = Triple("active more recent", DATA.copy(active = false, isPlaying = false, playbackLocation = MediaData.PLAYBACK_LOCAL, resumption = true, lastActive = 2L), 1000L) val activeLessRecent = Triple("active less recent", DATA.copy(active = false, isPlaying = false, playbackLocation = MediaData.PLAYBACK_LOCAL, resumption = true, lastActive = 1L), 1000L) // Expected ordering for media players: // Actively playing local sessions // Actively playing cast sessions Loading Loading
packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt +1 −0 Original line number Diff line number Diff line Loading @@ -948,6 +948,7 @@ internal object MediaPlayerData { .thenByDescending { shouldPrioritizeSs == it.isSsMediaRec } .thenByDescending { !it.data.resumption } .thenByDescending { it.data.playbackLocation != MediaData.PLAYBACK_CAST_REMOTE } .thenByDescending { it.data.lastActive } .thenByDescending { it.updateTime } .thenByDescending { it.data.notificationKey } Loading
packages/SystemUI/tests/src/com/android/systemui/media/MediaCarouselControllerTest.kt +10 −1 Original line number Diff line number Diff line Loading @@ -139,6 +139,15 @@ class MediaCarouselControllerTest : SysuiTestCase() { playbackLocation = MediaData.PLAYBACK_LOCAL, resumption = true), 1000L) val activeMoreRecent = Triple("active more recent", DATA.copy(active = false, isPlaying = false, playbackLocation = MediaData.PLAYBACK_LOCAL, resumption = true, lastActive = 2L), 1000L) val activeLessRecent = Triple("active less recent", DATA.copy(active = false, isPlaying = false, playbackLocation = MediaData.PLAYBACK_LOCAL, resumption = true, lastActive = 1L), 1000L) // Expected ordering for media players: // Actively playing local sessions // Actively playing cast sessions Loading