LogBoxModule$2.smali

.class Lcom/facebook/react/devsupport/LogBoxModule$2;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/facebook/react/devsupport/LogBoxModule;->show()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = null
.end annotation


# instance fields
.field public final synthetic this$0:Lcom/facebook/react/devsupport/LogBoxModule;


# direct methods
.method public constructor <init>(Lcom/facebook/react/devsupport/LogBoxModule;)V
    .registers 2

    iput-object p1, p0, Lcom/facebook/react/devsupport/LogBoxModule$2;->this$0:Lcom/facebook/react/devsupport/LogBoxModule;

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

    return-void
.end method


# virtual methods
.method public run()V
    .registers 10

    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

    const/4 v2, 0x0

    if-ne v0, v1, :cond_d

    const/4 v0, 0x1

    goto :goto_e

    :cond_d
    const/4 v0, 0x0

    :goto_e
    const-string v1, "runnable"

    const-string v3, "com/facebook/react/devsupport/LogBoxModule$2"

    const-string v4, "run"

    if-eqz v0, :cond_19

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

    .line 1
    :cond_19
    iget-object v5, p0, Lcom/facebook/react/devsupport/LogBoxModule$2;->this$0:Lcom/facebook/react/devsupport/LogBoxModule;

    # getter for: Lcom/facebook/react/devsupport/LogBoxModule;->mLogBoxDialog:Lcom/facebook/react/devsupport/LogBoxDialog;
    invoke-static {v5}, Lcom/facebook/react/devsupport/LogBoxModule;->access$200(Lcom/facebook/react/devsupport/LogBoxModule;)Lcom/facebook/react/devsupport/LogBoxDialog;

    move-result-object v5

    if-nez v5, :cond_66

    iget-object v5, p0, Lcom/facebook/react/devsupport/LogBoxModule$2;->this$0:Lcom/facebook/react/devsupport/LogBoxModule;

    # getter for: Lcom/facebook/react/devsupport/LogBoxModule;->mReactRootView:Landroid/view/View;
    invoke-static {v5}, Lcom/facebook/react/devsupport/LogBoxModule;->access$000(Lcom/facebook/react/devsupport/LogBoxModule;)Landroid/view/View;

    move-result-object v5

    if-eqz v5, :cond_66

    .line 2
    iget-object v5, p0, Lcom/facebook/react/devsupport/LogBoxModule$2;->this$0:Lcom/facebook/react/devsupport/LogBoxModule;

    # invokes: Lcom/facebook/react/bridge/ReactContextBaseJavaModule;->getCurrentActivity()Landroid/app/Activity;
    invoke-static {v5}, Lcom/facebook/react/devsupport/LogBoxModule;->access$300(Lcom/facebook/react/devsupport/LogBoxModule;)Landroid/app/Activity;

    move-result-object v5

    if-eqz v5, :cond_5b

    .line 3
    invoke-virtual {v5}, Landroid/app/Activity;->isFinishing()Z

    move-result v6

    if-eqz v6, :cond_38

    goto :goto_5b

    .line 4
    :cond_38
    iget-object v6, p0, Lcom/facebook/react/devsupport/LogBoxModule$2;->this$0:Lcom/facebook/react/devsupport/LogBoxModule;

    new-instance v7, Lcom/facebook/react/devsupport/LogBoxDialog;

    iget-object v8, p0, Lcom/facebook/react/devsupport/LogBoxModule$2;->this$0:Lcom/facebook/react/devsupport/LogBoxModule;

    # getter for: Lcom/facebook/react/devsupport/LogBoxModule;->mReactRootView:Landroid/view/View;
    invoke-static {v8}, Lcom/facebook/react/devsupport/LogBoxModule;->access$000(Lcom/facebook/react/devsupport/LogBoxModule;)Landroid/view/View;

    move-result-object v8

    invoke-direct {v7, v5, v8}, Lcom/facebook/react/devsupport/LogBoxDialog;-><init>(Landroid/app/Activity;Landroid/view/View;)V

    # setter for: Lcom/facebook/react/devsupport/LogBoxModule;->mLogBoxDialog:Lcom/facebook/react/devsupport/LogBoxDialog;
    invoke-static {v6, v7}, Lcom/facebook/react/devsupport/LogBoxModule;->access$202(Lcom/facebook/react/devsupport/LogBoxModule;Lcom/facebook/react/devsupport/LogBoxDialog;)Lcom/facebook/react/devsupport/LogBoxDialog;

    .line 5
    iget-object v5, p0, Lcom/facebook/react/devsupport/LogBoxModule$2;->this$0:Lcom/facebook/react/devsupport/LogBoxModule;

    # getter for: Lcom/facebook/react/devsupport/LogBoxModule;->mLogBoxDialog:Lcom/facebook/react/devsupport/LogBoxDialog;
    invoke-static {v5}, Lcom/facebook/react/devsupport/LogBoxModule;->access$200(Lcom/facebook/react/devsupport/LogBoxModule;)Lcom/facebook/react/devsupport/LogBoxDialog;

    move-result-object v5

    invoke-virtual {v5, v2}, Landroid/app/Dialog;->setCancelable(Z)V

    .line 6
    iget-object v2, p0, Lcom/facebook/react/devsupport/LogBoxModule$2;->this$0:Lcom/facebook/react/devsupport/LogBoxModule;

    # getter for: Lcom/facebook/react/devsupport/LogBoxModule;->mLogBoxDialog:Lcom/facebook/react/devsupport/LogBoxDialog;
    invoke-static {v2}, Lcom/facebook/react/devsupport/LogBoxModule;->access$200(Lcom/facebook/react/devsupport/LogBoxModule;)Lcom/facebook/react/devsupport/LogBoxDialog;

    move-result-object v2

    invoke-virtual {v2}, Landroid/app/Dialog;->show()V

    goto :goto_66

    :cond_5b
    :goto_5b
    const-string v2, "Unable to launch logbox because react activity is not available, here is the error that logbox would\'ve displayed: "

    .line 7
    invoke-static {v2}, Lcom/facebook/react/util/RNLog;->e(Ljava/lang/String;)V

    if-eqz v0, :cond_65

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

    :cond_65
    return-void

    :cond_66
    :goto_66
    if-eqz v0, :cond_6b

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

    :cond_6b
    return-void
.end method