Skip to content
Commit 150072f4 authored by Ben Lin's avatar Ben Lin
Browse files

PiP: Update menu state AFTER animation is done for show/hide/resize.

When hiding the menu, there is a brief moment where the menu hide
animation is running, but the menu is already set as hidden in
mMenuState. In that case, other menu operations, such as resizing it,
would no-op, since it assumes the menu is not visible to the user
anymore. We will update the menu at end of the animation so that before
the animation finishes, we will respect that the menu is still in its
previous state. This will break apart the callback into two parts -
onMenuStateChanging, and onMenuStateChangeFinish.

Additionally, PipAnimationController used to only control animating the
PiP leash, but not the menu. This CL also adds a handler callback to
allow menu controller to apply the transaction.

Bug: 185513811
Bug: 186424689
Test: Tap once (show menu), pinch resize - menu resizes & fade along
with the resize
Test: Resize to smallest size, tap once (so that it grows bigger), and
then tap outside region - see that the menu no longer lags behind on
fading out.

Change-Id: I4432961aff074f4569d5d6d61b0e917511e2cbad
parent 964a1715
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment