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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user