what-the-bank/sources/io/flutter/plugins/webviewflutter/JavaScriptChannelFlutterApi...

28 lines
1.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package io.flutter.plugins.webviewflutter;
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugins.webviewflutter.GeneratedAndroidWebView;
/* loaded from: classes6.dex */
public class JavaScriptChannelFlutterApiImpl extends GeneratedAndroidWebView.JavaScriptChannelFlutterApi {
private final InstanceManager instanceManager;
public JavaScriptChannelFlutterApiImpl(BinaryMessenger binaryMessenger, InstanceManager instanceManager) {
super(binaryMessenger);
this.instanceManager = instanceManager;
}
public void postMessage(JavaScriptChannel javaScriptChannel, String str, GeneratedAndroidWebView.JavaScriptChannelFlutterApi.Reply<Void> reply) {
super.postMessage(this.instanceManager.getInstanceId(javaScriptChannel), str, reply);
}
public void dispose(JavaScriptChannel javaScriptChannel, GeneratedAndroidWebView.JavaScriptChannelFlutterApi.Reply<Void> reply) {
Long removeInstance = this.instanceManager.removeInstance(javaScriptChannel);
if (removeInstance != null) {
dispose(removeInstance, reply);
} else {
reply.reply(null);
}
}
}