From d56ec1d44479cac0820c6afe9aaa689fc47c431d Mon Sep 17 00:00:00 2001 From: Seigo Nonaka Date: Wed, 17 Jun 2015 16:04:43 +0900 Subject: Fix IME window flickering during rotation. This was introduced by Ifd15736b163ab, performLayoutAndPlaceSurfacesLocked is called even if computeNewConfigurationLocked() returns non-null object. This is simply by mistake and now computeNewConfigurationLocked never returns null. The only case we need to care is that mDisplayReady is false, but there is nothing to do with that state. Thus simply removes if segments from computeNewConfiguration. Bug: 20823978 Change-Id: I527dfeddffb8d928d578f8d60d64f98557aa3dcb --- .../com/android/server/wm/WindowManagerService.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'services/core/java') diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 1b63ca0..ace5997 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -7139,20 +7139,14 @@ public class WindowManagerService extends IWindowManager.Stub public Configuration computeNewConfiguration() { synchronized (mWindowMap) { - if (!mDisplayReady) { - return null; - } - Configuration config = computeNewConfigurationLocked(); - if (mWaitingForConfig) { - mWaitingForConfig = false; - mLastFinishedFreezeSource = "new-config"; - performLayoutAndPlaceSurfacesLocked(); - } - return config; + return computeNewConfigurationLocked(); } } - Configuration computeNewConfigurationLocked() { + private Configuration computeNewConfigurationLocked() { + if (!mDisplayReady) { + return null; + } Configuration config = new Configuration(); config.fontScale = 0; computeScreenConfigurationLocked(config); @@ -9678,7 +9672,7 @@ public class WindowManagerService extends IWindowManager.Stub /** * Extracted from {@link #performLayoutAndPlaceSurfacesLockedInner} to reduce size of method. - * @param w WindowState this method is applied to. + * @param w WindowState this method is applied to. * @param innerDw Width of app window. * @param innerDh Height of app window. */ -- cgit v1.1