OSDN Git Service

Use the correct parent size to initialize animations
authortiger_huang <tiger_huang@htc.com>
Mon, 27 Apr 2015 12:36:46 +0000 (20:36 +0800)
committerTiger Huang <tiger_huang@htc.com>
Fri, 8 May 2015 13:08:47 +0000 (13:08 +0000)
commit5b36c49aea35f418276becdbdf3d733ee11fd976
treef80240b2b8efba9747338b381a93f67ce26b83c1
parente8101c047cffc69245493d96f2f2ec36728682f1
Use the correct parent size to initialize animations

The original logic would use out-of-date parent sizes to initialize
animations. If the screen size is changed after assigning mAnimDw and
mAnimDh in the constructor of WindowStateAnimator, the fromDeltaY
(in the most cases) of TranslateAnimation would be initialized
incorrectly.

In this change, we always use up-to-date parent sizes to initialize
animations to prevent the issue.

https://code.google.com/p/android/issues/detail?id=170348

Change-Id: Ib9c609121228934bdb463263feb1924eb389c1d2
services/core/java/com/android/server/wm/WindowManagerService.java
services/core/java/com/android/server/wm/WindowStateAnimator.java