.class Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;
.super Landroid/webkit/WebViewClient;
.source "VideoDetailsActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/mjweather/feed/VideoDetailsActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "InsideWebViewClient"
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/mjweather/feed/VideoDetailsActivity;


# direct methods
.method private constructor <init>(Lcom/moji/mjweather/feed/VideoDetailsActivity;)V
    .locals 0

    .line 428
    iput-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-direct {p0}, Landroid/webkit/WebViewClient;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/moji/mjweather/feed/VideoDetailsActivity;Lcom/moji/mjweather/feed/VideoDetailsActivity$1;)V
    .locals 0

    .line 428
    invoke-direct {p0, p1}, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;-><init>(Lcom/moji/mjweather/feed/VideoDetailsActivity;)V

    return-void
.end method


# virtual methods
.method public onLoadResource(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 1

    .line 455
    invoke-super {p0, p1, p2}, Landroid/webkit/WebViewClient;->onLoadResource(Landroid/webkit/WebView;Ljava/lang/String;)V

    .line 456
    invoke-static {}, Lcom/moji/tool/DeviceTool;->o()Z

    move-result p2

    if-eqz p2, :cond_0

    invoke-static {}, Lcom/moji/tool/DeviceTool;->C()Z

    move-result p2

    if-eqz p2, :cond_0

    const-string p2, "javascript:"

    .line 458
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p2, "var video = document.getElementsByTagName(\'video\')[0];"

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    .line 459
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p2, "if (video != undefined) {"

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    .line 460
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p2, "video.play();"

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    .line 461
    new-instance v0, Ljava/lang/StringBuilder;

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

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p2, "}"

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    .line 462
    invoke-virtual {p1, p2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method public onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 1

    .line 432
    invoke-super {p0, p1, p2}, Landroid/webkit/WebViewClient;->onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V

    .line 433
    iget-object v0, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {v0}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->h(Lcom/moji/mjweather/feed/VideoDetailsActivity;)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_0

    iget-object v0, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {v0}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->h(Lcom/moji/mjweather/feed/VideoDetailsActivity;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p2, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 434
    :cond_0
    invoke-static {p1, p2}, Lcom/moji/webview/umeng/UMHybrid;->onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V

    .line 435
    iget-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {p1, p2}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->b(Lcom/moji/mjweather/feed/VideoDetailsActivity;Ljava/lang/String;)Ljava/lang/String;

    .line 436
    iget-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    const/4 p2, 0x0

    invoke-static {p1, p2}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->c(Lcom/moji/mjweather/feed/VideoDetailsActivity;Ljava/lang/String;)Ljava/lang/String;

    :cond_1
    return-void
.end method

.method public shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 0

    .line 442
    invoke-virtual {p1, p2}, Landroid/webkit/WebView;->loadUrl(Ljava/lang/String;)V

    .line 443
    invoke-static {p1, p2}, Lcom/moji/webview/umeng/UMHybrid;->shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)V

    .line 444
    iget-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {p1}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->h(Lcom/moji/mjweather/feed/VideoDetailsActivity;)Ljava/lang/String;

    move-result-object p1

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

    move-result p1

    if-nez p1, :cond_1

    iget-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {p1}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->h(Lcom/moji/mjweather/feed/VideoDetailsActivity;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p2, p1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result p1

    if-nez p1, :cond_1

    const-string p1, "http"

    invoke-virtual {p2, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_1

    .line 445
    iget-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {p1}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->i(Lcom/moji/mjweather/feed/VideoDetailsActivity;)Ljava/lang/String;

    move-result-object p1

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

    move-result p1

    if-nez p1, :cond_0

    iget-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {p1}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->i(Lcom/moji/mjweather/feed/VideoDetailsActivity;)Ljava/lang/String;

    move-result-object p1

    iget-object p2, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {p2}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->h(Lcom/moji/mjweather/feed/VideoDetailsActivity;)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-nez p1, :cond_1

    .line 446
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {p1}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->h(Lcom/moji/mjweather/feed/VideoDetailsActivity;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/moji/webview/umeng/UMHybrid;->onPageChanged(Ljava/lang/String;)V

    .line 447
    iget-object p1, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    iget-object p2, p0, Lcom/moji/mjweather/feed/VideoDetailsActivity$InsideWebViewClient;->a:Lcom/moji/mjweather/feed/VideoDetailsActivity;

    invoke-static {p2}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->h(Lcom/moji/mjweather/feed/VideoDetailsActivity;)Ljava/lang/String;

    move-result-object p2

    invoke-static {p1, p2}, Lcom/moji/mjweather/feed/VideoDetailsActivity;->c(Lcom/moji/mjweather/feed/VideoDetailsActivity;Ljava/lang/String;)Ljava/lang/String;

    :cond_1
    const/4 p1, 0x1

    return p1
.end method
