Merge "Remeasure entire carousel view when players change" into sc-v2-dev am: 64186143f6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16287048

Change-Id: Icdc60021a8bcd2c7a7a44b326ceb9183c4c51732
This commit is contained in:
Beth Thibodeau
2021-11-23 16:36:33 +00:00
committed by Automerger Merge Worker

View File

@@ -400,7 +400,7 @@ class MediaCarouselController @Inject constructor(
} }
updatePageIndicator() updatePageIndicator()
mediaCarouselScrollHandler.onPlayersChanged() mediaCarouselScrollHandler.onPlayersChanged()
mediaCarousel.requiresRemeasuring = true mediaFrame.requiresRemeasuring = true
// Check postcondition: mediaContent should have the same number of children as there are // Check postcondition: mediaContent should have the same number of children as there are
// elements in mediaPlayers. // elements in mediaPlayers.
if (MediaPlayerData.players().size != mediaContent.childCount) { if (MediaPlayerData.players().size != mediaContent.childCount) {
@@ -439,7 +439,7 @@ class MediaCarouselController @Inject constructor(
updatePlayerToState(newRecs, noAnimation = true) updatePlayerToState(newRecs, noAnimation = true)
reorderAllPlayers(curVisibleMediaKey) reorderAllPlayers(curVisibleMediaKey)
updatePageIndicator() updatePageIndicator()
mediaCarousel.requiresRemeasuring = true mediaFrame.requiresRemeasuring = true
// Check postcondition: mediaContent should have the same number of children as there are // Check postcondition: mediaContent should have the same number of children as there are
// elements in mediaPlayers. // elements in mediaPlayers.
if (MediaPlayerData.players().size != mediaContent.childCount) { if (MediaPlayerData.players().size != mediaContent.childCount) {