sa.smali

.class Lcom/sandboxol/gamedetail/view/fragment/detail/sa;
.super Ljava/lang/Object;
.source "GameDetailViewModel.java"

# interfaces
.implements Lrx/functions/Action0;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/sandboxol/gamedetail/view/fragment/detail/ua;
.end annotation

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


# instance fields
.field final synthetic a:Lcom/sandboxol/gamedetail/view/fragment/detail/ua;


# direct methods
.method constructor <init>(Lcom/sandboxol/gamedetail/view/fragment/detail/ua;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lcom/sandboxol/gamedetail/view/fragment/detail/sa;->a:Lcom/sandboxol/gamedetail/view/fragment/detail/ua;

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

    return-void
.end method


# virtual methods
.method public call()V
    .registers 3

    .line 1
    iget-object v0, p0, Lcom/sandboxol/gamedetail/view/fragment/detail/sa;->a:Lcom/sandboxol/gamedetail/view/fragment/detail/ua;

    iget-object v0, v0, Lcom/sandboxol/gamedetail/view/fragment/detail/ua;->t:Landroidx/databinding/ObservableField;

    invoke-virtual {v0}, Landroidx/databinding/ObservableField;->get()Ljava/lang/Object;

    move-result-object v0

    if-eqz v0, :cond_60

    iget-object v0, p0, Lcom/sandboxol/gamedetail/view/fragment/detail/sa;->a:Lcom/sandboxol/gamedetail/view/fragment/detail/ua;

    iget-object v0, v0, Lcom/sandboxol/gamedetail/view/fragment/detail/ua;->t:Landroidx/databinding/ObservableField;

    invoke-virtual {v0}, Landroidx/databinding/ObservableField;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/sandboxol/greendao/entity/Game;

    invoke-virtual {v0}, Lcom/sandboxol/greendao/entity/Game;->getEditUrl()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_60

    .line 2
    iget-object v0, p0, Lcom/sandboxol/gamedetail/view/fragment/detail/sa;->a:Lcom/sandboxol/gamedetail/view/fragment/detail/ua;

    invoke-static {v0}, Lcom/sandboxol/gamedetail/view/fragment/detail/ua;->a(Lcom/sandboxol/gamedetail/view/fragment/detail/ua;)Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/sandboxol/center/utils/Helper;->hasBrowserCount(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_55

    .line 3
    :try_start_2a
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 4
    iget-object v1, p0, Lcom/sandboxol/gamedetail/view/fragment/detail/sa;->a:Lcom/sandboxol/gamedetail/view/fragment/detail/ua;

    iget-object v1, v1, Lcom/sandboxol/gamedetail/view/fragment/detail/ua;->t:Landroidx/databinding/ObservableField;

    invoke-virtual {v1}, Landroidx/databinding/ObservableField;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/sandboxol/greendao/entity/Game;

    invoke-virtual {v1}, Lcom/sandboxol/greendao/entity/Game;->getEditUrl()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 5
    iget-object v1, p0, Lcom/sandboxol/gamedetail/view/fragment/detail/sa;->a:Lcom/sandboxol/gamedetail/view/fragment/detail/ua;

    invoke-static {v1}, Lcom/sandboxol/gamedetail/view/fragment/detail/ua;->a(Lcom/sandboxol/gamedetail/view/fragment/detail/ua;)Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_4f
    .catch Landroid/content/ActivityNotFoundException; {:try_start_2a .. :try_end_4f} :catch_50

    goto :goto_60

    :catch_50
    move-exception v0

    .line 6
    invoke-virtual {v0}, Landroid/content/ActivityNotFoundException;->printStackTrace()V

    goto :goto_60

    .line 7
    :cond_55
    iget-object v0, p0, Lcom/sandboxol/gamedetail/view/fragment/detail/sa;->a:Lcom/sandboxol/gamedetail/view/fragment/detail/ua;

    invoke-static {v0}, Lcom/sandboxol/gamedetail/view/fragment/detail/ua;->a(Lcom/sandboxol/gamedetail/view/fragment/detail/ua;)Landroid/content/Context;

    move-result-object v0

    const-string v1, "No browsers have been found"

    invoke-static {v0, v1}, Lcom/sandboxol/common/utils/AppToastUtils;->showShortNegativeTipToast(Landroid/content/Context;Ljava/lang/String;)V

    :cond_60
    :goto_60
    return-void
.end method