diff options
author | Chong Zhang <chz@google.com> | 2015-08-28 19:57:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-28 19:57:57 +0000 |
commit | 482635e34d0def1682ebc644db0636862994f649 (patch) | |
tree | 1dec6eb08f6e939ad1edfc5c7be0a3f72418a05b /services/core | |
parent | 71f1579190ee3658db15f55a4e5571f03ce431b6 (diff) | |
parent | 5aaa0b3880403dce0fd221a6f85bc62fd33c4e90 (diff) | |
download | frameworks_base-482635e34d0def1682ebc644db0636862994f649.zip frameworks_base-482635e34d0def1682ebc644db0636862994f649.tar.gz frameworks_base-482635e34d0def1682ebc644db0636862994f649.tar.bz2 |
Merge "Fix deadlock when updating rotation" into mnc-dr-dev
Diffstat (limited to 'services/core')
-rw-r--r-- | services/core/java/com/android/server/policy/PhoneWindowManager.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index 0423aa3..d7c9c02 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -762,6 +762,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { } class MyOrientationListener extends WindowOrientationListener { + private final Runnable mUpdateRotationRunnable = new Runnable() { + @Override + public void run() { + updateRotation(false); + } + }; + MyOrientationListener(Context context, Handler handler) { super(context, handler); } @@ -769,7 +776,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void onProposedRotationChanged(int rotation) { if (localLOGV) Slog.v(TAG, "onProposedRotationChanged, rotation=" + rotation); - updateRotation(false); + mHandler.post(mUpdateRotationRunnable); } } MyOrientationListener mOrientationListener; |