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

Commit 86ae8e5c authored by Justin Ghan's avatar Justin Ghan Committed by Automerger Merge Worker
Browse files

Merge "Call onInputConnectionClosed synchronously" into udc-dev am: cfa7611d

parents 09f74c19 cfa7611d
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -405,20 +405,14 @@ final class RemoteInputConnectionImpl extends IRemoteInputConnection.Stub {
                    }
                    if (handler.getLooper().isCurrentThread()) {
                        servedView.onInputConnectionClosedInternal();
                        final ViewRootImpl viewRoot = servedView.getViewRootImpl();
                        if (viewRoot != null) {
                            viewRoot.getHandwritingInitiator().onInputConnectionClosed(servedView);
                        }
                    } else {
                        handler.post(servedView::onInputConnectionClosedInternal);
                        handler.post(() -> {
                            final ViewRootImpl viewRoot = servedView.getViewRootImpl();
                            if (viewRoot != null) {
                                viewRoot.getHandwritingInitiator()
                                        .onInputConnectionClosed(servedView);
                    }
                        });
                }

                final ViewRootImpl viewRoot = servedView.getViewRootImpl();
                if (viewRoot != null) {
                    viewRoot.getHandwritingInitiator().onInputConnectionClosed(servedView);
                }
            }
        });