diff --git a/policy/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/com/android/internal/policy/impl/PhoneWindowManager.java index bf0f81518c115..cc0588d9dda9b 100644 --- a/policy/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/com/android/internal/policy/impl/PhoneWindowManager.java @@ -245,6 +245,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void update() { ContentResolver resolver = mContext.getContentResolver(); + boolean updateRotation = false; synchronized (mLock) { mEndcallBehavior = Settings.System.getInt(resolver, Settings.System.END_BUTTON_BEHAVIOR, DEFAULT_ENDCALL_BEHAVIOR); @@ -261,9 +262,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { boolean hasSoftInput = imId != null && imId.length() > 0; if (mHasSoftInput != hasSoftInput) { mHasSoftInput = hasSoftInput; - updateRotation(0); + updateRotation = true; } } + if (updateRotation) { + updateRotation(0); + } } }