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

Commit 7dfcb018 authored by Craig Mautner's avatar Craig Mautner
Browse files

Increase window freeze timeout for bigger screens.

More pixels take longer. Timeout was occurring before Status and
Navigation Bars were finished drawing causing them to animate in
during rotations.

Bug 7307718 fixed.

Change-Id: Iccf27b6172d0c9831690cc2fcf93027a40b705d8
parent f1b246dd
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -264,6 +264,9 @@ public class WindowManagerService extends IWindowManager.Stub
     */
    static final int DEFAULT_FADE_IN_OUT_DURATION = 400;

    /** Amount of time (in milliseconds) to delay before declaring a window freeze timeout. */
    static final int WINDOW_FREEZE_TIMEOUT_DURATION = 3000;

    /**
     * If true, the window manager will do its own custom freezing and general
     * management of the screen during rotation.
@@ -6021,7 +6024,8 @@ public class WindowManagerService extends IWindowManager.Stub

        mWindowsFreezingScreen = true;
        mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
        mH.sendMessageDelayed(mH.obtainMessage(H.WINDOW_FREEZE_TIMEOUT), 2000);
        mH.sendMessageDelayed(mH.obtainMessage(H.WINDOW_FREEZE_TIMEOUT),
                WINDOW_FREEZE_TIMEOUT_DURATION);
        mWaitingForConfig = true;
        getDefaultDisplayContentLocked().layoutNeeded = true;
        startFreezingDisplayLocked(inTransaction, 0, 0);
@@ -8383,7 +8387,7 @@ public class WindowManagerService extends IWindowManager.Stub
                // when we first froze the display.
                mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
                mH.sendMessageDelayed(mH.obtainMessage(
                        H.WINDOW_FREEZE_TIMEOUT), 2000);
                        H.WINDOW_FREEZE_TIMEOUT), WINDOW_FREEZE_TIMEOUT_DURATION);
            }
        }
    }