.class Lcom/moji/mjweather/MainActivity$5;
.super Ljava/lang/Object;
.source "MainActivity.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjweather/MainActivity;->onForeToBackground()V
.end annotation

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


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


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

    .line 709
    iput-object p1, p0, Lcom/moji/mjweather/MainActivity$5;->a:Lcom/moji/mjweather/MainActivity;

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

    return-void
.end method


# virtual methods
.method public run()V
    .locals 4

    .line 712
    invoke-static {}, Lcom/moji/mjad/base/network/socket/AdSocketManager;->a()Lcom/moji/mjad/base/network/socket/AdSocketManager;

    move-result-object v0

    const/4 v1, 0x4

    iput v1, v0, Lcom/moji/mjad/base/network/socket/AdSocketManager;->c:I

    .line 713
    invoke-static {}, Lcom/moji/mjad/base/network/socket/AdSocketManager;->a()Lcom/moji/mjad/base/network/socket/AdSocketManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/mjad/base/network/socket/AdSocketManager;->c()V

    .line 715
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    .line 716
    invoke-static {v0}, Lcom/moji/notify/NotifyPreference;->a(Landroid/content/Context;)Lcom/moji/notify/NotifyPreference;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 717
    invoke-virtual {v1}, Lcom/moji/notify/NotifyPreference;->c()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 718
    invoke-static {v0}, Lcom/moji/notify/NotifyService;->startNotify(Landroid/content/Context;)V

    .line 721
    :cond_0
    new-instance v1, Lcom/moji/badge/BadgePreference;

    invoke-direct {v1, v0}, Lcom/moji/badge/BadgePreference;-><init>(Landroid/content/Context;)V

    sget-object v0, Lcom/moji/badge/BadgePreference$KeyConstant;->FORE_TO_BACK_TIME:Lcom/moji/badge/BadgePreference$KeyConstant;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-virtual {v1, v0, v2, v3}, Lcom/moji/badge/BadgePreference;->b(Lcom/moji/badge/BadgePreference$KeyConstant;J)V

    .line 723
    iget-object v0, p0, Lcom/moji/mjweather/MainActivity$5;->a:Lcom/moji/mjweather/MainActivity;

    invoke-static {v0}, Lcom/moji/mjweather/MainActivity;->c(Lcom/moji/mjweather/MainActivity;)Landroid/support/v4/app/FragmentManager;

    move-result-object v0

    const-string v1, "main_fragment"

    invoke-virtual {v0, v1}, Landroid/support/v4/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    if-eqz v0, :cond_3

    .line 724
    instance-of v1, v0, Lcom/moji/mjweather/MainFragment;

    if-eqz v1, :cond_3

    .line 725
    check-cast v0, Lcom/moji/mjweather/MainFragment;

    invoke-virtual {v0}, Lcom/moji/mjweather/MainFragment;->a()Lcom/moji/mjweather/TAB_TYPE;

    move-result-object v0

    .line 726
    sget-object v1, Lcom/moji/mjweather/TAB_TYPE;->WEATHER_TAB:Lcom/moji/mjweather/TAB_TYPE;

    if-ne v0, v1, :cond_1

    .line 727
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_QUIT_TAB:Lcom/moji/statistics/EVENT_TAG;

    const-string v2, "0"

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    goto :goto_0

    .line 728
    :cond_1
    sget-object v1, Lcom/moji/mjweather/TAB_TYPE;->LIVE_VIEW_TAB:Lcom/moji/mjweather/TAB_TYPE;

    if-ne v0, v1, :cond_2

    .line 729
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_QUIT_TAB:Lcom/moji/statistics/EVENT_TAG;

    const-string v2, "1"

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    goto :goto_0

    .line 730
    :cond_2
    sget-object v1, Lcom/moji/mjweather/TAB_TYPE;->ME_TAB:Lcom/moji/mjweather/TAB_TYPE;

    if-ne v0, v1, :cond_3

    .line 731
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_QUIT_TAB:Lcom/moji/statistics/EVENT_TAG;

    const-string v2, "3"

    invoke-virtual {v0, v1, v2}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    :cond_3
    :goto_0
    return-void
.end method
