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

Commit 4eef94f2 authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Fixed issue with background user window consuming touch events

When adding a window for a background user, it is possible for
the window to consume touch events because it is in the
COMMIT_DRAW_PENDING state. We allow the background user window
to transition READY_TO_SHOW state, but hide the window.

Change is based on https://android-review.googlesource.com/#/c/158772
and also reverts commits 6ee61850
and 588932a5

Bug: 22531717
Bug: 22207948
Bug: 18510914
https://code.google.com/p/android-developer-preview/issues/detail?id=2667

Change-Id: I68d2e532c2b1def0d7b22c9b60e48110cf3cd686
parent e6b407b4
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -10015,7 +10015,7 @@ public class WindowManagerService extends IWindowManager.Stub
                    w.mContentChanged = false;

                    // Moved from updateWindowsAndWallpaperLocked().
                    if (w.mHasSurface && !w.isHiddenFromUserLocked()) {
                    if (w.mHasSurface) {
                        // Take care of the window being ready to display.
                        final boolean committed =
                                winAnimator.commitFinishDrawingLocked();
@@ -10048,10 +10048,7 @@ public class WindowManagerService extends IWindowManager.Stub
                        }

                        winAnimator.setSurfaceBoundariesLocked(recoveringMemory);
                    }

                    // Check the draw state of the window, but only if it is visible to the user.
                    if (!w.isHiddenFromUserLocked()) {
                        final AppWindowToken atoken = w.mAppToken;
                        if (DEBUG_STARTING_WINDOW && atoken != null
                                && w == atoken.startingWindow) {
+2 −0
Original line number Diff line number Diff line
@@ -1667,6 +1667,8 @@ class WindowStateAnimator {
    // This must be called while inside a transaction.
    boolean performShowLocked() {
        if (mWin.isHiddenFromUserLocked()) {
            if (DEBUG_VISIBILITY) Slog.w(TAG, "hiding " + mWin + ", belonging to " + mWin.mOwnerUid);
            mWin.hideLw(false);
            return false;
        }
        if (DEBUG_VISIBILITY || (DEBUG_STARTING_WINDOW &&