ac.smali

.class public Lcom/bytedance/embedapplog/ac;
.super Lcom/bytedance/embedapplog/w;
.source "SourceFile"


# instance fields
.field public h:[B

.field i:I

.field public j:I

.field private k:Lorg/json/JSONArray;

.field private l:Lorg/json/JSONArray;

.field private m:Lcom/bytedance/embedapplog/ab;

.field private n:Lorg/json/JSONArray;

.field private o:Lcom/bytedance/embedapplog/ag;

.field private p:Lorg/json/JSONObject;

.field private q:Lorg/json/JSONArray;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 27
    invoke-direct {p0}, Lcom/bytedance/embedapplog/w;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Landroid/database/Cursor;)Lcom/bytedance/embedapplog/w;
    .registers 5
    .param p1    # Landroid/database/Cursor;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .annotation build Landroidx/annotation/NonNull;
    .end annotation

    .prologue
    const/4 v2, 0x0

    .line 110
    const/4 v0, 0x0

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v0

    iput-wide v0, p0, Lcom/bytedance/embedapplog/ac;->a:J

    .line 111
    const/4 v0, 0x1

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getBlob(I)[B

    move-result-object v0

    iput-object v0, p0, Lcom/bytedance/embedapplog/ac;->h:[B

    .line 112
    const/4 v0, 0x2

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    iput v0, p0, Lcom/bytedance/embedapplog/ac;->i:I

    .line 113
    iput-object v2, p0, Lcom/bytedance/embedapplog/ac;->p:Lorg/json/JSONObject;

    .line 114
    iput-object v2, p0, Lcom/bytedance/embedapplog/ac;->m:Lcom/bytedance/embedapplog/ab;

    .line 115
    iput-object v2, p0, Lcom/bytedance/embedapplog/ac;->o:Lcom/bytedance/embedapplog/ag;

    .line 116
    iput-object v2, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

    .line 117
    iput-object v2, p0, Lcom/bytedance/embedapplog/ac;->k:Lorg/json/JSONArray;

    .line 118
    iput-object v2, p0, Lcom/bytedance/embedapplog/ac;->l:Lorg/json/JSONArray;

    .line 119
    iput-object v2, p0, Lcom/bytedance/embedapplog/ac;->q:Lorg/json/JSONArray;

    .line 120
    return-object p0
.end method

.method a(JLorg/json/JSONObject;Lcom/bytedance/embedapplog/ab;Lcom/bytedance/embedapplog/ag;Lorg/json/JSONArray;Lorg/json/JSONArray;Lorg/json/JSONArray;Lorg/json/JSONArray;)V
    .registers 13

    .prologue
    .line 81
    iput-wide p1, p0, Lcom/bytedance/embedapplog/ac;->a:J

    .line 82
    iput-object p3, p0, Lcom/bytedance/embedapplog/ac;->p:Lorg/json/JSONObject;

    .line 83
    iput-object p4, p0, Lcom/bytedance/embedapplog/ac;->m:Lcom/bytedance/embedapplog/ab;

    .line 84
    iput-object p5, p0, Lcom/bytedance/embedapplog/ac;->o:Lcom/bytedance/embedapplog/ag;

    .line 85
    const-string v0, "autoChina"

    const-string v1, "Base"

    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1c

    const-string v0, "autoChina"

    const-string v1, "base"

    .line 86
    invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_26

    .line 88
    :cond_1c
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

    .line 92
    :goto_1f
    iput-object p7, p0, Lcom/bytedance/embedapplog/ac;->k:Lorg/json/JSONArray;

    .line 93
    iput-object p8, p0, Lcom/bytedance/embedapplog/ac;->l:Lorg/json/JSONArray;

    .line 94
    iput-object p9, p0, Lcom/bytedance/embedapplog/ac;->q:Lorg/json/JSONArray;

    .line 95
    return-void

    .line 90
    :cond_26
    iput-object p6, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

    goto :goto_1f
.end method

.method protected a(Landroid/content/ContentValues;)V
    .registers 6
    .param p1    # Landroid/content/ContentValues;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .prologue
    .line 125
    const-string v0, "local_time_ms"

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 127
    invoke-virtual {p0}, Lcom/bytedance/embedapplog/ac;->f()Lorg/json/JSONObject;

    move-result-object v0

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

    move-result-object v0

    invoke-static {v0}, Lcom/bytedance/embedapplog/AppLog;->toEncryptByte(Ljava/lang/String;)[B

    move-result-object v0

    .line 129
    const-string v1, "_data"

    invoke-virtual {p1, v1, v0}, Landroid/content/ContentValues;->put(Ljava/lang/String;[B)V

    .line 130
    return-void
.end method

.method protected a(Lorg/json/JSONObject;)V
    .registers 3
    .param p1    # Lorg/json/JSONObject;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .prologue
    .line 174
    const/4 v0, 0x0

    invoke-static {v0}, Lcom/bytedance/embedapplog/aw;->a(Ljava/lang/Throwable;)V

    .line 175
    return-void
.end method

.method protected a()[Ljava/lang/String;
    .registers 4

    .prologue
    .line 99
    const/16 v0, 0x8

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    const-string v2, "local_time_ms"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    const-string v2, "integer"

    aput-object v2, v0, v1

    const/4 v1, 0x2

    const-string v2, "_data"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    const-string v2, "blob"

    aput-object v2, v0, v1

    const/4 v1, 0x4

    const-string v2, "_fail"

    aput-object v2, v0, v1

    const/4 v1, 0x5

    const-string v2, "integer"

    aput-object v2, v0, v1

    const/4 v1, 0x6

    const-string v2, "_full"

    aput-object v2, v0, v1

    const/4 v1, 0x7

    const-string v2, "integer"

    aput-object v2, v0, v1

    return-object v0
.end method

.method protected b(Lorg/json/JSONObject;)Lcom/bytedance/embedapplog/w;
    .registers 3
    .param p1    # Lorg/json/JSONObject;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .prologue
    const/4 v0, 0x0

    .line 254
    invoke-static {v0}, Lcom/bytedance/embedapplog/aw;->a(Ljava/lang/Throwable;)V

    .line 255
    return-object v0
.end method

.method protected b()Lorg/json/JSONObject;
    .registers 11

    .prologue
    const/4 v1, 0x0

    .line 179
    new-instance v5, Lorg/json/JSONObject;

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

    .line 180
    const-string v0, "magic_tag"

    const-string v2, "ss_app_log"

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

    .line 181
    const-string v0, "header"

    iget-object v2, p0, Lcom/bytedance/embedapplog/ac;->p:Lorg/json/JSONObject;

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

    .line 182
    const-string v0, "time_sync"

    sget-object v2, Lcom/bytedance/embedapplog/u;->a:Lorg/json/JSONObject;

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

    .line 184
    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->m:Lcom/bytedance/embedapplog/ab;

    if-eqz v0, :cond_32

    .line 185
    new-instance v0, Lorg/json/JSONArray;

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

    .line 186
    iget-object v2, p0, Lcom/bytedance/embedapplog/ac;->m:Lcom/bytedance/embedapplog/ab;

    invoke-virtual {v2}, Lcom/bytedance/embedapplog/ab;->f()Lorg/json/JSONObject;

    move-result-object v2

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

    .line 187
    const-string v2, "launch"

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

    .line 190
    :cond_32
    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->o:Lcom/bytedance/embedapplog/ag;

    if-eqz v0, :cond_9e

    .line 191
    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->o:Lcom/bytedance/embedapplog/ag;

    invoke-virtual {v0}, Lcom/bytedance/embedapplog/ag;->f()Lorg/json/JSONObject;

    move-result-object v3

    .line 195
    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

    if-eqz v0, :cond_88

    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

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

    move-result v0

    .line 196
    :goto_46
    new-instance v4, Lorg/json/JSONArray;

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

    move v2, v1

    .line 197
    :goto_4c
    if-ge v2, v0, :cond_8a

    .line 198
    new-instance v6, Lorg/json/JSONArray;

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

    .line 199
    new-instance v7, Lorg/json/JSONObject;

    new-instance v8, Lorg/json/JSONObject;

    iget-object v9, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

    .line 200
    invoke-virtual {v9, v2}, Lorg/json/JSONArray;->optString(I)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v8, v9}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string v9, "params"

    invoke-virtual {v8, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-direct {v7, v8}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 201
    const-string v8, "page_key"

    const-string v9, ""

    invoke-virtual {v7, v8, v9}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v6, v1, v8}, Lorg/json/JSONArray;->put(ILjava/lang/Object;)Lorg/json/JSONArray;

    .line 202
    const/4 v8, 0x1

    const-string v9, "duration"

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

    move-result v7

    add-int/lit16 v7, v7, 0x3e7

    div-int/lit16 v7, v7, 0x3e8

    invoke-virtual {v6, v8, v7}, Lorg/json/JSONArray;->put(II)Lorg/json/JSONArray;

    .line 203
    invoke-virtual {v4, v6}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    .line 197
    add-int/lit8 v2, v2, 0x1

    goto :goto_4c

    :cond_88
    move v0, v1

    .line 195
    goto :goto_46

    .line 205
    :cond_8a
    if-lez v0, :cond_91

    .line 206
    const-string v0, "activites"

    invoke-virtual {v3, v0, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 210
    :cond_91
    new-instance v0, Lorg/json/JSONArray;

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

    .line 211
    invoke-virtual {v0, v3}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    .line 212
    const-string v2, "terminate"

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

    .line 215
    :cond_9e
    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->k:Lorg/json/JSONArray;

    if-eqz v0, :cond_147

    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->k:Lorg/json/JSONArray;

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

    move-result v0

    move v4, v0

    .line 216
    :goto_a9
    if-lez v4, :cond_b2

    .line 217
    const-string v0, "event"

    iget-object v2, p0, Lcom/bytedance/embedapplog/ac;->k:Lorg/json/JSONArray;

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

    .line 220
    :cond_b2
    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

    if-eqz v0, :cond_14a

    iget-object v0, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

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

    move-result v0

    .line 221
    :goto_bc
    iget-object v2, p0, Lcom/bytedance/embedapplog/ac;->l:Lorg/json/JSONArray;

    if-nez v2, :cond_14d

    .line 222
    iget-object v2, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

    iput-object v2, p0, Lcom/bytedance/embedapplog/ac;->l:Lorg/json/JSONArray;

    .line 229
    :cond_c4
    iget-object v2, p0, Lcom/bytedance/embedapplog/ac;->l:Lorg/json/JSONArray;

    if-eqz v2, :cond_160

    iget-object v2, p0, Lcom/bytedance/embedapplog/ac;->l:Lorg/json/JSONArray;

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

    move-result v2

    move v3, v2

    .line 230
    :goto_cf
    if-lez v3, :cond_d8

    .line 231
    const-string v2, "event_v3"

    iget-object v6, p0, Lcom/bytedance/embedapplog/ac;->l:Lorg/json/JSONArray;

    invoke-virtual {v5, v2, v6}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 235
    :cond_d8
    iget-object v2, p0, Lcom/bytedance/embedapplog/ac;->q:Lorg/json/JSONArray;

    if-eqz v2, :cond_163

    iget-object v1, p0, Lcom/bytedance/embedapplog/ac;->q:Lorg/json/JSONArray;

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

    move-result v1

    move v2, v1

    .line 236
    :goto_e3
    if-lez v2, :cond_ec

    .line 237
    const-string v1, "log_data"

    iget-object v6, p0, Lcom/bytedance/embedapplog/ac;->q:Lorg/json/JSONArray;

    invoke-virtual {v5, v1, v6}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 240
    :cond_ec
    new-instance v6, Ljava/lang/StringBuilder;

    const-string/jumbo v1, "wP {"

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

    .line 241
    iget-object v1, p0, Lcom/bytedance/embedapplog/ac;->m:Lcom/bytedance/embedapplog/ab;

    if-eqz v1, :cond_166

    iget-object v1, p0, Lcom/bytedance/embedapplog/ac;->m:Lcom/bytedance/embedapplog/ab;

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

    .line 242
    const-string v1, ", "

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

    move-result-object v7

    iget-object v1, p0, Lcom/bytedance/embedapplog/ac;->o:Lcom/bytedance/embedapplog/ag;

    if-eqz v1, :cond_169

    iget-object v1, p0, Lcom/bytedance/embedapplog/ac;->o:Lcom/bytedance/embedapplog/ag;

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

    .line 243
    const-string v1, ", p: "

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

    move-result-object v1

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

    .line 244
    const-string v0, ", v1: "

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

    move-result-object v0

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

    .line 245
    const-string v0, ", v3: "

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

    move-result-object v0

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

    move-result-object v0

    const-string/jumbo v1, "}"

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

    .line 246
    const-string v0, ", m: "

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

    move-result-object v0

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

    move-result-object v0

    const-string/jumbo v1, "}"

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

    .line 247
    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/bytedance/embedapplog/aw;->d(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 249
    return-object v5

    :cond_147
    move v4, v1

    .line 215
    goto/16 :goto_a9

    :cond_14a
    move v0, v1

    .line 220
    goto/16 :goto_bc

    .line 223
    :cond_14d
    if-lez v0, :cond_c4

    move v2, v1

    .line 224
    :goto_150
    if-ge v2, v0, :cond_c4

    .line 225
    iget-object v3, p0, Lcom/bytedance/embedapplog/ac;->l:Lorg/json/JSONArray;

    iget-object v6, p0, Lcom/bytedance/embedapplog/ac;->n:Lorg/json/JSONArray;

    invoke-virtual {v6, v2}, Lorg/json/JSONArray;->get(I)Ljava/lang/Object;

    move-result-object v6

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

    .line 224
    add-int/lit8 v2, v2, 0x1

    goto :goto_150

    :cond_160
    move v3, v1

    .line 229
    goto/16 :goto_cf

    :cond_163
    move v2, v1

    .line 235
    goto/16 :goto_e3

    .line 241
    :cond_166
    const-string v1, "la"

    goto :goto_fa

    .line 242
    :cond_169
    const-string v1, "te"

    goto :goto_109
.end method

.method d()Ljava/lang/String;
    .registers 2
    .annotation build Landroidx/annotation/NonNull;
    .end annotation

    .prologue
    .line 261
    const-string v0, "pack"

    return-object v0
.end method