TPNative.smali

.class public Lcom/tradplus/ads/open/nativead/TPNative;
.super Ljava/lang/Object;


# instance fields
.field private a:Lcom/tradplus/ads/open/nativead/NativeAdListener;

.field private b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .registers 4

    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/tradplus/ads/open/nativead/TPNative;-><init>(Landroid/content/Context;Ljava/lang/String;Z)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Z)V
    .registers 6

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

    new-instance v0, Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-direct {v0, p1, p2}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    iput-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-static {}, Lcom/tradplus/ads/mgr/a/b;->a()Lcom/tradplus/ads/mgr/a/b;

    move-result-object p1

    if-eqz p2, :cond_42

    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v0

    if-gtz v0, :cond_17

    goto :goto_42

    :cond_17
    iget-object v0, p1, Lcom/tradplus/ads/mgr/a/b;->a:Ljava/util/concurrent/ConcurrentHashMap;

    invoke-virtual {v0, p2}, Ljava/util/concurrent/ConcurrentHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/tradplus/ads/mgr/a/f;

    if-nez v0, :cond_38

    new-instance v0, Lcom/tradplus/ads/mgr/a/c;

    invoke-direct {v0, p2, p0, p3}, Lcom/tradplus/ads/mgr/a/c;-><init>(Ljava/lang/String;Lcom/tradplus/ads/open/nativead/TPNative;Z)V

    invoke-static {}, Lcom/tradplus/ads/common/util/CustomLogUtils;->getInstance()Lcom/tradplus/ads/common/util/CustomLogUtils;

    move-result-object p3

    sget-object v1, Lcom/tradplus/ads/common/util/CustomLogUtils$TradPlusLog;->OPEN_AUTOLOAD:Lcom/tradplus/ads/common/util/CustomLogUtils$TradPlusLog;

    invoke-virtual {p3, v1, p2}, Lcom/tradplus/ads/common/util/CustomLogUtils;->log(Lcom/tradplus/ads/common/util/CustomLogUtils$TradPlusLog;Ljava/lang/String;)V

    iget-object p1, p1, Lcom/tradplus/ads/mgr/a/b;->a:Ljava/util/concurrent/ConcurrentHashMap;

    invoke-virtual {p1, p2, v0}, Ljava/util/concurrent/ConcurrentHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    invoke-virtual {v0}, Lcom/tradplus/ads/mgr/a/f;->b()V

    return-void

    :cond_38
    instance-of p1, v0, Lcom/tradplus/ads/mgr/a/c;

    if-eqz p1, :cond_42

    iput-boolean p3, v0, Lcom/tradplus/ads/mgr/a/f;->f:Z

    check-cast v0, Lcom/tradplus/ads/mgr/a/c;

    iput-object p0, v0, Lcom/tradplus/ads/mgr/a/c;->a:Lcom/tradplus/ads/open/nativead/TPNative;

    :cond_42
    :goto_42
    return-void
.end method


# virtual methods
.method public entryAdScenario(Ljava/lang/String;)Z
    .registers 3

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0, p1}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->entryAdScenario(Ljava/lang/String;)Z

    move-result p1

    return p1
.end method

.method public getDrawNativeAdList()Ljava/util/List;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Landroid/view/View;",
            ">;"
        }
    .end annotation

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->getDrawNativeAdList()Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method public getNativeAd()Lcom/tradplus/ads/mgr/nativead/TPCustomNativeAd;
    .registers 2

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->getNativeAd()Lcom/tradplus/ads/mgr/nativead/TPCustomNativeAd;

    move-result-object v0

    return-object v0
.end method

.method public loadAd()V
    .registers 3

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    iget-object v1, p0, Lcom/tradplus/ads/open/nativead/TPNative;->a:Lcom/tradplus/ads/open/nativead/NativeAdListener;

    invoke-virtual {v0, v1}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->loadAd(Lcom/tradplus/ads/open/nativead/NativeAdListener;)V

    return-void
.end method

.method public onDestroy()V
    .registers 2

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->onDestroy()V

    return-void
.end method

.method public setAdListener(Lcom/tradplus/ads/open/nativead/NativeAdListener;)V
    .registers 3

    iput-object p1, p0, Lcom/tradplus/ads/open/nativead/TPNative;->a:Lcom/tradplus/ads/open/nativead/NativeAdListener;

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0, p1}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->setAdListener(Lcom/tradplus/ads/open/nativead/NativeAdListener;)V

    return-void
.end method

.method public setAdSize(II)V
    .registers 4

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0, p1, p2}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->setAdSize(II)V

    return-void
.end method

.method public setAllAdLoadListener(Lcom/tradplus/ads/open/LoadAdEveryLayerListener;)V
    .registers 3

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0, p1}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->setAllAdLoadListener(Lcom/tradplus/ads/open/LoadAdEveryLayerListener;)V

    return-void
.end method

.method public setCustomParams(Ljava/util/Map;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;)V"
        }
    .end annotation

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0, p1}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->setCustomParams(Ljava/util/Map;)V

    return-void
.end method

.method public showAd(Landroid/view/ViewGroup;I)V
    .registers 4

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0, p1, p2}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->showAd(Landroid/view/ViewGroup;I)V

    return-void
.end method

.method public showAd(Landroid/view/ViewGroup;ILjava/lang/String;)V
    .registers 5

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0, p1, p2, p3}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->showAd(Landroid/view/ViewGroup;ILjava/lang/String;)V

    return-void
.end method

.method public showAd(Landroid/view/ViewGroup;Lcom/tradplus/ads/open/nativead/TPNativeAdRender;Ljava/lang/String;)V
    .registers 5

    iget-object v0, p0, Lcom/tradplus/ads/open/nativead/TPNative;->b:Lcom/tradplus/ads/mgr/nativead/NativeMgr;

    invoke-virtual {v0, p1, p2, p3}, Lcom/tradplus/ads/mgr/nativead/NativeMgr;->showAd(Landroid/view/ViewGroup;Lcom/tradplus/ads/open/nativead/TPNativeAdRender;Ljava/lang/String;)V

    return-void
.end method