Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerLogger.kt +3 −2 Original line number Diff line number Diff line Loading @@ -90,15 +90,16 @@ constructor(@MediaCarouselControllerLog private val buffer: LogBuffer) { fun logCarouselVisible() = buffer.log(TAG, LogLevel.DEBUG, {}, { "showing carousel" }) fun logMediaHostVisibility(location: Int, visible: Boolean) { fun logMediaHostVisibility(location: Int, visible: Boolean, oldState: Boolean) { buffer.log( TAG, LogLevel.DEBUG, { int1 = location bool1 = visible bool2 = oldState }, { "media host visibility changed location=$location, visible:$visible" }, { "media host visibility changed location=$location, visible:$visible, was:$oldState" }, ) } } Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt +6 −3 Original line number Diff line number Diff line Loading @@ -1129,10 +1129,11 @@ constructor( traceSection("MediaHierarchyManager#updateHostAttachment") { if (SceneContainerFlag.isEnabled) { // No need to manage transition states - just update the desired location directly logger.logMediaHostAttachment(desiredLocation) val host = getHost(desiredLocation) logger.logMediaHostAttachment(desiredLocation, host?.visible) mediaCarouselController.onDesiredLocationChanged( desiredLocation = desiredLocation, desiredHostState = getHost(desiredLocation), desiredHostState = host, animate = false, ) return Loading Loading @@ -1169,7 +1170,8 @@ constructor( // that and directly set the mediaFrame's bounds within the premeasured host. targetHost.addView(mediaFrame) } logger.logMediaHostAttachment(currentAttachmentLocation) val host = getHost(currentAttachmentLocation) logger.logMediaHostAttachment(currentAttachmentLocation, host?.visible) if (isCrossFadeAnimatorRunning) { // When cross-fading with an animation, we only notify the media carousel of the // location change, once the view is reattached to the new place and not Loading Loading @@ -1313,6 +1315,7 @@ constructor( isHomeScreenShadeVisibleToUser() || isGlanceableHubVisibleToUser() val mediaVisible = qsExpanded || hasActiveMediaOrRecommendation logger.logUserVisibilityChange(shadeVisible, mediaVisible) mediaCarouselController.mediaCarouselScrollHandler.visibleToUser = shadeVisible && mediaVisible } Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaViewLogger.kt +24 −4 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ class MediaViewLogger @Inject constructor(@MediaViewLog private val buffer: LogB int1 = width int2 = height }, { "size ($str1): $int1 x $int2" } { "size ($str1): $int1 x $int2" }, ) } Loading @@ -49,11 +49,31 @@ class MediaViewLogger @Inject constructor(@MediaViewLog private val buffer: LogB int1 = startLocation int2 = endLocation }, { "location ($str1): $int1 -> $int2" } { "location ($str1): $int1 -> $int2" }, ) } fun logMediaHostAttachment(host: Int) { buffer.log(TAG, LogLevel.DEBUG, { int1 = host }, { "Host (updateHostAttachment): $int1" }) fun logMediaHostAttachment(host: Int, visible: Boolean?) { buffer.log( TAG, LogLevel.DEBUG, { int1 = host str1 = visible.toString() }, { "Host (updateHostAttachment): $int1 visible $str1" }, ) } fun logUserVisibilityChange(shadeVisible: Boolean, mediaVisible: Boolean) { buffer.log( TAG, LogLevel.DEBUG, { bool1 = shadeVisible bool2 = mediaVisible }, { "User visibility shade: $shadeVisible media: $mediaVisible" }, ) } } packages/SystemUI/src/com/android/systemui/media/controls/ui/view/MediaHost.kt +3 −2 Original line number Diff line number Diff line Loading @@ -208,6 +208,7 @@ class MediaHost( * the visibility has changed */ fun updateViewVisibility() { val oldState = state.visible state.visible = if (mediaCarouselController.isLockedAndHidden()) { false Loading @@ -217,9 +218,9 @@ class MediaHost( mediaDataManager.hasAnyMediaOrRecommendation() } val newVisibility = if (visible) View.VISIBLE else View.GONE if (newVisibility != hostView.visibility) { if (oldState != state.visible || newVisibility != hostView.visibility) { hostView.visibility = newVisibility debugLogger.logMediaHostVisibility(location, visible) debugLogger.logMediaHostVisibility(location, visible, oldState) visibleChangedListeners.forEach { it.invoke(visible) } } } Loading Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaCarouselControllerLogger.kt +3 −2 Original line number Diff line number Diff line Loading @@ -90,15 +90,16 @@ constructor(@MediaCarouselControllerLog private val buffer: LogBuffer) { fun logCarouselVisible() = buffer.log(TAG, LogLevel.DEBUG, {}, { "showing carousel" }) fun logMediaHostVisibility(location: Int, visible: Boolean) { fun logMediaHostVisibility(location: Int, visible: Boolean, oldState: Boolean) { buffer.log( TAG, LogLevel.DEBUG, { int1 = location bool1 = visible bool2 = oldState }, { "media host visibility changed location=$location, visible:$visible" }, { "media host visibility changed location=$location, visible:$visible, was:$oldState" }, ) } } Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManager.kt +6 −3 Original line number Diff line number Diff line Loading @@ -1129,10 +1129,11 @@ constructor( traceSection("MediaHierarchyManager#updateHostAttachment") { if (SceneContainerFlag.isEnabled) { // No need to manage transition states - just update the desired location directly logger.logMediaHostAttachment(desiredLocation) val host = getHost(desiredLocation) logger.logMediaHostAttachment(desiredLocation, host?.visible) mediaCarouselController.onDesiredLocationChanged( desiredLocation = desiredLocation, desiredHostState = getHost(desiredLocation), desiredHostState = host, animate = false, ) return Loading Loading @@ -1169,7 +1170,8 @@ constructor( // that and directly set the mediaFrame's bounds within the premeasured host. targetHost.addView(mediaFrame) } logger.logMediaHostAttachment(currentAttachmentLocation) val host = getHost(currentAttachmentLocation) logger.logMediaHostAttachment(currentAttachmentLocation, host?.visible) if (isCrossFadeAnimatorRunning) { // When cross-fading with an animation, we only notify the media carousel of the // location change, once the view is reattached to the new place and not Loading Loading @@ -1313,6 +1315,7 @@ constructor( isHomeScreenShadeVisibleToUser() || isGlanceableHubVisibleToUser() val mediaVisible = qsExpanded || hasActiveMediaOrRecommendation logger.logUserVisibilityChange(shadeVisible, mediaVisible) mediaCarouselController.mediaCarouselScrollHandler.visibleToUser = shadeVisible && mediaVisible } Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/controller/MediaViewLogger.kt +24 −4 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ class MediaViewLogger @Inject constructor(@MediaViewLog private val buffer: LogB int1 = width int2 = height }, { "size ($str1): $int1 x $int2" } { "size ($str1): $int1 x $int2" }, ) } Loading @@ -49,11 +49,31 @@ class MediaViewLogger @Inject constructor(@MediaViewLog private val buffer: LogB int1 = startLocation int2 = endLocation }, { "location ($str1): $int1 -> $int2" } { "location ($str1): $int1 -> $int2" }, ) } fun logMediaHostAttachment(host: Int) { buffer.log(TAG, LogLevel.DEBUG, { int1 = host }, { "Host (updateHostAttachment): $int1" }) fun logMediaHostAttachment(host: Int, visible: Boolean?) { buffer.log( TAG, LogLevel.DEBUG, { int1 = host str1 = visible.toString() }, { "Host (updateHostAttachment): $int1 visible $str1" }, ) } fun logUserVisibilityChange(shadeVisible: Boolean, mediaVisible: Boolean) { buffer.log( TAG, LogLevel.DEBUG, { bool1 = shadeVisible bool2 = mediaVisible }, { "User visibility shade: $shadeVisible media: $mediaVisible" }, ) } }
packages/SystemUI/src/com/android/systemui/media/controls/ui/view/MediaHost.kt +3 −2 Original line number Diff line number Diff line Loading @@ -208,6 +208,7 @@ class MediaHost( * the visibility has changed */ fun updateViewVisibility() { val oldState = state.visible state.visible = if (mediaCarouselController.isLockedAndHidden()) { false Loading @@ -217,9 +218,9 @@ class MediaHost( mediaDataManager.hasAnyMediaOrRecommendation() } val newVisibility = if (visible) View.VISIBLE else View.GONE if (newVisibility != hostView.visibility) { if (oldState != state.visible || newVisibility != hostView.visibility) { hostView.visibility = newVisibility debugLogger.logMediaHostVisibility(location, visible) debugLogger.logMediaHostVisibility(location, visible, oldState) visibleChangedListeners.forEach { it.invoke(visible) } } } Loading