Fix inverted vertical offset of entering rotated PiP

In rotated coordinates, the vertical and horizontal are
different directions. Otherwise the end of animation
doesn't match the destination position.

Bug: 175836469
Test: setSourceRectHint with non-zero left.
Change-Id: Ia5e282c0a1bab9cbf77e964b4a4bc8ea4514cfb9
This commit is contained in:
Riddle Hsu
2021-06-09 04:30:15 +08:00
parent 5a59138240
commit 616537d0e2

View File

@@ -149,10 +149,10 @@ public class PipSurfaceTransactionHelper {
// Shrink bounds (expand insets) in destination orientation.
if (clockwise) {
positionX -= insets.top * scale;
positionY -= insets.left * scale;
positionY += insets.left * scale;
} else {
positionX += insets.top * scale;
positionY += insets.left * scale;
positionY -= insets.left * scale;
}
}
mTmpTransform.setScale(scale, scale);