package io.flutter.plugins.webviewflutter; import android.os.Handler; import android.os.IBinder; import android.view.View; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; /* loaded from: classes6.dex */ final class ThreadedInputConnectionProxyAdapterView extends View { private InputConnection cachedConnection; final View containerView; final Handler imeHandler; private boolean isLocked; final View rootView; final View targetView; private boolean triggerDelayed; final IBinder windowToken; @Override // android.view.View public final boolean checkInputConnectionProxy(View view) { return true; } @Override // android.view.View public final boolean hasWindowFocus() { return true; } @Override // android.view.View public final boolean isFocused() { return true; } @Override // android.view.View public final boolean onCheckIsTextEditor() { return true; } /* JADX INFO: Access modifiers changed from: package-private */ public ThreadedInputConnectionProxyAdapterView(View view, View view2, Handler handler) { super(view.getContext()); this.triggerDelayed = true; this.isLocked = false; this.imeHandler = handler; this.containerView = view; this.targetView = view2; this.windowToken = view.getWindowToken(); this.rootView = view.getRootView(); setFocusable(true); setFocusableInTouchMode(true); setVisibility(0); } @Override // android.view.View public final InputConnection onCreateInputConnection(EditorInfo editorInfo) { this.triggerDelayed = false; InputConnection onCreateInputConnection = this.isLocked ? this.cachedConnection : this.targetView.onCreateInputConnection(editorInfo); this.triggerDelayed = true; this.cachedConnection = onCreateInputConnection; return onCreateInputConnection; } /* JADX INFO: Access modifiers changed from: package-private */ public final void setLocked(boolean z) { this.isLocked = z; } final boolean isTriggerDelayed() { return this.triggerDelayed; } @Override // android.view.View public final IBinder getWindowToken() { return this.windowToken; } @Override // android.view.View public final View getRootView() { return this.rootView; } @Override // android.view.View public final Handler getHandler() { return this.imeHandler; } }