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

Commit c92080bd authored by Selim Gurun's avatar Selim Gurun
Browse files

Update the documentation for onCreateInputConnection

Update the documentation to clarify that WebView calls methods of the
InputConnection on a separate thread than the UI thread. This is,
in some sense, similar to shouldInterceptRequest. The methods
that override InputConnection methods should be careful about thread
restrictions and concurrency when calling other methods or accessing
shared members.

Test: Document update. Verified manually.
Change-Id: Ida76cd5dcc683092c05947c3044d848d0a249547
parent 0b277279
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2566,6 +2566,13 @@ public class WebView extends AbsoluteLayout
        mProvider.getViewDelegate().onConfigurationChanged(newConfig);
    }

    /**
     * Creates a new InputConnection for an InputMethod to interact with the WebView.
     * This is similar to {@link View#onCreateInputConnection} but note that WebView
     * calls InputConnection methods on a thread other than the UI thread.
     * If these methods are overridden, then the overriding methods should respect
     * thread restrictions when calling View methods or accessing data.
     */
    @Override
    public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
        return mProvider.getViewDelegate().onCreateInputConnection(outAttrs);