OSDN Git Service

Fix deadlock when updating rotation
authorChong Zhang <chz@google.com>
Fri, 28 Aug 2015 17:22:36 +0000 (10:22 -0700)
committerChong Zhang <chz@google.com>
Fri, 28 Aug 2015 17:29:07 +0000 (10:29 -0700)
commit5aaa0b3880403dce0fd221a6f85bc62fd33c4e90
tree7924355984d59eef119c5541ee362c1f5bdccdb8
parent26b555d42ce2cf78d42ebcc9806447bf83df9318
Fix deadlock when updating rotation

Post a runnable in MyOrientationListener.onProposedRotationChanged for
the updateRotation() so that it doesn't acquire WM lock while holding
WindowOrientationListener lock. It could cause deadlock if WM is
is performing a relayout and try to access WindowOrientationListener.

bug: 23507268
Change-Id: I5775f5a13cae0283fef64877801bf8a39dfc90a4
services/core/java/com/android/server/policy/PhoneWindowManager.java