Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d56ec1d4 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

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
parent c73cd407
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -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);