ik.smali

.class public Lcom/google/obf/ik;
.super Lcom/google/obf/ij;
.source "IMASDK"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/google/obf/ik$b;,
        Lcom/google/obf/ik$a;
    }
.end annotation


# static fields
.field private static e:Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;

.field private static f:Ljava/util/concurrent/CountDownLatch;

.field private static volatile g:Z


# instance fields
.field private h:Z


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

    .line 46
    new-instance v0, Ljava/util/concurrent/CountDownLatch;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V

    sput-object v0, Lcom/google/obf/ik;->f:Ljava/util/concurrent/CountDownLatch;

    return-void
.end method

.method protected constructor <init>(Landroid/content/Context;Lcom/google/obf/in;Lcom/google/obf/io;Z)V
    .registers 5

    .line 10
    invoke-direct {p0, p1, p2, p3}, Lcom/google/obf/ij;-><init>(Landroid/content/Context;Lcom/google/obf/in;Lcom/google/obf/io;)V

    .line 11
    iput-boolean p4, p0, Lcom/google/obf/ik;->h:Z

    return-void
.end method

.method static synthetic a(Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;)Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;
    .registers 1

    .line 42
    sput-object p0, Lcom/google/obf/ik;->e:Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;

    return-object p0
.end method

.method public static a(Ljava/lang/String;Landroid/content/Context;)Lcom/google/obf/ik;
    .registers 3

    const/4 v0, 0x1

    .line 1
    invoke-static {p0, p1, v0}, Lcom/google/obf/ik;->a(Ljava/lang/String;Landroid/content/Context;Z)Lcom/google/obf/ik;

    move-result-object p0

    return-object p0
.end method

.method public static a(Ljava/lang/String;Landroid/content/Context;Z)Lcom/google/obf/ik;
    .registers 6

    .line 2
    new-instance v0, Lcom/google/obf/if;

    invoke-direct {v0}, Lcom/google/obf/if;-><init>()V

    .line 3
    invoke-static {p0, p1, v0}, Lcom/google/obf/ik;->a(Ljava/lang/String;Landroid/content/Context;Lcom/google/obf/in;)V

    if-eqz p2, :cond_23

    .line 5
    const-class p0, Lcom/google/obf/ik;

    monitor-enter p0

    .line 6
    :try_start_d
    sget-object v1, Lcom/google/obf/ik;->e:Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;

    if-nez v1, :cond_1e

    .line 7
    new-instance v1, Ljava/lang/Thread;

    new-instance v2, Lcom/google/obf/ik$b;

    invoke-direct {v2, p1}, Lcom/google/obf/ik$b;-><init>(Landroid/content/Context;)V

    invoke-direct {v1, v2}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    .line 8
    :cond_1e
    monitor-exit p0

    goto :goto_23

    :catchall_20
    move-exception p1

    monitor-exit p0
    :try_end_22
    .catchall {:try_start_d .. :try_end_22} :catchall_20

    throw p1

    .line 9
    :cond_23
    :goto_23
    new-instance p0, Lcom/google/obf/ik;

    new-instance v1, Lcom/google/obf/iq;

    const/16 v2, 0xef

    invoke-direct {v1, v2}, Lcom/google/obf/iq;-><init>(I)V

    invoke-direct {p0, p1, v0, v1, p2}, Lcom/google/obf/ik;-><init>(Landroid/content/Context;Lcom/google/obf/in;Lcom/google/obf/io;Z)V

    return-object p0
.end method

.method static synthetic a(Z)Z
    .registers 1

    .line 43
    sput-boolean p0, Lcom/google/obf/ik;->g:Z

    return p0
.end method

.method static synthetic f()Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;
    .registers 1

    .line 41
    sget-object v0, Lcom/google/obf/ik;->e:Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;

    return-object v0
.end method

.method static synthetic g()Ljava/util/concurrent/CountDownLatch;
    .registers 1

    .line 44
    sget-object v0, Lcom/google/obf/ik;->f:Ljava/util/concurrent/CountDownLatch;

    return-object v0
.end method


# virtual methods
.method protected b(Landroid/content/Context;)V
    .registers 7

    .line 26
    invoke-super {p0, p1}, Lcom/google/obf/ij;->b(Landroid/content/Context;)V

    .line 27
    :try_start_3
    sget-boolean v0, Lcom/google/obf/ik;->g:Z

    const/16 v1, 0x18

    if-nez v0, :cond_33

    iget-boolean v0, p0, Lcom/google/obf/ik;->h:Z

    if-nez v0, :cond_e

    goto :goto_33

    .line 29
    :cond_e
    invoke-virtual {p0}, Lcom/google/obf/ik;->e()Lcom/google/obf/ik$a;

    move-result-object p1

    .line 30
    invoke-virtual {p1}, Lcom/google/obf/ik$a;->a()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_3a

    const/16 v2, 0x1c

    .line 32
    invoke-virtual {p1}, Lcom/google/obf/ik$a;->b()Z

    move-result p1

    if-eqz p1, :cond_23

    const-wide/16 v3, 0x1

    goto :goto_25

    :cond_23
    const-wide/16 v3, 0x0

    :goto_25
    invoke-virtual {p0, v2, v3, v4}, Lcom/google/obf/ik;->a(IJ)V

    const/16 p1, 0x1a

    const-wide/16 v2, 0x5

    .line 33
    invoke-virtual {p0, p1, v2, v3}, Lcom/google/obf/ik;->a(IJ)V

    .line 34
    invoke-virtual {p0, v1, v0}, Lcom/google/obf/ik;->a(ILjava/lang/String;)V

    goto :goto_3a

    .line 28
    :cond_33
    :goto_33
    invoke-static {p1}, Lcom/google/obf/ik;->d(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p0, v1, p1}, Lcom/google/obf/ik;->a(ILjava/lang/String;)V
    :try_end_3a
    .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3a} :catch_3a
    .catch Lcom/google/obf/ij$a; {:try_start_3 .. :try_end_3a} :catch_3a

    :catch_3a
    :cond_3a
    :goto_3a
    return-void
.end method

.method e()Lcom/google/obf/ik$a;
    .registers 7
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 13
    :try_start_2
    sget-object v2, Lcom/google/obf/ik;->f:Ljava/util/concurrent/CountDownLatch;

    const-wide/16 v3, 0x2

    sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-virtual {v2, v3, v4, v5}, Ljava/util/concurrent/CountDownLatch;->await(JLjava/util/concurrent/TimeUnit;)Z

    move-result v2

    if-nez v2, :cond_14

    .line 15
    new-instance v2, Lcom/google/obf/ik$a;

    invoke-direct {v2, p0, v1, v0}, Lcom/google/obf/ik$a;-><init>(Lcom/google/obf/ik;Ljava/lang/String;Z)V
    :try_end_13
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_13} :catch_3e

    return-object v2

    .line 19
    :cond_14
    const-class v2, Lcom/google/obf/ik;

    monitor-enter v2

    .line 20
    :try_start_17
    sget-object v3, Lcom/google/obf/ik;->e:Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;

    if-nez v3, :cond_22

    .line 21
    new-instance v3, Lcom/google/obf/ik$a;

    invoke-direct {v3, p0, v1, v0}, Lcom/google/obf/ik$a;-><init>(Lcom/google/obf/ik;Ljava/lang/String;Z)V

    monitor-exit v2

    return-object v3

    .line 22
    :cond_22
    sget-object v0, Lcom/google/obf/ik;->e:Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;

    invoke-virtual {v0}, Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;->getInfo()Lcom/google/android/gms/ads/identifier/AdvertisingIdClient$Info;

    move-result-object v0

    .line 23
    monitor-exit v2
    :try_end_29
    .catchall {:try_start_17 .. :try_end_29} :catchall_3b

    .line 24
    invoke-virtual {v0}, Lcom/google/android/gms/ads/identifier/AdvertisingIdClient$Info;->getId()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p0, v1}, Lcom/google/obf/ik;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 25
    new-instance v2, Lcom/google/obf/ik$a;

    invoke-virtual {v0}, Lcom/google/android/gms/ads/identifier/AdvertisingIdClient$Info;->isLimitAdTrackingEnabled()Z

    move-result v0

    invoke-direct {v2, p0, v1, v0}, Lcom/google/obf/ik$a;-><init>(Lcom/google/obf/ik;Ljava/lang/String;Z)V

    return-object v2

    :catchall_3b
    move-exception v0

    .line 23
    :try_start_3c
    monitor-exit v2
    :try_end_3d
    .catchall {:try_start_3c .. :try_end_3d} :catchall_3b

    throw v0

    .line 18
    :catch_3e
    new-instance v2, Lcom/google/obf/ik$a;

    invoke-direct {v2, p0, v1, v0}, Lcom/google/obf/ik$a;-><init>(Lcom/google/obf/ik;Ljava/lang/String;Z)V

    return-object v2
.end method