.class public Lcom/moji/mjad/background/creater/BgAdViewCreater;
.super Lcom/moji/mjad/base/view/AbsAdViewCreater;
.source "BgAdViewCreater.java"

# interfaces
.implements Lcom/moji/weathersence/adbg/BgAdAnimationPlayListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;,
        Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/mjad/base/view/AbsAdViewCreater<",
        "Lcom/moji/mjad/background/data/AdBg;",
        ">;",
        "Lcom/moji/weathersence/adbg/BgAdAnimationPlayListener;"
    }
.end annotation


# instance fields
.field public a:Ljava/lang/String;

.field public b:Lcom/moji/mjad/background/data/AdBg;

.field protected c:Lcom/moji/mjad/background/interfaces/IBgAdCtrl;

.field private g:Landroid/widget/RelativeLayout;

.field private h:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

.field private i:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

.field private j:Landroid/content/Context;

.field private k:Z

.field private l:Z

.field private m:Z

.field private n:Z

.field private o:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 57
    invoke-direct {p0, p1}, Lcom/moji/mjad/base/view/AbsAdViewCreater;-><init>(Landroid/content/Context;)V

    .line 46
    new-instance v0, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    invoke-direct {v0, p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;-><init>(Lcom/moji/mjad/background/creater/BgAdViewCreater;)V

    iput-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->h:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    .line 48
    new-instance v0, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    invoke-direct {v0, p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;-><init>(Lcom/moji/mjad/background/creater/BgAdViewCreater;)V

    iput-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->i:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    const/4 v0, 0x0

    .line 50
    iput-boolean v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->k:Z

    .line 58
    new-instance v0, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    invoke-direct {v0, p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;-><init>(Lcom/moji/mjad/background/creater/BgAdViewCreater;)V

    iput-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->h:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    .line 59
    new-instance v0, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    invoke-direct {v0, p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;-><init>(Lcom/moji/mjad/background/creater/BgAdViewCreater;)V

    iput-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->i:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    .line 60
    iput-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->j:Landroid/content/Context;

    return-void
.end method

.method private a(Ljava/lang/String;I)Ljava/util/List;
    .locals 8
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "I)",
            "Ljava/util/List<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .line 321
    new-instance v0, Ljava/util/ArrayList;

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

    const/4 v1, 0x0

    const/4 v2, 0x0

    :goto_0
    if-ge v2, p2, :cond_0

    .line 323
    new-instance v3, Ljava/lang/StringBuilder;

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

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

    const-string v4, "/"

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

    .line 324
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v4

    const-string v5, "%04d"

    const/4 v6, 0x1

    new-array v6, v6, [Ljava/lang/Object;

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v7

    aput-object v7, v6, v1

    invoke-static {v4, v5, v6}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

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

    const-string v4, ".png"

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

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

    move-result-object v3

    .line 325
    invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_0
    return-object v0
.end method

.method private a(Ljava/util/List;)Ljava/util/List;
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/moji/mjad/background/data/DynamicBgAdElement;",
            ">;)",
            "Ljava/util/List<",
            "Lcom/moji/weathersence/adbg/AdAnimationLayer;",
            ">;"
        }
    .end annotation

    .line 308
    new-instance v0, Ljava/util/ArrayList;

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

    .line 309
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/mjad/background/data/DynamicBgAdElement;

    .line 310
    new-instance v2, Lcom/moji/weathersence/adbg/AdAnimationLayer;

    invoke-direct {v2}, Lcom/moji/weathersence/adbg/AdAnimationLayer;-><init>()V

    .line 311
    iget-boolean v3, v1, Lcom/moji/mjad/background/data/DynamicBgAdElement;->a:Z

    iput-boolean v3, v2, Lcom/moji/weathersence/adbg/AdAnimationLayer;->c:Z

    .line 312
    iget-object v3, v1, Lcom/moji/mjad/background/data/DynamicBgAdElement;->c:Landroid/graphics/RectF;

    iput-object v3, v2, Lcom/moji/weathersence/adbg/AdAnimationLayer;->b:Landroid/graphics/RectF;

    .line 313
    iget-object v3, v1, Lcom/moji/mjad/background/data/DynamicBgAdElement;->b:Ljava/lang/String;

    iget v1, v1, Lcom/moji/mjad/background/data/DynamicBgAdElement;->d:I

    invoke-direct {p0, v3, v1}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(Ljava/lang/String;I)Ljava/util/List;

    move-result-object v1

    iput-object v1, v2, Lcom/moji/weathersence/adbg/AdAnimationLayer;->a:Ljava/util/List;

    .line 314
    invoke-interface {v0, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_0
    return-object v0
.end method

.method private a(Lcom/moji/mjad/background/data/AdBg;)V
    .locals 4

    .line 142
    new-instance v0, Lcom/moji/mjad/background/control/BgAdControl;

    iget-object v1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->j:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/moji/mjad/background/control/BgAdControl;-><init>(Landroid/content/Context;)V

    .line 144
    :try_start_0
    iget-object v1, p1, Lcom/moji/mjad/background/data/AdBg;->adShowParams:Ljava/lang/String;

    .line 145
    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2, v1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 146
    iget-object v1, p1, Lcom/moji/mjad/background/data/AdBg;->mojiAdShowType:Lcom/moji/mjad/enumdata/MojiAdShowType;

    sget-object v3, Lcom/moji/mjad/enumdata/MojiAdShowType;->BG_ANIMATION:Lcom/moji/mjad/enumdata/MojiAdShowType;

    invoke-virtual {v1, v3}, Lcom/moji/mjad/enumdata/MojiAdShowType;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    const-string v1, "bgType"

    const-string v3, "1"

    .line 147
    invoke-virtual {v2, v1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_0

    .line 148
    :cond_0
    iget-object v1, p1, Lcom/moji/mjad/background/data/AdBg;->mojiAdShowType:Lcom/moji/mjad/enumdata/MojiAdShowType;

    sget-object v3, Lcom/moji/mjad/enumdata/MojiAdShowType;->BG_IMAGE:Lcom/moji/mjad/enumdata/MojiAdShowType;

    invoke-virtual {v1, v3}, Lcom/moji/mjad/enumdata/MojiAdShowType;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    const-string v1, "bgType"

    const-string v3, "0"

    .line 149
    invoke-virtual {v2, v1, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 151
    :cond_1
    :goto_0
    invoke-virtual {v2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, p1, Lcom/moji/mjad/background/data/AdBg;->adShowParams:Ljava/lang/String;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v1

    const-string v2, "BgAdViewCreater"

    .line 153
    invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 155
    :goto_1
    invoke-virtual {v0, p1}, Lcom/moji/mjad/background/control/BgAdControl;->setAdInfo(Lcom/moji/mjad/base/data/MojiRecordData;)V

    .line 156
    invoke-virtual {v0}, Lcom/moji/mjad/background/control/BgAdControl;->recordShow()V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjad/background/creater/BgAdViewCreater;)Z
    .locals 0

    .line 42
    iget-boolean p0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->l:Z

    return p0
.end method

.method static synthetic a(Lcom/moji/mjad/background/creater/BgAdViewCreater;Z)Z
    .locals 0

    .line 42
    iput-boolean p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->o:Z

    return p1
.end method

.method static synthetic b(Lcom/moji/mjad/background/creater/BgAdViewCreater;)Z
    .locals 0

    .line 42
    iget-boolean p0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->n:Z

    return p0
.end method

.method static synthetic b(Lcom/moji/mjad/background/creater/BgAdViewCreater;Z)Z
    .locals 0

    .line 42
    iput-boolean p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->m:Z

    return p1
.end method

.method static synthetic c(Lcom/moji/mjad/background/creater/BgAdViewCreater;)V
    .locals 0

    .line 42
    invoke-direct {p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->e()V

    return-void
.end method

.method static synthetic c(Lcom/moji/mjad/background/creater/BgAdViewCreater;Z)Z
    .locals 0

    .line 42
    iput-boolean p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->n:Z

    return p1
.end method

.method static synthetic d(Lcom/moji/mjad/background/creater/BgAdViewCreater;)Z
    .locals 0

    .line 42
    iget-boolean p0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->m:Z

    return p0
.end method

.method static synthetic d(Lcom/moji/mjad/background/creater/BgAdViewCreater;Z)Z
    .locals 0

    .line 42
    iput-boolean p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->l:Z

    return p1
.end method

.method private e()V
    .locals 2

    .line 165
    iget-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    iget-object v0, v0, Lcom/moji/mjad/background/data/AdBg;->mojiAdShowType:Lcom/moji/mjad/enumdata/MojiAdShowType;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    iget-object v0, v0, Lcom/moji/mjad/background/data/AdBg;->mojiAdShowType:Lcom/moji/mjad/enumdata/MojiAdShowType;

    sget-object v1, Lcom/moji/mjad/enumdata/MojiAdShowType;->BG_IMAGE:Lcom/moji/mjad/enumdata/MojiAdShowType;

    .line 166
    invoke-virtual {v0, v1}, Lcom/moji/mjad/enumdata/MojiAdShowType;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    .line 167
    iput-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    .line 168
    invoke-virtual {p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b()V

    :cond_0
    return-void
.end method

.method static synthetic e(Lcom/moji/mjad/background/creater/BgAdViewCreater;)Z
    .locals 0

    .line 42
    iget-boolean p0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->o:Z

    return p0
.end method


# virtual methods
.method public a(Lcom/moji/mjad/background/data/AdBg;Ljava/lang/String;)Landroid/view/View;
    .locals 0

    .line 65
    sget p1, Lcom/moji/mjad/R$layout;->layout_background_ad:I

    invoke-virtual {p0, p1}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/RelativeLayout;

    iput-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->g:Landroid/widget/RelativeLayout;

    .line 66
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->g:Landroid/widget/RelativeLayout;

    invoke-virtual {p0, p1}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(Landroid/view/View;)V

    .line 67
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->g:Landroid/widget/RelativeLayout;

    return-object p1
.end method

.method public bridge synthetic a(Ljava/lang/Object;Ljava/lang/String;)Landroid/view/View;
    .locals 0

    .line 42
    check-cast p1, Lcom/moji/mjad/background/data/AdBg;

    invoke-virtual {p0, p1, p2}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(Lcom/moji/mjad/background/data/AdBg;Ljava/lang/String;)Landroid/view/View;

    move-result-object p1

    return-object p1
.end method

.method public a()V
    .locals 1

    const/4 v0, 0x0

    .line 75
    iput-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    const/4 v0, 0x0

    .line 76
    iput-boolean v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->k:Z

    return-void
.end method

.method protected a(Landroid/view/View;)V
    .locals 0

    return-void
.end method

.method public a(Lcom/moji/mjad/background/interfaces/IBgAdCtrl;)V
    .locals 0

    .line 211
    iput-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->c:Lcom/moji/mjad/background/interfaces/IBgAdCtrl;

    return-void
.end method

.method protected a(ZLcom/moji/mjad/base/data/AdImageInfo;)V
    .locals 1

    if-eqz p2, :cond_3

    .line 185
    iget-object v0, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

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

    move-result v0

    if-nez v0, :cond_3

    if-eqz p1, :cond_1

    .line 187
    iget-object p1, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

    iput-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a:Ljava/lang/String;

    .line 188
    iget-object p1, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

    const-string v0, "http"

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

    move-result p1

    if-eqz p1, :cond_0

    .line 189
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->j:Landroid/content/Context;

    invoke-static {p1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object p1

    iget-object p2, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

    invoke-virtual {p1, p2}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p1

    iget-object p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->h:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    invoke-virtual {p1, p2}, Lcom/squareup/picasso/RequestCreator;->a(Lcom/squareup/picasso/Target;)V

    goto :goto_0

    .line 192
    :cond_0
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->j:Landroid/content/Context;

    invoke-static {p1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object p1

    new-instance v0, Ljava/io/File;

    iget-object p2, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

    invoke-direct {v0, p2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1, v0}, Lcom/squareup/picasso/Picasso;->a(Ljava/io/File;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p1

    iget-object p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->h:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    invoke-virtual {p1, p2}, Lcom/squareup/picasso/RequestCreator;->a(Lcom/squareup/picasso/Target;)V

    goto :goto_0

    .line 195
    :cond_1
    iget-object p1, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

    const-string v0, "http"

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

    move-result p1

    if-eqz p1, :cond_2

    .line 196
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->j:Landroid/content/Context;

    invoke-static {p1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object p1

    iget-object p2, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

    invoke-virtual {p1, p2}, Lcom/squareup/picasso/Picasso;->a(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p1

    iget-object p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->i:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    invoke-virtual {p1, p2}, Lcom/squareup/picasso/RequestCreator;->a(Lcom/squareup/picasso/Target;)V

    goto :goto_0

    .line 198
    :cond_2
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->j:Landroid/content/Context;

    invoke-static {p1}, Lcom/squareup/picasso/Picasso;->a(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;

    move-result-object p1

    new-instance v0, Ljava/io/File;

    iget-object p2, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

    invoke-direct {v0, p2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1, v0}, Lcom/squareup/picasso/Picasso;->a(Ljava/io/File;)Lcom/squareup/picasso/RequestCreator;

    move-result-object p1

    iget-object p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->i:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    invoke-virtual {p1, p2}, Lcom/squareup/picasso/RequestCreator;->a(Lcom/squareup/picasso/Target;)V

    goto :goto_0

    :cond_3
    if-eqz p1, :cond_4

    const-string p1, ""

    .line 204
    iput-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a:Ljava/lang/String;

    :cond_4
    :goto_0
    return-void
.end method

.method public b()V
    .locals 1

    .line 173
    invoke-static {}, Lcom/moji/weathersence/MJSceneManager;->a()Lcom/moji/weathersence/MJSceneManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/weathersence/MJSceneManager;->b()V

    return-void
.end method

.method public declared-synchronized b(Lcom/moji/mjad/background/data/AdBg;Ljava/lang/String;)V
    .locals 5

    monitor-enter p0

    .line 81
    :try_start_0
    iget-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->h:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    if-nez v0, :cond_0

    .line 82
    new-instance v0, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    invoke-direct {v0, p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;-><init>(Lcom/moji/mjad/background/creater/BgAdViewCreater;)V

    iput-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->h:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyBlurTarget;

    .line 84
    :cond_0
    iget-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->i:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    if-nez v0, :cond_1

    .line 85
    new-instance v0, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    invoke-direct {v0, p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;-><init>(Lcom/moji/mjad/background/creater/BgAdViewCreater;)V

    iput-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->i:Lcom/moji/mjad/background/creater/BgAdViewCreater$MyTarget;

    :cond_1
    if-eqz p1, :cond_9

    .line 87
    iget-object v0, p1, Lcom/moji/mjad/background/data/AdBg;->mojiAdShowType:Lcom/moji/mjad/enumdata/MojiAdShowType;

    if-nez v0, :cond_2

    goto/16 :goto_2

    .line 93
    :cond_2
    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->mojiAdShowType:Lcom/moji/mjad/enumdata/MojiAdShowType;

    sget-object v0, Lcom/moji/mjad/enumdata/MojiAdShowType;->BG_IMAGE:Lcom/moji/mjad/enumdata/MojiAdShowType;

    invoke-virtual {p2, v0}, Lcom/moji/mjad/enumdata/MojiAdShowType;->equals(Ljava/lang/Object;)Z

    move-result p2

    const/4 v0, 0x1

    if-eqz p2, :cond_3

    .line 94
    invoke-virtual {p0}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b()V

    .line 95
    iget-object p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    if-eqz p2, :cond_6

    iget-object p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    iget-wide v1, p2, Lcom/moji/mjad/background/data/AdBg;->id:J

    iget-wide v3, p1, Lcom/moji/mjad/background/data/AdBg;->id:J

    cmp-long p2, v1, v3

    if-nez p2, :cond_6

    iget-boolean p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->k:Z

    if-eqz p2, :cond_6

    .line 96
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object p2

    iget-object v0, p1, Lcom/moji/mjad/background/data/AdBg;->sessionId:Ljava/lang/String;

    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object v1

    iget-object v1, v1, Lcom/moji/mjad/statistics/AdStatistics;->t:Ljava/lang/String;

    invoke-virtual {p2, v0, v1}, Lcom/moji/mjad/statistics/AdStatistics;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 97
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object p2

    iget-object p1, p1, Lcom/moji/mjad/background/data/AdBg;->sessionId:Ljava/lang/String;

    invoke-virtual {p2, p1}, Lcom/moji/mjad/statistics/AdStatistics;->b(Ljava/lang/String;)V

    .line 98
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    invoke-direct {p0, p1}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(Lcom/moji/mjad/background/data/AdBg;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 99
    monitor-exit p0

    return-void

    .line 101
    :cond_3
    :try_start_1
    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->mojiAdShowType:Lcom/moji/mjad/enumdata/MojiAdShowType;

    sget-object v1, Lcom/moji/mjad/enumdata/MojiAdShowType;->BG_ANIMATION:Lcom/moji/mjad/enumdata/MojiAdShowType;

    invoke-virtual {p2, v1}, Lcom/moji/mjad/enumdata/MojiAdShowType;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_6

    .line 102
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object p2

    iget-object v1, p1, Lcom/moji/mjad/background/data/AdBg;->sessionId:Ljava/lang/String;

    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object v2

    iget-object v2, v2, Lcom/moji/mjad/statistics/AdStatistics;->x:Ljava/lang/String;

    invoke-virtual {p2, v1, v2}, Lcom/moji/mjad/statistics/AdStatistics;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 103
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object p2

    iget-object v1, p1, Lcom/moji/mjad/background/data/AdBg;->sessionId:Ljava/lang/String;

    invoke-virtual {p2, v1}, Lcom/moji/mjad/statistics/AdStatistics;->b(Ljava/lang/String;)V

    .line 104
    invoke-static {}, Lcom/moji/weathersence/MJSceneManager;->a()Lcom/moji/weathersence/MJSceneManager;

    move-result-object p2

    invoke-virtual {p2}, Lcom/moji/weathersence/MJSceneManager;->c()Lcom/moji/weathersence/MJSceneManager$AdAnimationPlayStatus;

    move-result-object p2

    sget-object v1, Lcom/moji/weathersence/MJSceneManager$AdAnimationPlayStatus;->PLAYING_NOT_LAST_FRAME:Lcom/moji/weathersence/MJSceneManager$AdAnimationPlayStatus;

    if-ne p2, v1, :cond_4

    iget-boolean p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->k:Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    if-eqz p2, :cond_4

    .line 106
    monitor-exit p0

    return-void

    .line 108
    :cond_4
    :try_start_2
    iget p2, p1, Lcom/moji/mjad/background/data/AdBg;->dynamicType:I

    if-ne p2, v0, :cond_5

    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->mDynamicBgAdElements:Ljava/util/List;

    if-eqz p2, :cond_5

    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->mDynamicBgAdElements:Ljava/util/List;

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result p2

    if-lez p2, :cond_5

    .line 109
    iput-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    .line 110
    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->mDynamicBgAdElements:Ljava/util/List;

    invoke-direct {p0, p2}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(Ljava/util/List;)Ljava/util/List;

    move-result-object p2

    .line 111
    invoke-static {}, Lcom/moji/weathersence/MJSceneManager;->a()Lcom/moji/weathersence/MJSceneManager;

    move-result-object v1

    invoke-virtual {v1, p2, p0}, Lcom/moji/weathersence/MJSceneManager;->a(Ljava/util/List;Lcom/moji/weathersence/adbg/BgAdAnimationPlayListener;)V

    goto :goto_0

    .line 113
    :cond_5
    invoke-static {}, Lcom/moji/weathersence/MJSceneManager;->a()Lcom/moji/weathersence/MJSceneManager;

    move-result-object p2

    invoke-virtual {p2}, Lcom/moji/weathersence/MJSceneManager;->b()V

    .line 116
    :cond_6
    :goto_0
    iput-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    if-eqz p1, :cond_7

    .line 119
    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->imageInfo:Lcom/moji/mjad/base/data/AdImageInfo;

    if-eqz p2, :cond_7

    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->blurImageInfo:Lcom/moji/mjad/base/data/AdImageInfo;

    if-eqz p2, :cond_7

    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->imageInfo:Lcom/moji/mjad/base/data/AdImageInfo;

    iget-object p2, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

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

    move-result p2

    if-nez p2, :cond_7

    iget-object p2, p1, Lcom/moji/mjad/background/data/AdBg;->blurImageInfo:Lcom/moji/mjad/base/data/AdImageInfo;

    iget-object p2, p2, Lcom/moji/mjad/base/data/AdImageInfo;->imageUrl:Ljava/lang/String;

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

    move-result p2

    if-nez p2, :cond_7

    const/4 p2, 0x0

    .line 122
    iput-boolean p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->m:Z

    .line 123
    iput-boolean p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->l:Z

    .line 124
    iput-boolean p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->o:Z

    .line 125
    iput-boolean p2, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->n:Z

    .line 127
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object v1

    iget-object v2, p1, Lcom/moji/mjad/background/data/AdBg;->sessionId:Ljava/lang/String;

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

    move-result-wide v3

    invoke-virtual {v1, v2, v3, v4}, Lcom/moji/mjad/statistics/AdStatistics;->c(Ljava/lang/String;J)V

    .line 128
    iget-object v1, p1, Lcom/moji/mjad/background/data/AdBg;->imageInfo:Lcom/moji/mjad/base/data/AdImageInfo;

    invoke-virtual {p0, p2, v1}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(ZLcom/moji/mjad/base/data/AdImageInfo;)V

    .line 129
    iget-object p1, p1, Lcom/moji/mjad/background/data/AdBg;->blurImageInfo:Lcom/moji/mjad/base/data/AdImageInfo;

    invoke-virtual {p0, v0, p1}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(ZLcom/moji/mjad/base/data/AdImageInfo;)V

    goto :goto_1

    :cond_7
    const-string p1, ""

    .line 131
    iput-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a:Ljava/lang/String;

    .line 132
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->c:Lcom/moji/mjad/background/interfaces/IBgAdCtrl;

    if-eqz p1, :cond_8

    .line 133
    iget-object p1, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->c:Lcom/moji/mjad/background/interfaces/IBgAdCtrl;

    invoke-interface {p1, v0}, Lcom/moji/mjad/background/interfaces/IBgAdCtrl;->a(Z)V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 136
    :cond_8
    :goto_1
    monitor-exit p0

    return-void

    .line 88
    :cond_9
    :goto_2
    :try_start_3
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object p1

    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object v0

    iget-object v0, v0, Lcom/moji/mjad/statistics/AdStatistics;->u:Ljava/lang/String;

    invoke-virtual {p1, p2, v0}, Lcom/moji/mjad/statistics/AdStatistics;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 89
    invoke-static {}, Lcom/moji/mjad/statistics/AdStatistics;->a()Lcom/moji/mjad/statistics/AdStatistics;

    move-result-object p1

    invoke-virtual {p1, p2}, Lcom/moji/mjad/statistics/AdStatistics;->b(Ljava/lang/String;)V
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 90
    monitor-exit p0

    return-void

    :catchall_0
    move-exception p1

    .line 80
    monitor-exit p0

    throw p1
.end method

.method public c()V
    .locals 2

    const-string v0, "zdxbgv2"

    const-string v1, "  onPlaySuccess  "

    .line 333
    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x1

    .line 334
    iput-boolean v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->k:Z

    .line 335
    iget-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->c:Lcom/moji/mjad/background/interfaces/IBgAdCtrl;

    invoke-interface {v0, p0}, Lcom/moji/mjad/background/interfaces/IBgAdCtrl;->a(Lcom/moji/mjad/background/creater/BgAdViewCreater;)V

    .line 336
    iget-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->b:Lcom/moji/mjad/background/data/AdBg;

    invoke-direct {p0, v0}, Lcom/moji/mjad/background/creater/BgAdViewCreater;->a(Lcom/moji/mjad/background/data/AdBg;)V

    return-void
.end method

.method public d()V
    .locals 2

    const-string v0, "zdxbgv2"

    const-string v1, "  onPlayFail  "

    .line 342
    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x0

    .line 343
    iput-boolean v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->k:Z

    .line 344
    iget-object v0, p0, Lcom/moji/mjad/background/creater/BgAdViewCreater;->c:Lcom/moji/mjad/background/interfaces/IBgAdCtrl;

    const/4 v1, 0x1

    invoke-interface {v0, v1}, Lcom/moji/mjad/background/interfaces/IBgAdCtrl;->a(Z)V

    return-void
.end method
