i.smali

.class public final Lcom/proxy/ad/adbusiness/c/i;
.super Lcom/proxy/ad/adbusiness/d;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/proxy/ad/adbusiness/c/i$a;
    }
.end annotation


# instance fields
.field c:I

.field d:Ljava/lang/String;

.field private final e:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/proxy/ad/adbusiness/c/i$a;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .registers 3

    invoke-direct {p0, p1, p2}, Lcom/proxy/ad/adbusiness/d;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    new-instance p1, Ljava/util/ArrayList;

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

    iput-object p1, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-virtual {p0}, Lcom/proxy/ad/adbusiness/c/i;->b()V

    return-void
.end method


# virtual methods
.method public final a()Lorg/json/JSONObject;
    .registers 5

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    monitor-enter p0

    :try_start_6
    new-instance v1, Lorg/json/JSONArray;

    invoke-direct {v1}, Lorg/json/JSONArray;-><init>()V

    iget-object v2, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_11
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_25

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/proxy/ad/adbusiness/c/i$a;

    invoke-virtual {v3}, Lcom/proxy/ad/adbusiness/c/i$a;->a()Lorg/json/JSONObject;

    move-result-object v3

    invoke-virtual {v1, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    goto :goto_11

    :cond_25
    const-string v2, "apps"

    invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v1, "next_index"

    invoke-virtual {p0}, Lcom/proxy/ad/adbusiness/c/i;->g()I

    move-result v2

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v1, "next_key"

    invoke-virtual {p0}, Lcom/proxy/ad/adbusiness/c/i;->h()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_40
    .catch Lorg/json/JSONException; {:try_start_6 .. :try_end_40} :catch_43
    .catchall {:try_start_6 .. :try_end_40} :catchall_41

    goto :goto_43

    :catchall_41
    move-exception v0

    goto :goto_45

    :catch_43
    :goto_43
    :try_start_43
    monitor-exit p0

    return-object v0

    :goto_45
    monitor-exit p0
    :try_end_46
    .catchall {:try_start_43 .. :try_end_46} :catchall_41

    goto :goto_48

    :goto_47
    throw v0

    :goto_48
    goto :goto_47
.end method

.method public final a(Ljava/util/Collection;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Collection<",
            "Lcom/proxy/ad/adbusiness/c/i$a;",
            ">;)V"
        }
    .end annotation

    monitor-enter p0

    if-eqz p1, :cond_d

    :try_start_3
    iget-object v0, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->removeAll(Ljava/util/Collection;)Z

    iget-object v0, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    :cond_d
    monitor-exit p0

    return-void

    :catchall_f
    move-exception p1

    monitor-exit p0
    :try_end_11
    .catchall {:try_start_3 .. :try_end_11} :catchall_f

    throw p1
.end method

.method public final a(Lorg/json/JSONObject;)V
    .registers 6

    const/4 v0, 0x0

    const-string v1, "next_index"

    invoke-virtual {p1, v1, v0}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/proxy/ad/adbusiness/c/i;->c:I

    const-string v1, "next_key"

    const-string v2, ""

    invoke-virtual {p1, v1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/proxy/ad/adbusiness/c/i;->d:Ljava/lang/String;

    const-string v1, "apps"

    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object p1

    new-instance v1, Ljava/util/LinkedHashSet;

    invoke-direct {v1}, Ljava/util/LinkedHashSet;-><init>()V

    if-eqz p1, :cond_35

    :goto_20
    invoke-virtual {p1}, Lorg/json/JSONArray;->length()I

    move-result v2

    if-ge v0, v2, :cond_35

    invoke-virtual {p1, v0}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v2

    new-instance v3, Lcom/proxy/ad/adbusiness/c/i$a;

    invoke-direct {v3, v2}, Lcom/proxy/ad/adbusiness/c/i$a;-><init>(Lorg/json/JSONObject;)V

    invoke-interface {v1, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v0, 0x1

    goto :goto_20

    :cond_35
    monitor-enter p0

    :try_start_36
    iget-object p1, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->clear()V

    iget-object p1, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-interface {p1, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    monitor-exit p0

    return-void

    :catchall_42
    move-exception p1

    monitor-exit p0
    :try_end_44
    .catchall {:try_start_36 .. :try_end_44} :catchall_42

    goto :goto_46

    :goto_45
    throw p1

    :goto_46
    goto :goto_45
.end method

.method public final a(Lcom/proxy/ad/adbusiness/c/i$a;)Z
    .registers 3

    if-nez p1, :cond_4

    const/4 p1, 0x0

    return p1

    :cond_4
    new-instance v0, Ljava/util/ArrayList;

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

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-virtual {p0, v0}, Lcom/proxy/ad/adbusiness/c/i;->b(Ljava/util/Collection;)Z

    move-result p1

    return p1
.end method

.method public final b(Ljava/util/Collection;)Z
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/Collection<",
            "Lcom/proxy/ad/adbusiness/c/i$a;",
            ">;)Z"
        }
    .end annotation

    monitor-enter p0

    if-eqz p1, :cond_a

    :try_start_3
    iget-object v0, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->removeAll(Ljava/util/Collection;)Z

    move-result p1

    goto :goto_b

    :cond_a
    const/4 p1, 0x0

    :goto_b
    monitor-exit p0

    return p1

    :catchall_d
    move-exception p1

    monitor-exit p0
    :try_end_f
    .catchall {:try_start_3 .. :try_end_f} :catchall_d

    throw p1
.end method

.method public final d()V
    .registers 2

    const/4 v0, 0x0

    iput v0, p0, Lcom/proxy/ad/adbusiness/c/i;->c:I

    invoke-static {}, Lcom/proxy/ad/adsdk/b/a;->a()Lcom/proxy/ad/adsdk/b/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/proxy/ad/adsdk/b/a;->b()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/proxy/ad/adbusiness/c/i;->d:Ljava/lang/String;

    return-void
.end method

.method public final e()Z
    .registers 2

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    monitor-exit p0

    return v0

    :catchall_9
    move-exception v0

    monitor-exit p0
    :try_end_b
    .catchall {:try_start_1 .. :try_end_b} :catchall_9

    throw v0
.end method

.method public final f()Ljava/util/List;
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/proxy/ad/adbusiness/c/i$a;",
            ">;"
        }
    .end annotation

    monitor-enter p0

    :try_start_1
    new-instance v0, Ljava/util/ArrayList;

    iget-object v1, p0, Lcom/proxy/ad/adbusiness/c/i;->e:Ljava/util/List;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    monitor-exit p0

    return-object v0

    :catchall_a
    move-exception v0

    monitor-exit p0
    :try_end_c
    .catchall {:try_start_1 .. :try_end_c} :catchall_a

    throw v0
.end method

.method public final g()I
    .registers 2

    iget v0, p0, Lcom/proxy/ad/adbusiness/c/i;->c:I

    if-lez v0, :cond_c

    iget-object v0, p0, Lcom/proxy/ad/adbusiness/c/i;->d:Ljava/lang/String;

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

    move-result v0

    if-eqz v0, :cond_f

    :cond_c
    invoke-virtual {p0}, Lcom/proxy/ad/adbusiness/c/i;->d()V

    :cond_f
    iget v0, p0, Lcom/proxy/ad/adbusiness/c/i;->c:I

    return v0
.end method

.method public final h()Ljava/lang/String;
    .registers 2

    iget v0, p0, Lcom/proxy/ad/adbusiness/c/i;->c:I

    if-lez v0, :cond_c

    iget-object v0, p0, Lcom/proxy/ad/adbusiness/c/i;->d:Ljava/lang/String;

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

    move-result v0

    if-eqz v0, :cond_f

    :cond_c
    invoke-virtual {p0}, Lcom/proxy/ad/adbusiness/c/i;->d()V

    :cond_f
    iget-object v0, p0, Lcom/proxy/ad/adbusiness/c/i;->d:Ljava/lang/String;

    return-object v0
.end method

.method public final toString()Ljava/lang/String;
    .registers 2

    invoke-virtual {p0}, Lcom/proxy/ad/adbusiness/c/i;->a()Lorg/json/JSONObject;

    move-result-object v0

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

    move-result-object v0

    return-object v0
.end method