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

Commit a987d43b authored by Craig Mautner's avatar Craig Mautner
Browse files

Check for apps closing and restore mExiting test.

Removal of the mExiting test in a previous CL was a mistake leading
to z-order errors. In particular the auto complete dialog was on top
of the IME and was being dismissed due to touches on the IME.

Restoring mExiting alone missed cases where apps were exiting which
don't set mExiting. Adding a test for membership in mClosingApps
fixes that.

Bug: 7327220 fixed.
Change-Id: I3965b8a07080d1347bdada51ffeafe6ef2e32c8e
parent 0a75ed08
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1213,6 +1213,7 @@ public class WindowManagerService extends IWindowManager.Stub
        final WindowState curTarget = mInputMethodTarget;
        if (curTarget != null && w != null
                && curTarget.isDisplayedLw()
                && curTarget.isClosing()
                && (curTarget.mWinAnimator.mAnimLayer > w.mWinAnimator.mAnimLayer)) {
            if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Current target higher, not changing");
            return windows.indexOf(curTarget) + 1;
+5 −1
Original line number Diff line number Diff line
@@ -1024,6 +1024,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        return mClient.asBinder().isBinderAlive();
    }

    boolean isClosing() {
        return mExiting || (mService.mClosingApps.contains(mAppToken));
    }

    @Override
    public boolean isDefaultDisplay() {
        return mDisplayContent.isDefaultDisplay;
@@ -1234,7 +1238,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
            mWasPaused = mToken.paused;
            mStringNameCache = "Window{" + Integer.toHexString(System.identityHashCode(this))
                    + " u" + UserHandle.getUserId(mSession.mUid)
                    + " " + mLastTitle + (mWasPaused ? " PAUSED}" : "}");
                    + " " + mLastTitle + (mExiting ? " EXITING}" : "}");
        }
        return mStringNameCache;
    }