FacebookAdapter.smali
.class public final Lcom/google/ads/mediation/facebook/FacebookAdapter;
.super Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;
.source "FacebookAdapter.java"
# interfaces
.implements Lcom/google/android/gms/ads/mediation/MediationBannerAdapter;
.implements Lcom/google/android/gms/ads/mediation/MediationInterstitialAdapter;
.implements Lcom/google/android/gms/ads/mediation/MediationNativeAdapter;
# annotations
.annotation build Landroidx/annotation/Keep;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/ads/mediation/facebook/FacebookAdapter$e;,
Lcom/google/ads/mediation/facebook/FacebookAdapter$c;,
Lcom/google/ads/mediation/facebook/FacebookAdapter$g;,
Lcom/google/ads/mediation/facebook/FacebookAdapter$a;,
Lcom/google/ads/mediation/facebook/FacebookAdapter$f;,
Lcom/google/ads/mediation/facebook/FacebookAdapter$d;,
Lcom/google/ads/mediation/facebook/FacebookAdapter$b;
}
.end annotation
# static fields
.field public static final KEY_ID:Ljava/lang/String; = "id"
.field public static final KEY_SOCIAL_CONTEXT_ASSET:Ljava/lang/String; = "social_context"
.field private static final MAX_STAR_RATING:I = 0x5
# instance fields
.field private mAdView:Lcom/facebook/ads/AdView;
.field private mBannerListener:Lcom/google/android/gms/ads/mediation/MediationBannerListener;
.field private mInterstitialAd:Lcom/facebook/ads/InterstitialAd;
.field private mInterstitialListener:Lcom/google/android/gms/ads/mediation/MediationInterstitialListener;
.field private mIsImpressionRecorded:Z
.field private mMediaView:Lcom/facebook/ads/MediaView;
.field private mNativeAd:Lcom/facebook/ads/NativeAd;
.field private mNativeListener:Lcom/google/android/gms/ads/mediation/MediationNativeListener;
.field private mWrappedAdView:Landroid/widget/RelativeLayout;
# direct methods
.method public constructor <init>()V
.registers 1
.line 1
invoke-direct {p0}, Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;-><init>()V
return-void
.end method
.method static synthetic access$000(Lcom/google/ads/mediation/facebook/FacebookAdapter;Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/AdSize;Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
.registers 5
.line 1
invoke-direct {p0, p1, p2, p3, p4}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->createAndLoadBannerAd(Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/AdSize;Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
return-void
.end method
.method static synthetic access$100(Lcom/google/ads/mediation/facebook/FacebookAdapter;)Lcom/google/android/gms/ads/mediation/MediationBannerListener;
.registers 1
.line 1
iget-object p0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mBannerListener:Lcom/google/android/gms/ads/mediation/MediationBannerListener;
return-object p0
.end method
.method static synthetic access$1000(Lcom/google/ads/mediation/facebook/FacebookAdapter;)Z
.registers 1
.line 1
iget-boolean p0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mIsImpressionRecorded:Z
return p0
.end method
.method static synthetic access$1002(Lcom/google/ads/mediation/facebook/FacebookAdapter;Z)Z
.registers 2
.line 1
iput-boolean p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mIsImpressionRecorded:Z
return p1
.end method
.method static synthetic access$1100(Lcom/google/ads/mediation/facebook/FacebookAdapter;)Lcom/facebook/ads/MediaView;
.registers 1
.line 1
iget-object p0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mMediaView:Lcom/facebook/ads/MediaView;
return-object p0
.end method
.method static synthetic access$200(Lcom/google/ads/mediation/facebook/FacebookAdapter;Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
.registers 4
.line 1
invoke-direct {p0, p1, p2, p3}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->createAndLoadInterstitial(Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
return-void
.end method
.method static synthetic access$300(Lcom/google/ads/mediation/facebook/FacebookAdapter;)Lcom/google/android/gms/ads/mediation/MediationInterstitialListener;
.registers 1
.line 1
iget-object p0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialListener:Lcom/google/android/gms/ads/mediation/MediationInterstitialListener;
return-object p0
.end method
.method static synthetic access$400(Lcom/google/ads/mediation/facebook/FacebookAdapter;Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/mediation/NativeMediationAdRequest;)V
.registers 4
.line 1
invoke-direct {p0, p1, p2, p3}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->createAndLoadNativeAd(Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/mediation/NativeMediationAdRequest;)V
return-void
.end method
.method static synthetic access$500(Lcom/google/ads/mediation/facebook/FacebookAdapter;)Lcom/google/android/gms/ads/mediation/MediationNativeListener;
.registers 1
.line 1
iget-object p0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeListener:Lcom/google/android/gms/ads/mediation/MediationNativeListener;
return-object p0
.end method
.method static synthetic access$700(Lcom/google/ads/mediation/facebook/FacebookAdapter;Lcom/facebook/ads/AdError;)I
.registers 2
.line 1
invoke-direct {p0, p1}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->convertErrorCode(Lcom/facebook/ads/AdError;)I
move-result p0
return p0
.end method
.method private buildAdRequest(Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
.registers 3
if-eqz p1, :cond_e
.line 1
invoke-interface {p1}, Lcom/google/android/gms/ads/mediation/MediationAdRequest;->taggedForChildDirectedTreatment()I
move-result p1
const/4 v0, 0x1
if-ne p1, v0, :cond_a
goto :goto_b
:cond_a
const/4 v0, 0x0
:goto_b
invoke-static {v0}, Lcom/facebook/ads/AdSettings;->setIsChildDirected(Z)V
:cond_e
return-void
.end method
.method private convertErrorCode(Lcom/facebook/ads/AdError;)I
.registers 4
const/4 v0, 0x0
if-nez p1, :cond_4
return v0
.line 1
:cond_4
invoke-virtual {p1}, Lcom/facebook/ads/AdError;->getErrorCode()I
move-result p1
const/16 v1, 0x7d0
if-eq p1, v1, :cond_14
packed-switch p1, :pswitch_data_16
return v0
:pswitch_10
const/4 p1, 0x1
return p1
:pswitch_12
const/4 p1, 0x3
return p1
:cond_14
:pswitch_14
const/4 p1, 0x2
return p1
:pswitch_data_16
.packed-switch 0x3e8
:pswitch_14
:pswitch_12
:pswitch_10
.end packed-switch
.end method
.method private createAndLoadBannerAd(Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/AdSize;Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
.registers 7
.line 1
invoke-direct {p0, p1, p3}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->getAdSize(Landroid/content/Context;Lcom/google/android/gms/ads/AdSize;)Lcom/facebook/ads/AdSize;
move-result-object v0
.line 2
new-instance v1, Lcom/facebook/ads/AdView;
invoke-direct {v1, p1, p2, v0}, Lcom/facebook/ads/AdView;-><init>(Landroid/content/Context;Ljava/lang/String;Lcom/facebook/ads/AdSize;)V
iput-object v1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mAdView:Lcom/facebook/ads/AdView;
.line 3
iget-object p2, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mAdView:Lcom/facebook/ads/AdView;
new-instance v0, Lcom/google/ads/mediation/facebook/FacebookAdapter$b;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/google/ads/mediation/facebook/FacebookAdapter$b;-><init>(Lcom/google/ads/mediation/facebook/FacebookAdapter;Lcom/google/ads/mediation/facebook/a;)V
invoke-virtual {p2, v0}, Lcom/facebook/ads/AdView;->setAdListener(Lcom/facebook/ads/AdListener;)V
.line 4
invoke-direct {p0, p4}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->buildAdRequest(Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
.line 5
new-instance p2, Landroid/widget/RelativeLayout$LayoutParams;
.line 6
invoke-virtual {p3, p1}, Lcom/google/android/gms/ads/AdSize;->getWidthInPixels(Landroid/content/Context;)I
move-result p4
invoke-virtual {p3, p1}, Lcom/google/android/gms/ads/AdSize;->getHeightInPixels(Landroid/content/Context;)I
move-result p3
invoke-direct {p2, p4, p3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V
.line 7
new-instance p3, Landroid/widget/RelativeLayout;
invoke-direct {p3, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V
iput-object p3, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mWrappedAdView:Landroid/widget/RelativeLayout;
.line 8
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mAdView:Lcom/facebook/ads/AdView;
invoke-virtual {p1, p2}, Landroid/widget/RelativeLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
.line 9
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mWrappedAdView:Landroid/widget/RelativeLayout;
iget-object p2, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mAdView:Lcom/facebook/ads/AdView;
invoke-virtual {p1, p2}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V
.line 10
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string p2, "ADMOB_"
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {}, Lcom/google/android/gms/ads/MobileAds;->getVersionString()Ljava/lang/String;
move-result-object p2
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Lcom/facebook/ads/AdSettings;->setMediationService(Ljava/lang/String;)V
.line 11
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mAdView:Lcom/facebook/ads/AdView;
invoke-virtual {p1}, Lcom/facebook/ads/AdView;->loadAd()V
return-void
.end method
.method private createAndLoadInterstitial(Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
.registers 5
.line 1
new-instance v0, Lcom/facebook/ads/InterstitialAd;
invoke-direct {v0, p1, p2}, Lcom/facebook/ads/InterstitialAd;-><init>(Landroid/content/Context;Ljava/lang/String;)V
iput-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialAd:Lcom/facebook/ads/InterstitialAd;
.line 2
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialAd:Lcom/facebook/ads/InterstitialAd;
new-instance p2, Lcom/google/ads/mediation/facebook/FacebookAdapter$d;
const/4 v0, 0x0
invoke-direct {p2, p0, v0}, Lcom/google/ads/mediation/facebook/FacebookAdapter$d;-><init>(Lcom/google/ads/mediation/facebook/FacebookAdapter;Lcom/google/ads/mediation/facebook/a;)V
invoke-virtual {p1, p2}, Lcom/facebook/ads/InterstitialAd;->setAdListener(Lcom/facebook/ads/InterstitialAdListener;)V
.line 3
invoke-direct {p0, p3}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->buildAdRequest(Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
.line 4
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string p2, "ADMOB_"
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {}, Lcom/google/android/gms/ads/MobileAds;->getVersionString()Ljava/lang/String;
move-result-object p2
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Lcom/facebook/ads/AdSettings;->setMediationService(Ljava/lang/String;)V
.line 5
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialAd:Lcom/facebook/ads/InterstitialAd;
invoke-virtual {p1}, Lcom/facebook/ads/InterstitialAd;->loadAd()V
return-void
.end method
.method private createAndLoadNativeAd(Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/mediation/NativeMediationAdRequest;)V
.registers 5
.line 1
new-instance v0, Lcom/facebook/ads/MediaView;
invoke-direct {v0, p1}, Lcom/facebook/ads/MediaView;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mMediaView:Lcom/facebook/ads/MediaView;
.line 2
new-instance v0, Lcom/facebook/ads/NativeAd;
invoke-direct {v0, p1, p2}, Lcom/facebook/ads/NativeAd;-><init>(Landroid/content/Context;Ljava/lang/String;)V
iput-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeAd:Lcom/facebook/ads/NativeAd;
.line 3
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeAd:Lcom/facebook/ads/NativeAd;
new-instance p2, Lcom/google/ads/mediation/facebook/FacebookAdapter$f;
const/4 v0, 0x0
invoke-direct {p2, p0, p1, p3, v0}, Lcom/google/ads/mediation/facebook/FacebookAdapter$f;-><init>(Lcom/google/ads/mediation/facebook/FacebookAdapter;Lcom/facebook/ads/NativeAd;Lcom/google/android/gms/ads/mediation/NativeMediationAdRequest;Lcom/google/ads/mediation/facebook/a;)V
invoke-virtual {p1, p2}, Lcom/facebook/ads/NativeAd;->setAdListener(Lcom/facebook/ads/NativeAdListener;)V
.line 4
invoke-direct {p0, p3}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->buildAdRequest(Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
.line 5
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string p2, "ADMOB_"
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {}, Lcom/google/android/gms/ads/MobileAds;->getVersionString()Ljava/lang/String;
move-result-object p2
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-static {p1}, Lcom/facebook/ads/AdSettings;->setMediationService(Ljava/lang/String;)V
.line 6
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeAd:Lcom/facebook/ads/NativeAd;
invoke-virtual {p1}, Lcom/facebook/ads/NativeAdBase;->loadAd()V
return-void
.end method
.method private getAdSize(Landroid/content/Context;Lcom/google/android/gms/ads/AdSize;)Lcom/facebook/ads/AdSize;
.registers 5
.line 1
invoke-virtual {p2}, Lcom/google/android/gms/ads/AdSize;->getWidth()I
move-result v0
sget-object v1, Lcom/facebook/ads/AdSize;->BANNER_320_50:Lcom/facebook/ads/AdSize;
invoke-virtual {v1}, Lcom/facebook/ads/AdSize;->getWidth()I
move-result v1
if-ne v0, v1, :cond_1b
.line 2
invoke-virtual {p2}, Lcom/google/android/gms/ads/AdSize;->getHeight()I
move-result v0
sget-object v1, Lcom/facebook/ads/AdSize;->BANNER_320_50:Lcom/facebook/ads/AdSize;
invoke-virtual {v1}, Lcom/facebook/ads/AdSize;->getHeight()I
move-result v1
if-ne v0, v1, :cond_1b
.line 3
sget-object p1, Lcom/facebook/ads/AdSize;->BANNER_320_50:Lcom/facebook/ads/AdSize;
return-object p1
.line 4
:cond_1b
invoke-virtual {p2, p1}, Lcom/google/android/gms/ads/AdSize;->getHeightInPixels(Landroid/content/Context;)I
move-result p1
invoke-direct {p0, p1}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->pixelToDip(I)I
move-result p1
.line 5
sget-object p2, Lcom/facebook/ads/AdSize;->BANNER_HEIGHT_50:Lcom/facebook/ads/AdSize;
invoke-virtual {p2}, Lcom/facebook/ads/AdSize;->getHeight()I
move-result p2
if-ne p1, p2, :cond_2e
.line 6
sget-object p1, Lcom/facebook/ads/AdSize;->BANNER_HEIGHT_50:Lcom/facebook/ads/AdSize;
return-object p1
.line 7
:cond_2e
sget-object p2, Lcom/facebook/ads/AdSize;->BANNER_HEIGHT_90:Lcom/facebook/ads/AdSize;
invoke-virtual {p2}, Lcom/facebook/ads/AdSize;->getHeight()I
move-result p2
if-ne p1, p2, :cond_39
.line 8
sget-object p1, Lcom/facebook/ads/AdSize;->BANNER_HEIGHT_90:Lcom/facebook/ads/AdSize;
return-object p1
.line 9
:cond_39
sget-object p2, Lcom/facebook/ads/AdSize;->RECTANGLE_HEIGHT_250:Lcom/facebook/ads/AdSize;
invoke-virtual {p2}, Lcom/facebook/ads/AdSize;->getHeight()I
move-result p2
if-ne p1, p2, :cond_44
.line 10
sget-object p1, Lcom/facebook/ads/AdSize;->RECTANGLE_HEIGHT_250:Lcom/facebook/ads/AdSize;
return-object p1
:cond_44
const/4 p1, 0x0
return-object p1
.end method
.method private pixelToDip(I)I
.registers 3
.line 1
invoke-static {}, Landroid/content/res/Resources;->getSystem()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v0
int-to-float p1, p1
.line 2
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
div-float/2addr p1, v0
invoke-static {p1}, Ljava/lang/Math;->round(F)I
move-result p1
return p1
.end method
# virtual methods
.method public getBannerView()Landroid/view/View;
.registers 2
.line 1
iget-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mWrappedAdView:Landroid/widget/RelativeLayout;
return-object v0
.end method
.method public onDestroy()V
.registers 2
.line 1
iget-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mAdView:Lcom/facebook/ads/AdView;
if-eqz v0, :cond_7
.line 2
invoke-virtual {v0}, Lcom/facebook/ads/AdView;->destroy()V
.line 3
:cond_7
iget-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialAd:Lcom/facebook/ads/InterstitialAd;
if-eqz v0, :cond_e
.line 4
invoke-virtual {v0}, Lcom/facebook/ads/InterstitialAd;->destroy()V
.line 5
:cond_e
iget-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeAd:Lcom/facebook/ads/NativeAd;
if-eqz v0, :cond_1a
.line 6
invoke-virtual {v0}, Lcom/facebook/ads/NativeAdBase;->unregisterView()V
.line 7
iget-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeAd:Lcom/facebook/ads/NativeAd;
invoke-virtual {v0}, Lcom/facebook/ads/NativeAdBase;->destroy()V
.line 8
:cond_1a
iget-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mMediaView:Lcom/facebook/ads/MediaView;
if-eqz v0, :cond_21
.line 9
invoke-virtual {v0}, Lcom/facebook/ads/MediaView;->destroy()V
:cond_21
return-void
.end method
.method public onPause()V
.registers 1
return-void
.end method
.method public onResume()V
.registers 1
return-void
.end method
.method public requestBannerAd(Landroid/content/Context;Lcom/google/android/gms/ads/mediation/MediationBannerListener;Landroid/os/Bundle;Lcom/google/android/gms/ads/AdSize;Lcom/google/android/gms/ads/mediation/MediationAdRequest;Landroid/os/Bundle;)V
.registers 13
.line 1
iput-object p2, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mBannerListener:Lcom/google/android/gms/ads/mediation/MediationBannerListener;
.line 2
invoke-static {p1, p3}, Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;->isValidRequestParameters(Landroid/content/Context;Landroid/os/Bundle;)Z
move-result p2
const/4 p6, 0x1
if-nez p2, :cond_f
.line 3
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mBannerListener:Lcom/google/android/gms/ads/mediation/MediationBannerListener;
invoke-interface {p1, p0, p6}, Lcom/google/android/gms/ads/mediation/MediationBannerListener;->onAdFailedToLoad(Lcom/google/android/gms/ads/mediation/MediationBannerAdapter;I)V
return-void
:cond_f
if-nez p4, :cond_1e
.line 4
sget-object p1, Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;->TAG:Ljava/lang/String;
const-string p2, "Fail to request banner ad, adSize is null"
invoke-static {p1, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 5
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mBannerListener:Lcom/google/android/gms/ads/mediation/MediationBannerListener;
invoke-interface {p1, p0, p6}, Lcom/google/android/gms/ads/mediation/MediationBannerListener;->onAdFailedToLoad(Lcom/google/android/gms/ads/mediation/MediationBannerAdapter;I)V
return-void
.line 6
:cond_1e
invoke-direct {p0, p1, p4}, Lcom/google/ads/mediation/facebook/FacebookAdapter;->getAdSize(Landroid/content/Context;Lcom/google/android/gms/ads/AdSize;)Lcom/facebook/ads/AdSize;
move-result-object p2
if-nez p2, :cond_4a
.line 7
sget-object p1, Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;->TAG:Ljava/lang/String;
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string p3, "The input ad size "
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 8
invoke-virtual {p4}, Lcom/google/android/gms/ads/AdSize;->toString()Ljava/lang/String;
move-result-object p3
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p3, " is not supported at this moment."
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
.line 9
invoke-static {p1, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 10
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mBannerListener:Lcom/google/android/gms/ads/mediation/MediationBannerListener;
const/4 p2, 0x3
invoke-interface {p1, p0, p2}, Lcom/google/android/gms/ads/mediation/MediationBannerListener;->onAdFailedToLoad(Lcom/google/android/gms/ads/mediation/MediationBannerAdapter;I)V
return-void
:cond_4a
const-string p2, "pubid"
.line 11
invoke-virtual {p3, p2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
.line 12
invoke-static {}, Lcom/google/ads/mediation/facebook/h;->a()Lcom/google/ads/mediation/facebook/h;
move-result-object p3
new-instance p6, Lcom/google/ads/mediation/facebook/a;
move-object v0, p6
move-object v1, p0
move-object v2, p1
move-object v3, p2
move-object v4, p4
move-object v5, p5
invoke-direct/range {v0 .. v5}, Lcom/google/ads/mediation/facebook/a;-><init>(Lcom/google/ads/mediation/facebook/FacebookAdapter;Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/AdSize;Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
invoke-virtual {p3, p1, p2, p6}, Lcom/google/ads/mediation/facebook/h;->a(Landroid/content/Context;Ljava/lang/String;Lcom/google/ads/mediation/facebook/h$a;)V
return-void
.end method
.method public requestInterstitialAd(Landroid/content/Context;Lcom/google/android/gms/ads/mediation/MediationInterstitialListener;Landroid/os/Bundle;Lcom/google/android/gms/ads/mediation/MediationAdRequest;Landroid/os/Bundle;)V
.registers 6
.line 1
iput-object p2, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialListener:Lcom/google/android/gms/ads/mediation/MediationInterstitialListener;
.line 2
invoke-static {p1, p3}, Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;->isValidRequestParameters(Landroid/content/Context;Landroid/os/Bundle;)Z
move-result p2
if-nez p2, :cond_f
.line 3
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialListener:Lcom/google/android/gms/ads/mediation/MediationInterstitialListener;
const/4 p2, 0x1
invoke-interface {p1, p0, p2}, Lcom/google/android/gms/ads/mediation/MediationInterstitialListener;->onAdFailedToLoad(Lcom/google/android/gms/ads/mediation/MediationInterstitialAdapter;I)V
return-void
:cond_f
const-string p2, "pubid"
.line 4
invoke-virtual {p3, p2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
.line 5
invoke-static {}, Lcom/google/ads/mediation/facebook/h;->a()Lcom/google/ads/mediation/facebook/h;
move-result-object p3
new-instance p5, Lcom/google/ads/mediation/facebook/b;
invoke-direct {p5, p0, p1, p2, p4}, Lcom/google/ads/mediation/facebook/b;-><init>(Lcom/google/ads/mediation/facebook/FacebookAdapter;Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/mediation/MediationAdRequest;)V
invoke-virtual {p3, p1, p2, p5}, Lcom/google/ads/mediation/facebook/h;->a(Landroid/content/Context;Ljava/lang/String;Lcom/google/ads/mediation/facebook/h$a;)V
return-void
.end method
.method public requestNativeAd(Landroid/content/Context;Lcom/google/android/gms/ads/mediation/MediationNativeListener;Landroid/os/Bundle;Lcom/google/android/gms/ads/mediation/NativeMediationAdRequest;Landroid/os/Bundle;)V
.registers 6
.line 1
iput-object p2, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeListener:Lcom/google/android/gms/ads/mediation/MediationNativeListener;
.line 2
invoke-static {p1, p3}, Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;->isValidRequestParameters(Landroid/content/Context;Landroid/os/Bundle;)Z
move-result p2
const/4 p5, 0x1
if-nez p2, :cond_f
.line 3
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeListener:Lcom/google/android/gms/ads/mediation/MediationNativeListener;
invoke-interface {p1, p0, p5}, Lcom/google/android/gms/ads/mediation/MediationNativeListener;->onAdFailedToLoad(Lcom/google/android/gms/ads/mediation/MediationNativeAdapter;I)V
return-void
.line 4
:cond_f
invoke-interface {p4}, Lcom/google/android/gms/ads/mediation/NativeMediationAdRequest;->isAppInstallAdRequested()Z
move-result p2
if-eqz p2, :cond_2f
.line 5
invoke-interface {p4}, Lcom/google/android/gms/ads/mediation/NativeMediationAdRequest;->isContentAdRequested()Z
move-result p2
if-nez p2, :cond_1c
goto :goto_2f
:cond_1c
const-string p2, "pubid"
.line 6
invoke-virtual {p3, p2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
.line 7
invoke-static {}, Lcom/google/ads/mediation/facebook/h;->a()Lcom/google/ads/mediation/facebook/h;
move-result-object p3
new-instance p5, Lcom/google/ads/mediation/facebook/c;
invoke-direct {p5, p0, p1, p2, p4}, Lcom/google/ads/mediation/facebook/c;-><init>(Lcom/google/ads/mediation/facebook/FacebookAdapter;Landroid/content/Context;Ljava/lang/String;Lcom/google/android/gms/ads/mediation/NativeMediationAdRequest;)V
invoke-virtual {p3, p1, p2, p5}, Lcom/google/ads/mediation/facebook/h;->a(Landroid/content/Context;Ljava/lang/String;Lcom/google/ads/mediation/facebook/h$a;)V
return-void
.line 8
:cond_2f
:goto_2f
sget-object p1, Lcom/google/ads/mediation/facebook/FacebookMediationAdapter;->TAG:Ljava/lang/String;
const-string p2, "Failed to request native ad. Both app install and content ad should be requested"
invoke-static {p1, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 9
iget-object p1, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mNativeListener:Lcom/google/android/gms/ads/mediation/MediationNativeListener;
invoke-interface {p1, p0, p5}, Lcom/google/android/gms/ads/mediation/MediationNativeListener;->onAdFailedToLoad(Lcom/google/android/gms/ads/mediation/MediationNativeAdapter;I)V
return-void
.end method
.method public showInterstitial()V
.registers 2
.line 1
iget-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialAd:Lcom/facebook/ads/InterstitialAd;
invoke-virtual {v0}, Lcom/facebook/ads/InterstitialAd;->isAdLoaded()Z
move-result v0
if-eqz v0, :cond_d
.line 2
iget-object v0, p0, Lcom/google/ads/mediation/facebook/FacebookAdapter;->mInterstitialAd:Lcom/facebook/ads/InterstitialAd;
invoke-virtual {v0}, Lcom/facebook/ads/InterstitialAd;->show()Z
:cond_d
return-void
.end method