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

Commit fea2d5b4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove scene container code from MediaControlPanel" into main

parents 30c37da0 3c8d5352
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -545,6 +545,7 @@ public class MediaControlPanel {

    /** Bind this player view based on the data given. */
    public void bindPlayer(@NonNull MediaData data, String key) {
        SceneContainerFlag.assertInLegacyMode();
        if (mMediaViewHolder == null) {
            return;
        }
@@ -638,11 +639,8 @@ public class MediaControlPanel {
        // to something which might impact the measurement
        // State refresh interferes with the translation animation, only run it if it's not running.
        if (!mMetadataAnimationHandler.isRunning()) {
            // Don't refresh in scene framework, because it will calculate with invalid layout sizes
            if (!SceneContainerFlag.isEnabled()) {
            mMediaViewController.refreshState();
        }
        }

        if (shouldPlayTurbulenceNoise()) {
            // Need to create the config here to get the correct view size and color.
@@ -907,11 +905,6 @@ public class MediaControlPanel {
        // Capture width & height from views in foreground for artwork scaling in background
        int width = mMediaViewHolder.getAlbumView().getMeasuredWidth();
        int height = mMediaViewHolder.getAlbumView().getMeasuredHeight();
        if (SceneContainerFlag.isEnabled() && (width <= 0 || height <= 0)) {
            // TODO(b/312714128): ensure we have a valid size before setting background
            width = mMediaViewController.getWidthInSceneContainerPx();
            height = mMediaViewController.getHeightInSceneContainerPx();
        }

        final int finalWidth = width;
        final int finalHeight = height;