alexandroid/decompiled/jadx/sources/androidx/webkit/internal/JavaScriptReplyProxyImpl.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

46 lines
2.4 KiB
Java

package androidx.webkit.internal;
import androidx.webkit.JavaScriptReplyProxy;
import java.lang.reflect.InvocationHandler;
import java.util.Objects;
import org.apache.commons.lang3.Functions$$ExternalSyntheticLambda19;
import org.chromium.support_lib_boundary.JsReplyProxyBoundaryInterface;
import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes14.dex */
public class JavaScriptReplyProxyImpl extends JavaScriptReplyProxy {
private final JsReplyProxyBoundaryInterface mBoundaryInterface;
public JavaScriptReplyProxyImpl(JsReplyProxyBoundaryInterface jsReplyProxyBoundaryInterface) {
this.mBoundaryInterface = jsReplyProxyBoundaryInterface;
}
public static JavaScriptReplyProxyImpl forInvocationHandler(InvocationHandler invocationHandler) {
JsReplyProxyBoundaryInterface jsReplyProxyBoundaryInterface = (JsReplyProxyBoundaryInterface) BoundaryInterfaceReflectionUtil.castToSuppLibClass(JsReplyProxyBoundaryInterface.class, invocationHandler);
return (JavaScriptReplyProxyImpl) jsReplyProxyBoundaryInterface.getOrCreatePeer(new Functions$$ExternalSyntheticLambda19(jsReplyProxyBoundaryInterface, 1));
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ Object lambda$forInvocationHandler$0(JsReplyProxyBoundaryInterface jsReplyProxyBoundaryInterface) throws Exception {
return new JavaScriptReplyProxyImpl(jsReplyProxyBoundaryInterface);
}
@Override // androidx.webkit.JavaScriptReplyProxy
public void postMessage(byte[] bArr) {
Objects.requireNonNull(bArr, "ArrayBuffer must be non-null");
if (!WebViewFeatureInternal.WEB_MESSAGE_ARRAY_BUFFER.isSupportedByWebView()) {
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
this.mBoundaryInterface.postMessageWithPayload(BoundaryInterfaceReflectionUtil.createInvocationHandlerFor(new WebMessagePayloadAdapter(bArr)));
}
@Override // androidx.webkit.JavaScriptReplyProxy
public void postMessage(String str) {
if (WebViewFeatureInternal.WEB_MESSAGE_LISTENER.isSupportedByWebView()) {
this.mBoundaryInterface.postMessage(str);
return;
}
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
}