PiP: Consider stash state when calculating snap fraction.
If the PiP is stashed and something causes it to move (such as, screen rotation or unexpand animations after timeout), we calculate its current snap fraction, get the new bounds and movement bounds, and re-apply the snap fraction. However during the snap fraction calculation, it assumes that PiP bounds is within the movement bounds, which is not true when PiP is stashed. So take this into consideration when doing the math. This also changes the stashed status to reflect more than just yes/no - but rather NONE/LEFT/RIGHT. Bug: 165793553 Test: Stash PIP while menu is showing, and wait for timeout Test: Stash PIP, rotate the device, see that snap fraction is persisted Change-Id: Ib4eda44b7f280362b52609e4092dd4231ac8f04c
Loading
Please register or sign in to comment