Refactoring: deduplicate surface bounds calculation.

This merges code from WindowStateAnimator.setSurfaceBoundariesLocked and
WindowStateAnimator.createSurfaceLocked. We calculate the final surface
size and position in both of these methods in very similar way. The
minor differences seem like small mistakes that aren't visible, because
they happen during surface creation and get fixed very soon after when
the boundaries are set.

Change-Id: I321cb17831888f97619b0cae73fdaf9cbbc762fb
1 file changed