WebViewFragment$1.smali

.class Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;
.super Landroid/webkit/WebViewClient;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->initData()V
.end annotation

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


# instance fields
.field final synthetic this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;


# direct methods
.method constructor <init>(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;)V
    .registers 2

    iput-object p1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;

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

    return-void
.end method


# virtual methods
.method public onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .registers 4

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

    const-string/jumbo v0, "javascript:window.simpleJS.getIframeSrc(document.getElementsByTagName(\'iframe\')[0].src);"

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

    return-void
.end method

.method public onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .registers 4

    invoke-super {p0, p1, p2, p3}, Landroid/webkit/WebViewClient;->onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V

    return-void
.end method

.method public onReceivedError(Landroid/webkit/WebView;Landroid/webkit/WebResourceRequest;Landroid/webkit/WebResourceError;)V
    .registers 6

    invoke-super {p0, p1, p2, p3}, Landroid/webkit/WebViewClient;->onReceivedError(Landroid/webkit/WebView;Landroid/webkit/WebResourceRequest;Landroid/webkit/WebResourceError;)V

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;

    const/4 v1, 0x1

    # setter for: Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->mIsError:Z
    invoke-static {v0, v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->access$002(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;Z)Z

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;

    invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->showRetryView()V

    return-void
.end method

.method public onReceivedSslError(Landroid/webkit/WebView;Landroid/webkit/SslErrorHandler;Landroid/net/http/SslError;)V
    .registers 7

    new-instance v0, Landroid/app/AlertDialog$Builder;

    iget-object v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;

    invoke-virtual {v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    sget v1, Lcom/sdk/orion/ui/baselibrary/R$string;->ssl_cert_invalid_error:I

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    sget v1, Lcom/sdk/orion/ui/baselibrary/R$string;->ssl_continue:I

    new-instance v2, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1$1;

    invoke-direct {v2, p0, p2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1$1;-><init>(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;Landroid/webkit/SslErrorHandler;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    sget v1, Lcom/sdk/orion/ui/baselibrary/R$string;->ssl_cancel:I

    new-instance v2, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1$2;

    invoke-direct {v2, p0, p2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1$2;-><init>(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;Landroid/webkit/SslErrorHandler;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    new-instance v1, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1$3;

    invoke-direct {v1, p0, p2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1$3;-><init>(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;Landroid/webkit/SslErrorHandler;)V

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)Landroid/app/AlertDialog$Builder;

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    return-void
.end method

.method public shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .registers 7

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

    move-result v0

    if-nez v0, :cond_22

    const-string/jumbo v0, "tel:"

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

    move-result v0

    if-eqz v0, :cond_22

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$1;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;

    new-instance v1, Landroid/content/Intent;

    const-string/jumbo v2, "android.intent.action.DIAL"

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

    move-result-object v3

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

    invoke-virtual {v0, v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->startActivity(Landroid/content/Intent;)V

    const/4 v0, 0x1

    :goto_21
    return v0

    :cond_22
    invoke-super {p0, p1, p2}, Landroid/webkit/WebViewClient;->shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z

    move-result v0

    goto :goto_21
.end method