a.smali

.class public final Lcom/reactnativecommunity/webview/a;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field public final synthetic a:Landroid/webkit/WebView;

.field public final synthetic b:Ljava/lang/String;

.field public final synthetic c:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;

.field public final synthetic d:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;


# direct methods
.method public constructor <init>(Lcom/reactnativecommunity/webview/RNCWebViewManager$e;Landroid/webkit/WebView;Ljava/lang/String;Lcom/reactnativecommunity/webview/RNCWebViewManager$e;)V
    .registers 5

    iput-object p1, p0, Lcom/reactnativecommunity/webview/a;->d:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;

    iput-object p2, p0, Lcom/reactnativecommunity/webview/a;->a:Landroid/webkit/WebView;

    iput-object p3, p0, Lcom/reactnativecommunity/webview/a;->b:Ljava/lang/String;

    iput-object p4, p0, Lcom/reactnativecommunity/webview/a;->c:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final run()V
    .registers 9

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v0

    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object v1

    if-ne v0, v1, :cond_c

    const/4 v0, 0x1

    goto :goto_d

    :cond_c
    const/4 v0, 0x0

    :goto_d
    const-string v1, "runnable"

    const-string v2, "com/reactnativecommunity/webview/RNCWebViewManager$RNCWebView$1"

    const-string v3, "run"

    if-eqz v0, :cond_18

    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 1
    :cond_18
    iget-object v4, p0, Lcom/reactnativecommunity/webview/a;->d:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;

    iget-object v4, v4, Lcom/reactnativecommunity/webview/RNCWebViewManager$e;->e:Lcom/reactnativecommunity/webview/RNCWebViewManager$f;

    if-nez v4, :cond_24

    if-eqz v0, :cond_23

    .line 2
    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_23
    return-void

    .line 3
    :cond_24
    iget-object v5, p0, Lcom/reactnativecommunity/webview/a;->a:Landroid/webkit/WebView;

    invoke-virtual {v5}, Landroid/webkit/WebView;->getUrl()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v4, v5, v6}, Lcom/reactnativecommunity/webview/RNCWebViewManager$f;->a(Landroid/webkit/WebView;Ljava/lang/String;)Lcom/facebook/react/bridge/WritableMap;

    move-result-object v4

    .line 4
    iget-object v5, p0, Lcom/reactnativecommunity/webview/a;->b:Ljava/lang/String;

    const-string v6, "data"

    invoke-interface {v4, v6, v5}, Lcom/facebook/react/bridge/WritableMap;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 5
    iget-object v5, p0, Lcom/reactnativecommunity/webview/a;->d:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;

    iget-object v5, v5, Lcom/reactnativecommunity/webview/RNCWebViewManager$e;->f:Lcom/facebook/react/bridge/CatalystInstance;

    if-eqz v5, :cond_43

    .line 6
    iget-object v5, p0, Lcom/reactnativecommunity/webview/a;->c:Lcom/reactnativecommunity/webview/RNCWebViewManager$e;

    const-string v6, "onMessage"

    invoke-virtual {v5, v6, v4}, Lcom/reactnativecommunity/webview/RNCWebViewManager$e;->b(Ljava/lang/String;Lcom/facebook/react/bridge/WritableMap;)V

    goto :goto_51

    .line 7
    :cond_43
    iget-object v5, p0, Lcom/reactnativecommunity/webview/a;->a:Landroid/webkit/WebView;

    new-instance v6, Lcom/reactnativecommunity/webview/events/f;

    invoke-virtual {v5}, Landroid/view/View;->getId()I

    move-result v7

    invoke-direct {v6, v7, v4}, Lcom/reactnativecommunity/webview/events/f;-><init>(ILcom/facebook/react/bridge/WritableMap;)V

    invoke-static {v5, v6}, Lcom/reactnativecommunity/webview/RNCWebViewManager;->dispatchEvent(Landroid/webkit/WebView;Lcom/facebook/react/uimanager/events/Event;)V

    :goto_51
    if-eqz v0, :cond_56

    .line 8
    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_56
    return-void
.end method