.class Lcom/moji/mjad/third/CrystalAd$1;
.super Ljava/lang/Object;
.source "CrystalAd.java"

# interfaces
.implements Lcom/intowow/sdk/AdUrlLoadingListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjad/third/CrystalAd;-><init>(Landroid/content/Context;Lcom/moji/mjad/base/data/MojiRecordData;Ljava/lang/String;Lcom/moji/mjad/third/CrystalAd$OnCrystalLoadListener;)V
.end annotation

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


# instance fields
.field final synthetic a:Landroid/content/Context;

.field final synthetic b:Lcom/moji/mjad/third/CrystalAd;


# direct methods
.method constructor <init>(Lcom/moji/mjad/third/CrystalAd;Landroid/content/Context;)V
    .locals 0

    .line 42
    iput-object p1, p0, Lcom/moji/mjad/third/CrystalAd$1;->b:Lcom/moji/mjad/third/CrystalAd;

    iput-object p2, p0, Lcom/moji/mjad/third/CrystalAd$1;->a:Landroid/content/Context;

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

    return-void
.end method


# virtual methods
.method public shouldOverrideUrlLoading(Ljava/lang/String;)Z
    .locals 4

    .line 45
    new-instance v0, Landroid/content/Intent;

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

    .line 46
    iget-object v1, p0, Lcom/moji/mjad/third/CrystalAd$1;->a:Landroid/content/Context;

    instance-of v1, v1, Landroid/app/Activity;

    if-nez v1, :cond_0

    const/high16 v1, 0x10000000

    .line 47
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 49
    :cond_0
    new-instance v1, Landroid/content/ComponentName;

    iget-object v2, p0, Lcom/moji/mjad/third/CrystalAd$1;->a:Landroid/content/Context;

    const-string v3, "com.moji.webview.BrowserActivity"

    invoke-direct {v1, v2, v3}, Landroid/content/ComponentName;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    .line 50
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    const-string v2, "target_url"

    .line 51
    invoke-virtual {v1, v2, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 52
    invoke-virtual {v0, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    .line 53
    iget-object p1, p0, Lcom/moji/mjad/third/CrystalAd$1;->a:Landroid/content/Context;

    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object p1

    invoke-virtual {v0, p1}, Landroid/content/Intent;->resolveActivity(Landroid/content/pm/PackageManager;)Landroid/content/ComponentName;

    move-result-object p1

    if-eqz p1, :cond_1

    .line 54
    iget-object p1, p0, Lcom/moji/mjad/third/CrystalAd$1;->a:Landroid/content/Context;

    invoke-virtual {p1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto :goto_0

    :cond_1
    const-string p1, "CrystalAd"

    const-string v0, "sea CrystalAd SKIPIN not find BrowserActivity"

    .line 56
    invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V

    :goto_0
    const/4 p1, 0x1

    return p1
.end method
