NativeUnityPlguin$2$1.smali
.class final Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;
.super Lcom/tradplus/ads/open/nativead/NativeAdListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->run()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
# direct methods
.method constructor <init>(Lcom/tradplus/ads/unity/NativeUnityPlguin$2;)V
.registers 2
iput-object p1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
invoke-direct {p0}, Lcom/tradplus/ads/open/nativead/NativeAdListener;-><init>()V
return-void
.end method
# virtual methods
.method public final onAdClicked(Lcom/tradplus/ads/base/bean/TPAdInfo;)V
.registers 5
sget-object v0, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->AdNativeClicked:Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/String;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
iget-object p1, p1, Lcom/tradplus/ads/base/bean/TPAdInfo;->adUnitId:Ljava/lang/String;
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const/4 v2, 0x0
aput-object p1, v1, v2
invoke-virtual {v0, v1}, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->Emit([Ljava/lang/String;)V
return-void
.end method
.method public final onAdClosed(Lcom/tradplus/ads/base/bean/TPAdInfo;)V
.registers 2
return-void
.end method
.method public final onAdImpression(Lcom/tradplus/ads/base/bean/TPAdInfo;)V
.registers 5
sget-object v0, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->AdNativeExpanded:Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;
const/4 v1, 0x1
new-array v1, v1, [Ljava/lang/String;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
iget-object p1, p1, Lcom/tradplus/ads/base/bean/TPAdInfo;->adUnitId:Ljava/lang/String;
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const/4 v2, 0x0
aput-object p1, v1, v2
invoke-virtual {v0, v1}, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->Emit([Ljava/lang/String;)V
return-void
.end method
.method public final onAdLoadFailed(Lcom/tradplus/ads/base/bean/TPAdError;)V
.registers 6
sget-object v0, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->AdNativeFailed:Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;
const/4 v1, 0x2
new-array v1, v1, [Ljava/lang/String;
iget-object v2, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object v2, v2, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
iget-object v2, v2, Lcom/tradplus/ads/unity/TradplusUnityPlugin;->mAdUnitId:Ljava/lang/String;
const/4 v3, 0x0
aput-object v2, v1, v3
invoke-virtual {p1}, Lcom/tradplus/ads/base/bean/TPAdError;->getErrorMsg()Ljava/lang/String;
move-result-object p1
const/4 v2, 0x1
aput-object p1, v1, v2
invoke-virtual {v0, v1}, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->Emit([Ljava/lang/String;)V
return-void
.end method
.method public final onAdLoaded(Lcom/tradplus/ads/base/bean/TPAdInfo;Lcom/tradplus/ads/base/bean/TPBaseAd;)V
.registers 9
iget-object p2, p1, Lcom/tradplus/ads/base/bean/TPAdInfo;->adSourceName:Ljava/lang/String;
if-nez p2, :cond_5
return-void
:cond_5
const-string v0, "DisplayIO JSTag"
invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p2
const/4 v0, 0x2
const/4 v1, 0x1
const/4 v2, 0x3
const/4 v3, 0x0
if-nez p2, :cond_32
iget-object p2, p1, Lcom/tradplus/ads/base/bean/TPAdInfo;->adSourceName:Ljava/lang/String;
const-string v4, "PubNative JSTag"
invoke-virtual {p2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_1c
goto :goto_32
:cond_1c
const/16 p2, 0x154
sget-object v4, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->AdNativeLoaded:Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;
new-array v2, v2, [Ljava/lang/String;
iget-object v5, p1, Lcom/tradplus/ads/base/bean/TPAdInfo;->adUnitId:Ljava/lang/String;
aput-object v5, v2, v3
const-string v5, "340"
aput-object v5, v2, v1
iget-object p1, p1, Lcom/tradplus/ads/base/bean/TPAdInfo;->adSourceName:Ljava/lang/String;
aput-object p1, v2, v0
invoke-virtual {v4, v2}, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->Emit([Ljava/lang/String;)V
goto :goto_47
:cond_32
:goto_32
const/16 p2, 0xfa
sget-object v4, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->AdNativeLoaded:Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;
new-array v2, v2, [Ljava/lang/String;
iget-object v5, p1, Lcom/tradplus/ads/base/bean/TPAdInfo;->adUnitId:Ljava/lang/String;
aput-object v5, v2, v3
const-string v5, "250"
aput-object v5, v2, v1
iget-object p1, p1, Lcom/tradplus/ads/base/bean/TPAdInfo;->adSourceName:Ljava/lang/String;
aput-object p1, v2, v0
invoke-virtual {v4, v2}, Lcom/tradplus/ads/unity/TradplusUnityPlugin$UnityEvent;->Emit([Ljava/lang/String;)V
:goto_47
new-instance p1, Ljava/lang/StringBuilder;
const-string v0, "onAdLoaded alignment: height :"
invoke-direct {p1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v0, " ,width :320"
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
const-string v0, "NativeUnityPlguin"
invoke-static {v0, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
iget-object p1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object p1, p1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->activity:Landroid/app/Activity;
invoke-static {p1}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$100(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Landroid/app/Activity;
move-result-object p1
invoke-static {p1}, Lcom/tradplus/ads/common/util/ScreenUtil;->getScreenDensity(Landroid/app/Activity;)F
move-result p1
iget-object v0, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object v1, v0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
iget v0, v0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->a:I
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->mRelativeLayout:Landroid/widget/RelativeLayout;
invoke-static {v1}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$200(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Landroid/widget/RelativeLayout;
move-result-object v2
iget-object v4, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object v4, v4, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->activity:Landroid/app/Activity;
invoke-static {v4}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$100(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Landroid/app/Activity;
move-result-object v4
invoke-static {v0, v2, v4}, Lcom/tradplus/ads/common/util/ScreenUtil;->prepLayout(ILandroid/widget/RelativeLayout;Landroid/content/Context;)Landroid/widget/RelativeLayout;
move-result-object v0
# setter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->mRelativeLayout:Landroid/widget/RelativeLayout;
invoke-static {v1, v0}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$202(Lcom/tradplus/ads/unity/NativeUnityPlguin;Landroid/widget/RelativeLayout;)Landroid/widget/RelativeLayout;
iget-object v0, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object v0, v0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->activity:Landroid/app/Activity;
invoke-static {v0}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$100(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Landroid/app/Activity;
move-result-object v0
iget-object v1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object v1, v1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->mRelativeLayout:Landroid/widget/RelativeLayout;
invoke-static {v1}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$200(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Landroid/widget/RelativeLayout;
move-result-object v1
new-instance v2, Landroid/view/ViewGroup$LayoutParams;
const/4 v4, -0x1
invoke-direct {v2, v4, v4}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V
invoke-virtual {v0, v1, v2}, Landroid/app/Activity;->addContentView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
new-instance v0, Landroid/widget/FrameLayout;
iget-object v1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object v1, v1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->activity:Landroid/app/Activity;
invoke-static {v1}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$100(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Landroid/app/Activity;
move-result-object v1
invoke-direct {v0, v1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;
const/high16 v2, 0x43a00000 # 320.0f
mul-float v2, v2, p1
float-to-int v2, v2
int-to-float p2, p2
mul-float p2, p2, p1
float-to-int p1, p2
invoke-direct {v1, v2, p1}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V
invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
iget-object p1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object p1, p1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->mRelativeLayout:Landroid/widget/RelativeLayout;
invoke-static {p1}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$200(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Landroid/widget/RelativeLayout;
move-result-object p1
invoke-virtual {p1, v0}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V
iget-object p1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object p1, p1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->mRelativeLayout:Landroid/widget/RelativeLayout;
invoke-static {p1}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$200(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Landroid/widget/RelativeLayout;
move-result-object p1
invoke-virtual {p1, v3}, Landroid/widget/RelativeLayout;->setVisibility(I)V
iget-object p1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object p1, p1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->mTPNative:Lcom/tradplus/ads/open/nativead/TPNative;
invoke-static {p1}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$000(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Lcom/tradplus/ads/open/nativead/TPNative;
move-result-object p1
if-eqz p1, :cond_fd
iget-object p1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object p1, p1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->c:Lcom/tradplus/ads/unity/NativeUnityPlguin;
# getter for: Lcom/tradplus/ads/unity/NativeUnityPlguin;->mTPNative:Lcom/tradplus/ads/open/nativead/TPNative;
invoke-static {p1}, Lcom/tradplus/ads/unity/NativeUnityPlguin;->access$000(Lcom/tradplus/ads/unity/NativeUnityPlguin;)Lcom/tradplus/ads/open/nativead/TPNative;
move-result-object p1
invoke-virtual {p1}, Lcom/tradplus/ads/open/nativead/TPNative;->getNativeAd()Lcom/tradplus/ads/mgr/nativead/TPCustomNativeAd;
move-result-object p1
sget p2, Lcom/tradplus/ads/open/R$layout;->tp_native_ad_list_item:I
iget-object v1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object v1, v1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->b:Ljava/lang/String;
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_f6
const-string v1, ""
goto :goto_fa
:cond_f6
iget-object v1, p0, Lcom/tradplus/ads/unity/NativeUnityPlguin$2$1;->a:Lcom/tradplus/ads/unity/NativeUnityPlguin$2;
iget-object v1, v1, Lcom/tradplus/ads/unity/NativeUnityPlguin$2;->b:Ljava/lang/String;
:goto_fa
invoke-virtual {p1, v0, p2, v1}, Lcom/tradplus/ads/mgr/nativead/TPCustomNativeAd;->showAd(Landroid/view/ViewGroup;ILjava/lang/String;)V
:cond_fd
return-void
.end method