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

Commit b1549341 authored by Winson Chung's avatar Winson Chung
Browse files

Fix z-order issue with text cursors and PiP.

- When an activity is in PiP, its windows are top most and always
  computed incorrectly as the IME target. As a result, the popup
  windows for the cursors don't find the right parent and are not
  promoted to be above the IME.

Bug: 63546389
Test: Enter PiP, open app with bottom anchored input, and select
      some text.  Ensure that the cursors are top-most.
Test: go/wm-smoke

Change-Id: I1267504e10544b0a075bbf73e41e001d07a5f74c
parent b544b81b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1970,6 +1970,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            return false;
        }

        final boolean windowsAreFocusable = mAppToken != null && mAppToken.windowsAreFocusable();
        if (!windowsAreFocusable) {
            // This window can't be an IME target if the app's windows should not be focusable.
            return false;
        }

        final int fl = mAttrs.flags & (FLAG_NOT_FOCUSABLE | FLAG_ALT_FOCUSABLE_IM);
        final int type = mAttrs.type;