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

Commit 3c8d5352 authored by Beth Thibodeau's avatar Beth Thibodeau
Browse files

Remove scene container code from MediaControlPanel

The scene container framework is using the new pipeline with
MediaControlViewBinder et al now, so this code is never used in practice

Flag: com.android.systemui.scene_container
Bug: 326408371
Test: use media controls with and without flag
Change-Id: I6e6d362e05c8efe5be2682d62e93a4c2b9f28f51
parent 79d3acbb
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;