Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt +2 −11 Original line number Diff line number Diff line Loading @@ -1053,18 +1053,9 @@ constructor( rootOverlay!!.add(mediaFrame) } else { val targetHost = getHost(newLocation)!!.hostView // When adding back to the host, let's make sure to reset the bounds. // Usually adding the view will trigger a layout that does this automatically, // but we sometimes suppress this. // This will either do a full layout pass and remeasure, or it will bypass // that and directly set the mediaFrame's bounds within the premeasured host. targetHost.addView(mediaFrame) val left = targetHost.paddingLeft val top = targetHost.paddingTop mediaFrame.setLeftTopRightBottom( left, top, left + currentBounds.width(), top + currentBounds.height() ) if (mediaFrame.childCount > 0) { val child = mediaFrame.getChildAt(0) Loading packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaViewController.kt +3 −1 Original line number Diff line number Diff line Loading @@ -420,7 +420,9 @@ constructor( */ fun getMeasurementsForState(hostState: MediaHostState): MeasurementOutput? = traceSection("MediaViewController#getMeasurementsForState") { val viewState = obtainViewState(hostState) ?: return null // measurements should never factor in the squish fraction val viewState = obtainViewState(hostState.copy().also { it.squishFraction = 1.0f }) ?: return null measurement.measuredWidth = viewState.width measurement.measuredHeight = viewState.height return measurement Loading Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt +2 −11 Original line number Diff line number Diff line Loading @@ -1053,18 +1053,9 @@ constructor( rootOverlay!!.add(mediaFrame) } else { val targetHost = getHost(newLocation)!!.hostView // When adding back to the host, let's make sure to reset the bounds. // Usually adding the view will trigger a layout that does this automatically, // but we sometimes suppress this. // This will either do a full layout pass and remeasure, or it will bypass // that and directly set the mediaFrame's bounds within the premeasured host. targetHost.addView(mediaFrame) val left = targetHost.paddingLeft val top = targetHost.paddingTop mediaFrame.setLeftTopRightBottom( left, top, left + currentBounds.width(), top + currentBounds.height() ) if (mediaFrame.childCount > 0) { val child = mediaFrame.getChildAt(0) Loading
packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaViewController.kt +3 −1 Original line number Diff line number Diff line Loading @@ -420,7 +420,9 @@ constructor( */ fun getMeasurementsForState(hostState: MediaHostState): MeasurementOutput? = traceSection("MediaViewController#getMeasurementsForState") { val viewState = obtainViewState(hostState) ?: return null // measurements should never factor in the squish fraction val viewState = obtainViewState(hostState.copy().also { it.squishFraction = 1.0f }) ?: return null measurement.measuredWidth = viewState.width measurement.measuredHeight = viewState.height return measurement Loading