TradplusGDPRAuthActivity.smali

.class public Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;
.super Landroid/app/Activity;


# static fields
.field public static c:Lcom/tradplus/ads/mobileads/gdpr/ATGDPRAuthCallback; = null

.field private static final d:Ljava/lang/String; = "TradplusGDPRAuthActivity"


# instance fields
.field a:Ljava/lang/String;

.field b:Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;


# direct methods
.method static constructor <clinit>()V
    .registers 0

    return-void
.end method

.method public constructor <init>()V
    .registers 2

    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    const-string v0, "https://tradplusad.com/gdpr/PrivacyPolicySetting.html"

    iput-object v0, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->a:Ljava/lang/String;

    return-void
.end method

.method static synthetic a()Ljava/lang/String;
    .registers 1

    sget-object v0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->d:Ljava/lang/String;

    return-object v0
.end method


# virtual methods
.method public onBackPressed()V
    .registers 1

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 4

    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object p1

    const-string v0, "gdpr_url"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_15

    iput-object p1, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->a:Ljava/lang/String;

    :cond_15
    invoke-virtual {p0}, Landroid/app/Activity;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    invoke-virtual {p1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object p1

    iget p1, p1, Landroid/content/res/Configuration;->orientation:I

    const/4 v0, 0x2

    if-ne p1, v0, :cond_24

    const/4 p1, 0x6

    goto :goto_25

    :cond_24
    const/4 p1, 0x7

    :goto_25
    invoke-virtual {p0, p1}, Landroid/app/Activity;->setRequestedOrientation(I)V

    sget-object p1, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->d:Ljava/lang/String;

    const-string v0, "onCreate: "

    invoke-static {p1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    new-instance p1, Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;

    invoke-direct {p1, p0}, Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->b:Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;

    iget-object p1, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->b:Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;

    new-instance v0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity$1;

    invoke-direct {v0, p0}, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity$1;-><init>(Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;)V

    invoke-virtual {p1, v0}, Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;->setClickCallbackListener(Landroid/view/View$OnClickListener;)V

    sget-object p1, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->d:Ljava/lang/String;

    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "onCreate mPrivacyPolicyView: "

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

    iget-object v1, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->b:Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;

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

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

    move-result-object v0

    invoke-static {p1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    iget-object p1, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->b:Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;

    invoke-virtual {p0, p1}, Landroid/app/Activity;->setContentView(Landroid/view/View;)V

    iget-object p1, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->b:Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->a:Ljava/lang/String;

    invoke-virtual {p1, v0}, Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;->loadPolicyUrl(Ljava/lang/String;)V

    return-void
.end method

.method protected onDestroy()V
    .registers 2

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->b:Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;

    if-eqz v0, :cond_7

    invoke-virtual {v0}, Lcom/tradplus/ads/mobileads/gdpr/PrivacyPolicyView;->destory()V

    :cond_7
    const/4 v0, 0x0

    sput-object v0, Lcom/tradplus/ads/mobileads/gdpr/TradplusGDPRAuthActivity;->c:Lcom/tradplus/ads/mobileads/gdpr/ATGDPRAuthCallback;

    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    return-void
.end method