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

Commit e26dac58 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix NavigationBarColorTest" into rvc-dev am: dd4a89ba am: 8c8fa358...

Merge "Fix NavigationBarColorTest" into rvc-dev am: dd4a89ba am: 8c8fa358 am: efc122a8 am: 5c8b08e2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12203677

Change-Id: I182d9fec40c39b4345e159c7aa2f17bdb859af75
parents 7f3b05a7 5c8b08e2
Loading
Loading
Loading
Loading
+0 −12
Original line number Original line Diff line number Diff line
@@ -3556,18 +3556,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                                == mRemoteInsetsControlTarget)) {
                                == mRemoteInsetsControlTarget)) {
            return mRemoteInsetsControlTarget;
            return mRemoteInsetsControlTarget;
        } else {
        } else {
            // Now, a special case -- if the last target's window is in the process of exiting, but
            // not removed, keep on the last target to avoid IME flicker.
            final WindowState cur = InsetsControlTarget.asWindowOrNull(mInputMethodControlTarget);
            if (cur != null && !cur.mRemoved && cur.isDisplayedLw() && cur.isClosing()
                    && !cur.isActivityTypeHome()) {
                if (DEBUG_INPUT_METHOD) {
                    Slog.v(TAG_WM, "Not changing control while current window"
                            + " is closing and not removed");
                }
                return cur;
            }
            // Otherwise, we just use the ime target as received from IME.
            return mInputMethodInputTarget;
            return mInputMethodInputTarget;
        }
        }
    }
    }
+0 −3
Original line number Original line Diff line number Diff line
@@ -2194,9 +2194,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (dc.mInputMethodInputTarget == this) {
        if (dc.mInputMethodInputTarget == this) {
            dc.setInputMethodInputTarget(null);
            dc.setInputMethodInputTarget(null);
        }
        }
        if (dc.mInputMethodControlTarget == this) {
            dc.updateImeControlTarget();
        }


        final int type = mAttrs.type;
        final int type = mAttrs.type;
        if (WindowManagerService.excludeWindowTypeFromTapOutTask(type)) {
        if (WindowManagerService.excludeWindowTypeFromTapOutTask(type)) {
+0 −20
Original line number Original line Diff line number Diff line
@@ -973,26 +973,6 @@ public class DisplayContentTests extends WindowTestsBase {
        assertEquals(dc.mInputMethodInputTarget, dc.computeImeControlTarget());
        assertEquals(dc.mInputMethodInputTarget, dc.computeImeControlTarget());
    }
    }


    @Test
    public void testComputeImeControlTarget_exitingApp() throws Exception {
        final DisplayContent dc = createNewDisplay();

        WindowState exitingWin = createWindow(null, TYPE_BASE_APPLICATION, "exiting app");
        makeWindowVisible(exitingWin);
        exitingWin.mWinAnimator.mDrawState = WindowStateAnimator.HAS_DRAWN;
        exitingWin.mAnimatingExit = true;

        dc.mInputMethodControlTarget = exitingWin;
        dc.mInputMethodTarget = dc.mInputMethodInputTarget =
                createWindow(null, TYPE_BASE_APPLICATION, "starting app");

        assertEquals(exitingWin, dc.computeImeControlTarget());

        exitingWin.removeImmediately();

        assertEquals(dc.mInputMethodInputTarget, dc.computeImeControlTarget());
    }

    @Test
    @Test
    public void testComputeImeControlTarget_splitscreen() throws Exception {
    public void testComputeImeControlTarget_splitscreen() throws Exception {
        final DisplayContent dc = createNewDisplay();
        final DisplayContent dc = createNewDisplay();