MessageRequest.smali
.class public Lcom/tradplus/ads/pushcenter/http/MessageRequest;
.super Lcom/tradplus/ads/volley/Request;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/tradplus/ads/pushcenter/http/MessageRequest$Listener;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/tradplus/ads/volley/Request<",
"Lcom/tradplus/ads/pushcenter/response/BaseResponse;",
">;"
}
.end annotation
# instance fields
.field private a:Ljava/lang/String;
.field private b:Lcom/tradplus/ads/pushcenter/http/MessageRequest$Listener;
# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Lcom/tradplus/ads/pushcenter/http/MessageRequest$Listener;)V
.registers 5
const/4 v0, 0x1
invoke-direct {p0, v0, p1, p3}, Lcom/tradplus/ads/volley/Request;-><init>(ILjava/lang/String;Lcom/tradplus/ads/volley/Response$ErrorListener;)V
iput-object p2, p0, Lcom/tradplus/ads/pushcenter/http/MessageRequest;->a:Ljava/lang/String;
iput-object p3, p0, Lcom/tradplus/ads/pushcenter/http/MessageRequest;->b:Lcom/tradplus/ads/pushcenter/http/MessageRequest$Listener;
new-instance p1, Lcom/tradplus/ads/volley/DefaultRetryPolicy;
const/16 p2, 0x2710
const/high16 p3, 0x3f800000 # 1.0f
invoke-direct {p1, p2, v0, p3}, Lcom/tradplus/ads/volley/DefaultRetryPolicy;-><init>(IIF)V
const/4 p2, 0x0
invoke-virtual {p0, p2}, Lcom/tradplus/ads/volley/Request;->setShouldCache(Z)Lcom/tradplus/ads/volley/Request;
invoke-virtual {p0, p1}, Lcom/tradplus/ads/volley/Request;->setRetryPolicy(Lcom/tradplus/ads/volley/RetryPolicy;)Lcom/tradplus/ads/volley/Request;
return-void
.end method
# virtual methods
.method protected a(Lcom/tradplus/ads/volley/NetworkResponse;)Lcom/tradplus/ads/volley/Response;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/tradplus/ads/volley/NetworkResponse;",
")",
"Lcom/tradplus/ads/volley/Response<",
"Lcom/tradplus/ads/pushcenter/response/BaseResponse;",
">;"
}
.end annotation
if-nez p1, :cond_d
new-instance p1, Lcom/tradplus/ads/volley/NetworkResponse;
const-string v0, "200"
invoke-virtual {v0}, Ljava/lang/String;->getBytes()[B
move-result-object v0
invoke-direct {p1, v0}, Lcom/tradplus/ads/volley/NetworkResponse;-><init>([B)V
:cond_d
new-instance v0, Lcom/tradplus/ads/pushcenter/response/BaseResponse;
const/16 v1, 0xc8
invoke-direct {v0, v1}, Lcom/tradplus/ads/pushcenter/response/BaseResponse;-><init>(I)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 {v0, 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
return-object p1
.end method
.method protected a(Lcom/tradplus/ads/pushcenter/response/BaseResponse;)V
.registers 3
iget-object v0, p0, Lcom/tradplus/ads/pushcenter/http/MessageRequest;->b:Lcom/tradplus/ads/pushcenter/http/MessageRequest$Listener;
if-eqz v0, :cond_7
invoke-interface {v0, p1}, Lcom/tradplus/ads/pushcenter/http/MessageRequest$Listener;->onResponse(Lcom/tradplus/ads/pushcenter/response/BaseResponse;)V
:cond_7
return-void
.end method
.method protected synthetic deliverResponse(Ljava/lang/Object;)V
.registers 2
check-cast p1, Lcom/tradplus/ads/pushcenter/response/BaseResponse;
invoke-virtual {p0, p1}, Lcom/tradplus/ads/pushcenter/http/MessageRequest;->a(Lcom/tradplus/ads/pushcenter/response/BaseResponse;)V
return-void
.end method
.method public getBody()[B
.registers 3
:try_start_0
iget-object v0, p0, Lcom/tradplus/ads/pushcenter/http/MessageRequest;->a:Ljava/lang/String;
invoke-virtual {p0}, Lcom/tradplus/ads/volley/Request;->d()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
move-result-object v0
:try_end_a
.catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_a} :catch_b
return-object v0
:catch_b
move-exception v0
invoke-virtual {v0}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V
const/4 v0, 0x0
return-object v0
.end method