b$1.smali

.class final Lcom/proxy/ad/proxymopub/b$1;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/proxy/ad/proxymopub/b;->m()V
.end annotation

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


# instance fields
.field final synthetic a:Lcom/proxy/ad/proxymopub/b;


# direct methods
.method constructor <init>(Lcom/proxy/ad/proxymopub/b;)V
    .registers 2

    iput-object p1, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

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

    return-void
.end method


# virtual methods
.method public final run()V
    .registers 6

    const-string v0, "MoPub"

    const-string v1, "Start to load MoPub banner"

    invoke-static {v0, v1}, Lcom/proxy/ad/log/Logger;->d(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v1, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v1}, Lcom/proxy/ad/proxymopub/b;->a(Lcom/proxy/ad/proxymopub/b;)Landroid/content/Context;

    move-result-object v1

    iget-object v2, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    new-instance v3, Lcom/mopub/mobileads/MoPubView;

    invoke-direct {v3, v1}, Lcom/mopub/mobileads/MoPubView;-><init>(Landroid/content/Context;)V

    invoke-static {v2, v3}, Lcom/proxy/ad/proxymopub/b;->a(Lcom/proxy/ad/proxymopub/b;Lcom/mopub/mobileads/MoPubView;)Lcom/mopub/mobileads/MoPubView;

    iget-object v2, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v2}, Lcom/proxy/ad/proxymopub/b;->b(Lcom/proxy/ad/proxymopub/b;)Lcom/proxy/ad/adbusiness/config/b;

    move-result-object v2

    invoke-virtual {v2}, Lcom/proxy/ad/adbusiness/config/b;->e()Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->isEmpty()Z

    move-result v3

    if-eqz v3, :cond_3d

    const-string v1, "config size is undefined!"

    invoke-static {v0, v1}, Lcom/proxy/ad/log/Logger;->e(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    new-instance v1, Lcom/proxy/ad/adsdk/AdError;

    const/16 v2, 0x3eb

    const/16 v3, 0x2738

    const-string v4, "Banner ad size is empty, stop to load ad"

    invoke-direct {v1, v2, v3, v4}, Lcom/proxy/ad/adsdk/AdError;-><init>(IILjava/lang/String;)V

    invoke-static {v0, v1}, Lcom/proxy/ad/proxymopub/b;->a(Lcom/proxy/ad/proxymopub/b;Lcom/proxy/ad/adsdk/AdError;)V

    return-void

    :cond_3d
    iget-object v0, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v0}, Lcom/proxy/ad/proxymopub/b;->c(Lcom/proxy/ad/proxymopub/b;)Lcom/mopub/mobileads/MoPubView;

    move-result-object v0

    const/4 v3, 0x0

    invoke-interface {v2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/graphics/Point;

    iget v4, v4, Landroid/graphics/Point;->x:I

    invoke-static {v1, v4}, Lcom/proxy/ad/h/d;->a(Landroid/content/Context;I)I

    move-result v4

    invoke-virtual {v0, v4}, Lcom/mopub/mobileads/MoPubView;->setMinimumWidth(I)V

    iget-object v0, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v0}, Lcom/proxy/ad/proxymopub/b;->c(Lcom/proxy/ad/proxymopub/b;)Lcom/mopub/mobileads/MoPubView;

    move-result-object v0

    invoke-interface {v2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/graphics/Point;

    iget v2, v2, Landroid/graphics/Point;->y:I

    invoke-static {v1, v2}, Lcom/proxy/ad/h/d;->a(Landroid/content/Context;I)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/mopub/mobileads/MoPubView;->setMinimumHeight(I)V

    iget-object v0, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v0}, Lcom/proxy/ad/proxymopub/b;->d(Lcom/proxy/ad/proxymopub/b;)Lcom/proxy/ad/adbusiness/config/b;

    move-result-object v0

    invoke-virtual {v0}, Lcom/proxy/ad/adbusiness/config/b;->d()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v1}, Lcom/proxy/ad/proxymopub/b;->c(Lcom/proxy/ad/proxymopub/b;)Lcom/mopub/mobileads/MoPubView;

    move-result-object v1

    iget-object v2, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-virtual {v1, v2}, Lcom/mopub/mobileads/MoPubView;->setBannerAdListener(Lcom/mopub/mobileads/MoPubView$BannerAdListener;)V

    iget-object v1, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v1}, Lcom/proxy/ad/proxymopub/b;->c(Lcom/proxy/ad/proxymopub/b;)Lcom/mopub/mobileads/MoPubView;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/mopub/mobileads/MoPubView;->setAdUnitId(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    iget-object v0, v0, Lcom/proxy/ad/adbusiness/h/a;->b:Lcom/proxy/ad/adbusiness/config/b;

    if-eqz v0, :cond_9a

    iget-object v1, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v1}, Lcom/proxy/ad/proxymopub/b;->c(Lcom/proxy/ad/proxymopub/b;)Lcom/mopub/mobileads/MoPubView;

    move-result-object v1

    invoke-virtual {v0}, Lcom/proxy/ad/adbusiness/config/b;->n()Z

    move-result v0

    invoke-virtual {v1, v0}, Lcom/mopub/mobileads/MoPubView;->setAutorefreshEnabled(Z)V

    goto :goto_a3

    :cond_9a
    iget-object v0, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v0}, Lcom/proxy/ad/proxymopub/b;->c(Lcom/proxy/ad/proxymopub/b;)Lcom/mopub/mobileads/MoPubView;

    move-result-object v0

    invoke-virtual {v0, v3}, Lcom/mopub/mobileads/MoPubView;->setAutorefreshEnabled(Z)V

    :goto_a3
    iget-object v0, p0, Lcom/proxy/ad/proxymopub/b$1;->a:Lcom/proxy/ad/proxymopub/b;

    invoke-static {v0}, Lcom/proxy/ad/proxymopub/b;->c(Lcom/proxy/ad/proxymopub/b;)Lcom/mopub/mobileads/MoPubView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/mopub/mobileads/MoPubView;->loadAd()V

    return-void
.end method