28 lines
1.1 KiB
Java
28 lines
1.1 KiB
Java
|
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);
|
||
|
}
|
||
|
}
|
||
|
}
|