summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java9
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;