RNCWebViewManager$e$b.smali
.class public final Lcom/reactnativecommunity/webview/RNCWebViewManager$e$b;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/reactnativecommunity/webview/RNCWebViewManager$e;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "b"
.end annotation
# instance fields
.field public a:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;
# direct methods
.method public constructor <init>(Lcom/reactnativecommunity/webview/RNCWebViewManager$e;)V
.registers 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lcom/reactnativecommunity/webview/RNCWebViewManager$e$b;->a:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;
return-void
.end method
# virtual methods
.method public postMessage(Ljava/lang/String;)V
.registers 5
.annotation runtime Landroid/webkit/JavascriptInterface;
.end annotation
.line 1
iget-object v0, p0, Lcom/reactnativecommunity/webview/RNCWebViewManager$e$b;->a:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;
.line 2
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v1
check-cast v1, Lcom/facebook/react/bridge/ReactContext;
.line 3
iget-object v1, v0, Lcom/reactnativecommunity/webview/RNCWebViewManager$e;->e:Lcom/reactnativecommunity/webview/RNCWebViewManager$f;
if-eqz v1, :cond_15
.line 4
new-instance v1, Lcom/reactnativecommunity/webview/a;
invoke-direct {v1, v0, v0, p1, v0}, Lcom/reactnativecommunity/webview/a;-><init>(Lcom/reactnativecommunity/webview/RNCWebViewManager$e;Landroid/webkit/WebView;Ljava/lang/String;Lcom/reactnativecommunity/webview/RNCWebViewManager$e;)V
invoke-virtual {v0, v1}, Landroid/view/View;->post(Ljava/lang/Runnable;)Z
goto :goto_34
.line 5
:cond_15
invoke-static {}, Lcom/facebook/react/bridge/Arguments;->createMap()Lcom/facebook/react/bridge/WritableMap;
move-result-object v1
const-string v2, "data"
.line 6
invoke-interface {v1, v2, p1}, Lcom/facebook/react/bridge/WritableMap;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 7
iget-object p1, v0, Lcom/reactnativecommunity/webview/RNCWebViewManager$e;->f:Lcom/facebook/react/bridge/CatalystInstance;
if-eqz p1, :cond_28
const-string p1, "onMessage"
.line 8
invoke-virtual {v0, p1, v1}, Lcom/reactnativecommunity/webview/RNCWebViewManager$e;->b(Ljava/lang/String;Lcom/facebook/react/bridge/WritableMap;)V
goto :goto_34
.line 9
:cond_28
new-instance p1, Lcom/reactnativecommunity/webview/events/f;
invoke-virtual {v0}, Landroid/view/View;->getId()I
move-result v2
invoke-direct {p1, v2, v1}, Lcom/reactnativecommunity/webview/events/f;-><init>(ILcom/facebook/react/bridge/WritableMap;)V
invoke-static {v0, p1}, Lcom/reactnativecommunity/webview/RNCWebViewManager;->dispatchEvent(Landroid/webkit/WebView;Lcom/facebook/react/uimanager/events/Event;)V
:goto_34
return-void
.end method