.class public Lg3/q$a;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lg3/q;->b(Ljava/lang/String;Ljava/lang/Throwable;)Lg3/q;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = null
.end annotation


# instance fields
.field public final synthetic r:Ljava/lang/String;

.field public final synthetic s:Ljava/lang/Throwable;

.field public final synthetic t:Lg3/q;


# direct methods
.method public constructor <init>(Lg3/q;Ljava/lang/String;Ljava/lang/Throwable;)V
    .registers 4

    iput-object p1, p0, Lg3/q$a;->t:Lg3/q;

    iput-object p2, p0, Lg3/q$a;->r:Ljava/lang/String;

    iput-object p3, p0, Lg3/q$a;->s:Ljava/lang/Throwable;

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

    return-void
.end method


# virtual methods
.method public run()V
    .registers 8

    iget-object v0, p0, Lg3/q$a;->t:Lg3/q;

    iget-object v0, v0, Lg3/q;->i:Ljava/util/Map;

    iget-object v1, p0, Lg3/q$a;->r:Ljava/lang/String;

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/json/JSONObject;

    const/4 v1, 0x1

    const/4 v2, 0x0

    const-string v3, "count"

    if-nez v0, :cond_87

    new-instance v0, Lorg/json/JSONObject;

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

    :try_start_17
    const-string v4, "error"

    iget-object v5, p0, Lg3/q$a;->r:Ljava/lang/String;

    invoke-static {v5}, Lg3/e;->q(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

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

    const-string v4, "timestamp"

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

    move-result-wide v5

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

    const-string v4, "device_id"

    iget-object v5, p0, Lg3/q$a;->t:Lg3/q;

    .line 1
    iget-object v5, v5, Lg3/q;->d:Ljava/lang/String;

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

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

    iget-object v1, p0, Lg3/q$a;->s:Ljava/lang/Throwable;

    if-eqz v1, :cond_4e

    invoke-static {v1}, Landroid/util/Log;->getStackTraceString(Ljava/lang/Throwable;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lg3/t;->c(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_4e

    const-string v3, "stack_trace"

    invoke-static {v1}, Lg3/e;->q(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

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

    :cond_4e
    iget-object v1, p0, Lg3/q$a;->t:Lg3/q;

    iget-object v1, v1, Lg3/q;->h:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    iget-object v3, p0, Lg3/q$a;->t:Lg3/q;

    iget v3, v3, Lg3/q;->e:I

    if-lt v1, v3, :cond_74

    move v1, v2

    :goto_5d
    const/4 v3, 0x5

    if-ge v1, v3, :cond_74

    iget-object v3, p0, Lg3/q$a;->t:Lg3/q;

    iget-object v3, v3, Lg3/q;->h:Ljava/util/List;

    invoke-interface {v3, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    iget-object v4, p0, Lg3/q$a;->t:Lg3/q;

    iget-object v4, v4, Lg3/q;->i:Ljava/util/Map;

    invoke-interface {v4, v3}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v1, v1, 0x1

    goto :goto_5d

    :cond_74
    iget-object v1, p0, Lg3/q$a;->t:Lg3/q;

    iget-object v1, v1, Lg3/q;->i:Ljava/util/Map;

    iget-object v2, p0, Lg3/q$a;->r:Ljava/lang/String;

    invoke-interface {v1, v2, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v0, p0, Lg3/q$a;->t:Lg3/q;

    iget-object v0, v0, Lg3/q;->h:Ljava/util/List;

    iget-object v1, p0, Lg3/q$a;->r:Ljava/lang/String;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_86
    .catch Lorg/json/JSONException; {:try_start_17 .. :try_end_86} :catch_8f

    goto :goto_8f

    :cond_87
    invoke-virtual {v0, v3, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I

    move-result v2

    add-int/2addr v2, v1

    :try_start_8c
    invoke-virtual {v0, v3, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
    :try_end_8f
    .catch Lorg/json/JSONException; {:try_start_8c .. :try_end_8f} :catch_8f

    :catch_8f
    :goto_8f
    return-void
.end method
