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

Commit 842ae36d authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Only hide ime leash for invisible ime control target" into main

parents 46e4ea5f e423d38a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1554,11 +1554,14 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
        // but InsetsStateController#notifyControlTargetChanged still waits for IME to redraw.
        final InsetsSourceProvider sourceProvider = imeWindow.getControllableInsetProvider();
        if (sourceProvider == null || sourceProvider.mControl == null
                || !sourceProvider.isClientVisible()
                || imeTarget == sourceProvider.getControlTarget()) {
            return;
        }
        final SurfaceControl imeInsetsLeash = sourceProvider.mControl.getLeash();
        if (imeInsetsLeash != null) {
        final InsetsControlTarget controlTarget = sourceProvider.getControlTarget();
        if (imeInsetsLeash != null && controlTarget != null && controlTarget.getWindow() != null
                && !controlTarget.getWindow().mToken.isVisible()) {
            dc.getSyncTransaction().reparent(imeInsetsLeash, null);
        }
    }