- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
49 lines
2.3 KiB
Java
49 lines
2.3 KiB
Java
package androidx.webkit.internal;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.webkit.JavaScriptReplyProxy;
|
|
import java.lang.reflect.InvocationHandler;
|
|
import java.util.Objects;
|
|
import java.util.concurrent.Callable;
|
|
import org.chromium.support_lib_boundary.JsReplyProxyBoundaryInterface;
|
|
import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class JavaScriptReplyProxyImpl extends JavaScriptReplyProxy {
|
|
private JsReplyProxyBoundaryInterface mBoundaryInterface;
|
|
|
|
public JavaScriptReplyProxyImpl(@NonNull JsReplyProxyBoundaryInterface jsReplyProxyBoundaryInterface) {
|
|
this.mBoundaryInterface = jsReplyProxyBoundaryInterface;
|
|
}
|
|
|
|
@NonNull
|
|
public static JavaScriptReplyProxyImpl forInvocationHandler(@NonNull InvocationHandler invocationHandler) {
|
|
final JsReplyProxyBoundaryInterface jsReplyProxyBoundaryInterface = (JsReplyProxyBoundaryInterface) BoundaryInterfaceReflectionUtil.castToSuppLibClass(JsReplyProxyBoundaryInterface.class, invocationHandler);
|
|
return (JavaScriptReplyProxyImpl) jsReplyProxyBoundaryInterface.getOrCreatePeer(new Callable<Object>() { // from class: androidx.webkit.internal.JavaScriptReplyProxyImpl.1
|
|
@Override // java.util.concurrent.Callable
|
|
public Object call() {
|
|
return new JavaScriptReplyProxyImpl(JsReplyProxyBoundaryInterface.this);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // androidx.webkit.JavaScriptReplyProxy
|
|
public void postMessage(@NonNull String str) {
|
|
if (WebViewFeatureInternal.WEB_MESSAGE_LISTENER.isSupportedByWebView()) {
|
|
this.mBoundaryInterface.postMessage(str);
|
|
return;
|
|
}
|
|
throw WebViewFeatureInternal.getUnsupportedOperationException();
|
|
}
|
|
|
|
@Override // androidx.webkit.JavaScriptReplyProxy
|
|
public void postMessage(@NonNull byte[] bArr) {
|
|
Objects.requireNonNull(bArr, "ArrayBuffer must be non-null");
|
|
if (WebViewFeatureInternal.WEB_MESSAGE_ARRAY_BUFFER.isSupportedByWebView()) {
|
|
this.mBoundaryInterface.postMessageWithPayload(BoundaryInterfaceReflectionUtil.createInvocationHandlerFor(new WebMessagePayloadAdapter(bArr)));
|
|
return;
|
|
}
|
|
throw WebViewFeatureInternal.getUnsupportedOperationException();
|
|
}
|
|
}
|