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

Commit 82a0c461 authored by Chris Tate's avatar Chris Tate Committed by The Android Open Source Project
Browse files

Automated import from //branches/master/...@142785,142785

parent b8088b9b
Loading
Loading
Loading
Loading
+11 −4
Original line number Original line Diff line number Diff line
@@ -8551,6 +8551,15 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo


    private void startFreezingDisplayLocked() {
    private void startFreezingDisplayLocked() {
        if (mDisplayFrozen) {
        if (mDisplayFrozen) {
            // Freezing the display also suspends key event delivery, to
            // keep events from going astray while the display is reconfigured.
            // If someone has changed orientation again while the screen is
            // still frozen, the events will continue to be blocked while the
            // successive orientation change is processed.  To prevent spurious
            // ANRs, we reset the event dispatch timeout in this case.
            synchronized (mKeyWaiter) {
                mKeyWaiter.mWasFrozen = true;
            }
            return;
            return;
        }
        }
        
        
@@ -8594,10 +8603,8 @@ public class WindowManagerService extends IWindowManager.Stub implements Watchdo
        }
        }
        Surface.unfreezeDisplay(0);
        Surface.unfreezeDisplay(0);
        
        
        // Freezing the display also suspends key event delivery, to
        // Reset the key delivery timeout on unfreeze, too.  We force a wakeup here
        // keep events from going astray while the display is reconfigured.
        // too because regular key delivery processing should resume immediately.
        // Now that we're back, notify the key waiter that we're alive
        // again and it should restart its timeouts.
        synchronized (mKeyWaiter) {
        synchronized (mKeyWaiter) {
            mKeyWaiter.mWasFrozen = true;
            mKeyWaiter.mWasFrozen = true;
            mKeyWaiter.notifyAll();
            mKeyWaiter.notifyAll();