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

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

Merge "Refresh state when updating seekbar visibility" into main

parents 502ef2bf b950a185
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -435,6 +435,12 @@ public class MediaControlPanel {
        }
        this.mIsSeekBarEnabled = isSeekBarEnabled;
        updateSeekBarVisibility();
        mMainExecutor.execute(() -> {
            if (!mMetadataAnimationHandler.isRunning()) {
                // Trigger a state refresh so that we immediately update visibilities.
                mMediaViewController.refreshState();
            }
        });
    }

    /**
+11 −1
Original line number Diff line number Diff line
@@ -225,6 +225,12 @@ constructor(
                if (isSeekBarEnabled == enabled) return
                isSeekBarEnabled = enabled
                MediaControlViewBinder.updateSeekBarVisibility(expandedLayout, isSeekBarEnabled)
                mainExecutor.execute {
                    if (!metadataAnimationHandler.isRunning) {
                        // Trigger a state refresh so that we immediately update visibilities.
                        refreshState()
                    }
                }
            }
        }

@@ -899,7 +905,11 @@ constructor(
            // If the view isn't bound, we can drop the animation, otherwise we'll execute it
            animateNextStateChange = false
            if (transitionLayout == null) {
                logger.logMediaLocation("setCurrentState: view not bound", startLocation, endLocation)
                logger.logMediaLocation(
                    "setCurrentState: view not bound",
                    startLocation,
                    endLocation,
                )
                return
            }