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

Commit 62b8b428 authored by Cosmin Băieș's avatar Cosmin Băieș
Browse files

Remove explicit IME layering target set to null

This was added in [1] to avoid an NPE due to an extra condition added in
[2] to maintain the IME layering target if it had the IME shown and the
new proposed target is launcher home (or recents).

This extra condition was removed in [3]. With the recent change to
no longer defer updating the IME layering target, this will be correctly
updated to a different window, when the current one is being removed.

  [1]: I7ff42b0e6ef5b68f37f81fe9a396bdc7e045c6ea
  [2]: Ib898bc2e3a5b063fe9eaf8b07d022231dd1326a3
  [3]: Ia6722e1cbccd7adc8aed1828265f6fa4df78df63

Flag: EXEMPT cleanup
Bug: 399622420
Test: atest DisplayContentTests#testComputeImeTarget_shouldNotCheckOutdatedImeTargetLayerWhenRemoved
Change-Id: Ic422ae1711b3b350f05ded77d6f741ba73cf0ebd
parent a885f5e4
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2213,9 +2213,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (isImeLayeringTarget()) {
            // Remove the attached IME screenshot.
            dc.removeImeScreenshotByTarget(this);
            // Set mImeLayeringTarget as null when the removed window is the IME layering target,
            // in case computeImeLayeringTarget may use the outdated target.
            dc.setImeLayeringTarget(null /* target */);
            dc.computeImeLayeringTarget(true /* update */);
        }
        if (dc.getImeInputTarget() == this && !inRelaunchingActivity()) {