Fix surfaceInset adjustment.
surfaceInsets are relative and have the same sign direction for left/top/right/bottom. This means we want to subtract the left/top insets and add the right/bottom in order to expand the surface. The current code is adding the left/right insets before adding them to the right, while still subtracting from the left. This ends up expanding the surface by 3*inset pixels instead of 2*inset pixels. Bug: 28368990 Change-Id: I6495e39283c7d2494c962f89e95672c5f1f6e1cd
This commit is contained in:
@@ -820,8 +820,8 @@ class WindowStateAnimator {
|
||||
// Adjust for surface insets.
|
||||
mTmpSize.left -= scale * attrs.surfaceInsets.left;
|
||||
mTmpSize.top -= scale * attrs.surfaceInsets.top;
|
||||
mTmpSize.right += scale * (attrs.surfaceInsets.left + attrs.surfaceInsets.right);
|
||||
mTmpSize.bottom += scale * (attrs.surfaceInsets.top + attrs.surfaceInsets.bottom);
|
||||
mTmpSize.right += scale * attrs.surfaceInsets.right;
|
||||
mTmpSize.bottom += scale * attrs.surfaceInsets.bottom;
|
||||
}
|
||||
|
||||
boolean hasSurface() {
|
||||
|
||||
Reference in New Issue
Block a user