JsonObjectRequest.smali

.class public Lcom/tradplus/ads/volley/toolbox/JsonObjectRequest;
.super Lcom/tradplus/ads/volley/toolbox/JsonRequest;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/tradplus/ads/volley/toolbox/JsonRequest<",
        "Lorg/json/JSONObject;",
        ">;"
    }
.end annotation


# direct methods
.method public constructor <init>(ILjava/lang/String;Lorg/json/JSONObject;Lcom/tradplus/ads/volley/Response$Listener;Lcom/tradplus/ads/volley/Response$ErrorListener;)V
    .registers 12
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(I",
            "Ljava/lang/String;",
            "Lorg/json/JSONObject;",
            "Lcom/tradplus/ads/volley/Response$Listener<",
            "Lorg/json/JSONObject;",
            ">;",
            "Lcom/tradplus/ads/volley/Response$ErrorListener;",
            ")V"
        }
    .end annotation

    if-nez p3, :cond_4

    const/4 p3, 0x0

    goto :goto_8

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

    move-result-object p3

    :goto_8
    move-object v3, p3

    move-object v0, p0

    move v1, p1

    move-object v2, p2

    move-object v4, p4

    move-object v5, p5

    invoke-direct/range {v0 .. v5}, Lcom/tradplus/ads/volley/toolbox/JsonRequest;-><init>(ILjava/lang/String;Ljava/lang/String;Lcom/tradplus/ads/volley/Response$Listener;Lcom/tradplus/ads/volley/Response$ErrorListener;)V

    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Lorg/json/JSONObject;Lcom/tradplus/ads/volley/Response$Listener;Lcom/tradplus/ads/volley/Response$ErrorListener;)V
    .registers 12
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Lorg/json/JSONObject;",
            "Lcom/tradplus/ads/volley/Response$Listener<",
            "Lorg/json/JSONObject;",
            ">;",
            "Lcom/tradplus/ads/volley/Response$ErrorListener;",
            ")V"
        }
    .end annotation

    if-nez p2, :cond_5

    const/4 v0, 0x0

    const/4 v2, 0x0

    goto :goto_7

    :cond_5
    const/4 v0, 0x1

    const/4 v2, 0x1

    :goto_7
    move-object v1, p0

    move-object v3, p1

    move-object v4, p2

    move-object v5, p3

    move-object v6, p4

    invoke-direct/range {v1 .. v6}, Lcom/tradplus/ads/volley/toolbox/JsonObjectRequest;-><init>(ILjava/lang/String;Lorg/json/JSONObject;Lcom/tradplus/ads/volley/Response$Listener;Lcom/tradplus/ads/volley/Response$ErrorListener;)V

    return-void
.end method


# virtual methods
.method protected a(Lcom/tradplus/ads/volley/NetworkResponse;)Lcom/tradplus/ads/volley/Response;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/tradplus/ads/volley/NetworkResponse;",
            ")",
            "Lcom/tradplus/ads/volley/Response<",
            "Lorg/json/JSONObject;",
            ">;"
        }
    .end annotation

    :try_start_0
    new-instance v0, Ljava/lang/String;

    iget-object v1, p1, Lcom/tradplus/ads/volley/NetworkResponse;->data:[B

    iget-object v2, p1, Lcom/tradplus/ads/volley/NetworkResponse;->headers:Ljava/util/Map;

    invoke-static {v2}, Lcom/tradplus/ads/volley/toolbox/HttpHeaderParser;->parseCharset(Ljava/util/Map;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V

    new-instance v1, Lorg/json/JSONObject;

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

    invoke-static {p1}, Lcom/tradplus/ads/volley/toolbox/HttpHeaderParser;->parseCacheHeaders(Lcom/tradplus/ads/volley/NetworkResponse;)Lcom/tradplus/ads/volley/Cache$Entry;

    move-result-object p1

    invoke-static {v1, p1}, Lcom/tradplus/ads/volley/Response;->success(Ljava/lang/Object;Lcom/tradplus/ads/volley/Cache$Entry;)Lcom/tradplus/ads/volley/Response;

    move-result-object p1
    :try_end_1a
    .catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_1a} :catch_26
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_1a} :catch_1b

    return-object p1

    :catch_1b
    move-exception p1

    new-instance v0, Lcom/tradplus/ads/volley/ParseError;

    invoke-direct {v0, p1}, Lcom/tradplus/ads/volley/ParseError;-><init>(Ljava/lang/Throwable;)V

    :goto_21
    invoke-static {v0}, Lcom/tradplus/ads/volley/Response;->error(Lcom/tradplus/ads/volley/VolleyError;)Lcom/tradplus/ads/volley/Response;

    move-result-object p1

    return-object p1

    :catch_26
    move-exception p1

    new-instance v0, Lcom/tradplus/ads/volley/ParseError;

    invoke-direct {v0, p1}, Lcom/tradplus/ads/volley/ParseError;-><init>(Ljava/lang/Throwable;)V

    goto :goto_21
.end method