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

Commit 26bb088f authored by Beth Thibodeau's avatar Beth Thibodeau Committed by Android (Google) Code Review
Browse files

Merge "Update media target bounds after QS height changes" into main

parents d5797db4 373dda41
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -494,6 +494,10 @@ constructor(
        }
    }

    fun onQsHeightUpdated() {
        updateTargetState()
    }

    init {
        dumpManager.registerNormalDumpable(TAG, this)
        updateConfiguration()
+2 −15
Original line number Diff line number Diff line
@@ -95,8 +95,6 @@ constructor(

    /** A listener when the current dimensions of the player change */
    lateinit var sizeChangedListener: () -> Unit
    lateinit var configurationChangeListener: () -> Unit
    lateinit var recsConfigurationChangeListener: (MediaViewController, TransitionLayout) -> Unit
    var locationChangeListener: (Int) -> Unit = {}
    private var firstRefresh: Boolean = true
    @VisibleForTesting private var transitionLayout: TransitionLayout? = null
@@ -289,18 +287,7 @@ constructor(
                            )
                        )
                    }
                    if (SceneContainerFlag.isEnabled) {
                        if (
                            this@MediaViewController::recsConfigurationChangeListener.isInitialized
                        ) {
                            transitionLayout?.let {
                                recsConfigurationChangeListener.invoke(this@MediaViewController, it)
                            }
                        }
                    } else if (
                        this@MediaViewController::configurationChangeListener.isInitialized
                    ) {
                        configurationChangeListener.invoke()
                    if (!SceneContainerFlag.isEnabled) {
                        refreshState()
                    }
                }
@@ -996,7 +983,7 @@ constructor(
            // Let's squish the media player if our size was overridden
            result = squishViewState(result, state.squishFraction)
        }
        logger.logMediaSize("update to carousel", result.width, result.height)
        logger.logMediaSize("update to carousel (squish ${state?.squishFraction}", result.width, result.height)
        return result
    }

+1 −0
Original line number Diff line number Diff line
@@ -872,6 +872,7 @@ public class QuickSettingsControllerImpl implements QuickSettingsController, Dum
            mMaxExpansionHeight = mQs.getDesiredHeight();
            mNotificationStackScrollLayoutController.setMaxTopPadding(
                    getMaxExpansionHeight());
            mMediaHierarchyManager.onQsHeightUpdated();
        }
        return oldMaxHeight;
    }