.class public Lcom/moji/mjweather/typhoon/HistoryTabFragment;
.super Lcom/moji/mjweather/typhoon/BaseTabFragment;
.source "HistoryTabFragment.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/typhoon/HistoryTabFragment$TyphoonJSObject;,
        Lcom/moji/mjweather/typhoon/HistoryTabFragment$MyWebViewClient;
    }
.end annotation


# instance fields
.field private a:Lcom/tencent/smtt/sdk/WebView;

.field private b:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

.field private c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

.field private d:Ljava/lang/String;

.field private e:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 27
    invoke-direct {p0}, Lcom/moji/mjweather/typhoon/BaseTabFragment;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/typhoon/HistoryTabFragment;)Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;
    .locals 0

    .line 27
    iget-object p0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->b:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    return-object p0
.end method

.method static synthetic a(Lcom/moji/mjweather/typhoon/HistoryTabFragment;Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;)Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;
    .locals 0

    .line 27
    iput-object p1, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    return-object p1
.end method

.method static synthetic a(Lcom/moji/mjweather/typhoon/HistoryTabFragment;Ljava/lang/String;)Ljava/lang/String;
    .locals 0

    .line 27
    iput-object p1, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->e:Ljava/lang/String;

    return-object p1
.end method

.method private a(Lcom/tencent/smtt/sdk/WebView;)V
    .locals 6

    .line 51
    invoke-virtual {p1}, Lcom/tencent/smtt/sdk/WebView;->getSettings()Lcom/tencent/smtt/sdk/WebSettings;

    move-result-object v0

    const/4 v1, 0x1

    .line 52
    invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/WebSettings;->setJavaScriptEnabled(Z)V

    .line 53
    invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/WebSettings;->setLoadWithOverviewMode(Z)V

    .line 54
    invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/WebSettings;->setUseWideViewPort(Z)V

    .line 55
    invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/WebSettings;->setLightTouchEnabled(Z)V

    .line 56
    new-instance v2, Lcom/moji/preferences/ProcessPrefer;

    invoke-direct {v2}, Lcom/moji/preferences/ProcessPrefer;-><init>()V

    sget-object v3, Lcom/moji/preferences/ProcessPrefer$KeyConstant;->VERSION:Lcom/moji/preferences/ProcessPrefer$KeyConstant;

    const-string v4, ""

    invoke-virtual {v2, v3, v4}, Lcom/moji/preferences/ProcessPrefer;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 57
    invoke-virtual {p1}, Lcom/tencent/smtt/sdk/WebView;->getSettings()Lcom/tencent/smtt/sdk/WebSettings;

    move-result-object v3

    new-instance v4, Ljava/lang/StringBuilder;

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

    invoke-virtual {p1}, Lcom/tencent/smtt/sdk/WebView;->getSettings()Lcom/tencent/smtt/sdk/WebSettings;

    move-result-object v5

    invoke-virtual {v5}, Lcom/tencent/smtt/sdk/WebSettings;->getUserAgentString()Ljava/lang/String;

    move-result-object v5

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

    const-string v5, " mojia/"

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

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

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

    move-result-object v2

    invoke-virtual {v3, v2}, Lcom/tencent/smtt/sdk/WebSettings;->setUserAgentString(Ljava/lang/String;)V

    .line 59
    invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/WebSettings;->setDomStorageEnabled(Z)V

    const/high16 v0, 0x2000000

    .line 60
    invoke-virtual {p1, v0}, Lcom/tencent/smtt/sdk/WebView;->setScrollBarStyle(I)V

    .line 61
    new-instance v0, Lcom/moji/mjweather/typhoon/HistoryTabFragment$MyWebViewClient;

    invoke-direct {v0, p0}, Lcom/moji/mjweather/typhoon/HistoryTabFragment$MyWebViewClient;-><init>(Lcom/moji/mjweather/typhoon/HistoryTabFragment;)V

    invoke-virtual {p1, v0}, Lcom/tencent/smtt/sdk/WebView;->setWebViewClient(Lcom/tencent/smtt/sdk/WebViewClient;)V

    const-string v0, "#FFFFFF"

    .line 63
    invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

    invoke-virtual {p1, v0}, Lcom/tencent/smtt/sdk/WebView;->setBackgroundColor(I)V

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

    move-result v0

    if-eqz v0, :cond_0

    .line 65
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    invoke-static {v0}, Lcom/moji/webview/datause/WebViewDataUsageHelper;->a(Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;)V

    const-string v0, "http://promo.moji.com/bridge/"

    .line 66
    invoke-static {v0}, Lcom/moji/webview/datause/WebViewDataUsageHelper;->a(Ljava/lang/String;)Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    .line 67
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    const-string v1, "http://promo.moji.com/bridge/"

    invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/WebView;->loadUrl(Ljava/lang/String;)V

    goto :goto_0

    .line 69
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->b:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    new-instance v1, Lcom/moji/mjweather/typhoon/HistoryTabFragment$1;

    invoke-direct {v1, p0}, Lcom/moji/mjweather/typhoon/HistoryTabFragment$1;-><init>(Lcom/moji/mjweather/typhoon/HistoryTabFragment;)V

    invoke-virtual {v0, v1}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->b(Landroid/view/View$OnClickListener;)V

    .line 80
    :goto_0
    new-instance v0, Lcom/moji/mjweather/typhoon/HistoryTabFragment$TyphoonJSObject;

    invoke-virtual {p0}, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    invoke-direct {v0, p0, v1}, Lcom/moji/mjweather/typhoon/HistoryTabFragment$TyphoonJSObject;-><init>(Lcom/moji/mjweather/typhoon/HistoryTabFragment;Landroid/content/Context;)V

    const-string v1, "typhoonJS"

    invoke-virtual {p1, v0, v1}, Lcom/tencent/smtt/sdk/WebView;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    return-void
.end method

.method public static b()Lcom/moji/mjweather/typhoon/HistoryTabFragment;
    .locals 1

    .line 101
    new-instance v0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;

    invoke-direct {v0}, Lcom/moji/mjweather/typhoon/HistoryTabFragment;-><init>()V

    return-object v0
.end method

.method static synthetic b(Lcom/moji/mjweather/typhoon/HistoryTabFragment;)Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;
    .locals 0

    .line 27
    iget-object p0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    return-object p0
.end method

.method static synthetic b(Lcom/moji/mjweather/typhoon/HistoryTabFragment;Ljava/lang/String;)Ljava/lang/String;
    .locals 0

    .line 27
    iput-object p1, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->d:Ljava/lang/String;

    return-object p1
.end method

.method static synthetic c(Lcom/moji/mjweather/typhoon/HistoryTabFragment;)Lcom/tencent/smtt/sdk/WebView;
    .locals 0

    .line 27
    iget-object p0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    return-object p0
.end method

.method private c()V
    .locals 2

    .line 84
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    new-instance v1, Lcom/moji/mjweather/typhoon/HistoryTabFragment$2;

    invoke-direct {v1, p0}, Lcom/moji/mjweather/typhoon/HistoryTabFragment$2;-><init>(Lcom/moji/mjweather/typhoon/HistoryTabFragment;)V

    invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/WebView;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    return-void
.end method

.method static synthetic d(Lcom/moji/mjweather/typhoon/HistoryTabFragment;)Ljava/lang/String;
    .locals 0

    .line 27
    iget-object p0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->d:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic e(Lcom/moji/mjweather/typhoon/HistoryTabFragment;)Ljava/lang/String;
    .locals 0

    .line 27
    iget-object p0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->e:Ljava/lang/String;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 2

    .line 94
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->b:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {v0}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->G()V

    .line 95
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    invoke-static {v0}, Lcom/moji/webview/datause/WebViewDataUsageHelper;->a(Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;)V

    const-string v0, "http://promo.moji.com/bridge/"

    .line 96
    invoke-static {v0}, Lcom/moji/webview/datause/WebViewDataUsageHelper;->a(Ljava/lang/String;)Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    .line 97
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    const-string v1, "http://promo.moji.com/bridge/"

    invoke-virtual {v0, v1}, Lcom/tencent/smtt/sdk/WebView;->loadUrl(Ljava/lang/String;)V

    return-void
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 0

    .line 35
    invoke-super {p0, p1}, Lcom/moji/mjweather/typhoon/BaseTabFragment;->onCreate(Landroid/os/Bundle;)V

    return-void
.end method

.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 1

    .line 41
    sget p3, Lcom/moji/mjweather/typhoon/R$layout;->layout_typhoon_history:I

    const/4 v0, 0x0

    invoke-virtual {p1, p3, p2, v0}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    .line 42
    sget p2, Lcom/moji/mjweather/typhoon/R$id;->history_loading:I

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    iput-object p2, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->b:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    .line 43
    sget p2, Lcom/moji/mjweather/typhoon/R$id;->typhoon_history:I

    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Lcom/tencent/smtt/sdk/WebView;

    iput-object p2, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    .line 44
    iget-object p2, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    invoke-direct {p0, p2}, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a(Lcom/tencent/smtt/sdk/WebView;)V

    .line 45
    invoke-direct {p0}, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c()V

    return-object p1
.end method

.method public onDestroy()V
    .locals 1

    .line 184
    invoke-super {p0}, Lcom/moji/mjweather/typhoon/BaseTabFragment;->onDestroy()V

    .line 185
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    if-eqz v0, :cond_0

    .line 186
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    invoke-virtual {v0}, Lcom/tencent/smtt/sdk/WebView;->removeAllViews()V

    .line 187
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    invoke-virtual {v0}, Lcom/tencent/smtt/sdk/WebView;->destroy()V

    .line 189
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->d:Ljava/lang/String;

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

    move-result v0

    if-nez v0, :cond_1

    .line 190
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->d:Ljava/lang/String;

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

    :cond_1
    return-void
.end method

.method public onPause()V
    .locals 1

    .line 164
    invoke-super {p0}, Lcom/moji/mjweather/typhoon/BaseTabFragment;->onPause()V

    .line 165
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    if-eqz v0, :cond_0

    .line 166
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    invoke-virtual {v0}, Lcom/tencent/smtt/sdk/WebView;->onPause()V

    .line 168
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    invoke-static {v0}, Lcom/moji/webview/datause/WebViewDataUsageHelper;->a(Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;)V

    return-void
.end method

.method public onResume()V
    .locals 1

    .line 173
    invoke-super {p0}, Lcom/moji/mjweather/typhoon/BaseTabFragment;->onResume()V

    .line 174
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    if-eqz v0, :cond_0

    .line 175
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    iget-object v0, v0, Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;->c:Ljava/lang/String;

    invoke-static {v0}, Lcom/moji/webview/datause/WebViewDataUsageHelper;->a(Ljava/lang/String;)Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->c:Lcom/moji/webview/datause/WebViewDataUsageHelper$RxTxBytes;

    .line 177
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    if-eqz v0, :cond_1

    .line 178
    iget-object v0, p0, Lcom/moji/mjweather/typhoon/HistoryTabFragment;->a:Lcom/tencent/smtt/sdk/WebView;

    invoke-virtual {v0}, Lcom/tencent/smtt/sdk/WebView;->onResume()V

    :cond_1
    return-void
.end method
