GooglePlayServicesNative$2.smali

.class Lcom/tradplus/ads/google/GooglePlayServicesNative$2;
.super Ljava/lang/Object;
.source "GooglePlayServicesNative.java"

# interfaces
.implements Lcom/google/android/gms/ads/formats/UnifiedNativeAd$OnUnifiedNativeAdLoadedListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/tradplus/ads/google/GooglePlayServicesNative;->loadAd(Landroid/content/Context;Ljava/lang/String;Ljava/util/Map;)V
.end annotation

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


# instance fields
.field final synthetic this$0:Lcom/tradplus/ads/google/GooglePlayServicesNative;

.field final synthetic val$context:Landroid/content/Context;


# direct methods
.method constructor <init>(Lcom/tradplus/ads/google/GooglePlayServicesNative;Landroid/content/Context;)V
    .registers 3

    .line 1
    iput-object p1, p0, Lcom/tradplus/ads/google/GooglePlayServicesNative$2;->this$0:Lcom/tradplus/ads/google/GooglePlayServicesNative;

    iput-object p2, p0, Lcom/tradplus/ads/google/GooglePlayServicesNative$2;->val$context:Landroid/content/Context;

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

    return-void
.end method


# virtual methods
.method public onUnifiedNativeAdLoaded(Lcom/google/android/gms/ads/formats/UnifiedNativeAd;)V
    .registers 5

    .line 1
    iget-object v0, p0, Lcom/tradplus/ads/google/GooglePlayServicesNative$2;->this$0:Lcom/tradplus/ads/google/GooglePlayServicesNative;

    # invokes: Lcom/tradplus/ads/google/GooglePlayServicesNative;->isValidUnifiedAd(Lcom/google/android/gms/ads/formats/UnifiedNativeAd;)Z
    invoke-static {v0, p1}, Lcom/tradplus/ads/google/GooglePlayServicesNative;->access$100(Lcom/tradplus/ads/google/GooglePlayServicesNative;Lcom/google/android/gms/ads/formats/UnifiedNativeAd;)Z

    move-result v0

    if-nez v0, :cond_37

    .line 2
    iget-object p1, p0, Lcom/tradplus/ads/google/GooglePlayServicesNative$2;->this$0:Lcom/tradplus/ads/google/GooglePlayServicesNative;

    iget-object p1, p1, Lcom/tradplus/ads/base/adapter/TPBaseAdapter;->mLoadAdapterListener:Lcom/tradplus/ads/base/adapter/TPLoadAdapterListener;

    if-eqz p1, :cond_13

    .line 3
    sget-object v0, Lcom/tradplus/ads/mobileads/TradPlusErrorCode;->NETWORK_NO_FILL:Lcom/tradplus/ads/mobileads/TradPlusErrorCode;

    invoke-interface {p1, v0}, Lcom/tradplus/ads/base/adapter/TPLoadAdapterListener;->loadAdapterLoadFailed(Lcom/tradplus/ads/mobileads/TradPlusErrorCode;)V

    .line 4
    :cond_13
    new-instance p1, Ljava/lang/StringBuilder;

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

    iget-object v0, p0, Lcom/tradplus/ads/google/GooglePlayServicesNative$2;->this$0:Lcom/tradplus/ads/google/GooglePlayServicesNative;

    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

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

    sget-object v0, Lcom/tradplus/ads/mobileads/TradPlusErrorCode;->NETWORK_NO_FILL:Lcom/tradplus/ads/mobileads/TradPlusErrorCode;

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

    sget-object v0, Lcom/tradplus/ads/mobileads/TradPlusErrorCode;->NETWORK_NO_FILL:Lcom/tradplus/ads/mobileads/TradPlusErrorCode;

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

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

    move-result-object p1

    invoke-static {p1}, Lcom/tradplus/ads/common/util/LogUtil;->show(Ljava/lang/String;)V

    return-void

    .line 5
    :cond_37
    iget-object v0, p0, Lcom/tradplus/ads/google/GooglePlayServicesNative$2;->this$0:Lcom/tradplus/ads/google/GooglePlayServicesNative;

    new-instance v1, Lcom/tradplus/ads/google/GoogleNativeAd;

    iget-object v2, p0, Lcom/tradplus/ads/google/GooglePlayServicesNative$2;->val$context:Landroid/content/Context;

    invoke-direct {v1, v2, p1}, Lcom/tradplus/ads/google/GoogleNativeAd;-><init>(Landroid/content/Context;Lcom/google/android/gms/ads/formats/UnifiedNativeAd;)V

    # setter for: Lcom/tradplus/ads/google/GooglePlayServicesNative;->mGoogleNativeAd:Lcom/tradplus/ads/google/GoogleNativeAd;
    invoke-static {v0, v1}, Lcom/tradplus/ads/google/GooglePlayServicesNative;->access$002(Lcom/tradplus/ads/google/GooglePlayServicesNative;Lcom/tradplus/ads/google/GoogleNativeAd;)Lcom/tradplus/ads/google/GoogleNativeAd;

    .line 6
    iget-object p1, p0, Lcom/tradplus/ads/google/GooglePlayServicesNative$2;->this$0:Lcom/tradplus/ads/google/GooglePlayServicesNative;

    iget-object v0, p1, Lcom/tradplus/ads/base/adapter/TPBaseAdapter;->mLoadAdapterListener:Lcom/tradplus/ads/base/adapter/TPLoadAdapterListener;

    if-eqz v0, :cond_50

    .line 7
    # getter for: Lcom/tradplus/ads/google/GooglePlayServicesNative;->mGoogleNativeAd:Lcom/tradplus/ads/google/GoogleNativeAd;
    invoke-static {p1}, Lcom/tradplus/ads/google/GooglePlayServicesNative;->access$000(Lcom/tradplus/ads/google/GooglePlayServicesNative;)Lcom/tradplus/ads/google/GoogleNativeAd;

    move-result-object p1

    invoke-interface {v0, p1}, Lcom/tradplus/ads/base/adapter/TPLoadAdapterListener;->loadAdapterLoaded(Lcom/tradplus/ads/base/bean/TPBaseAd;)V

    :cond_50
    return-void
.end method