RequestUrl2Service.smali
.class public Lcom/cleanmaster/h5webgame/RequestUrl2Service;
.super Ljava/lang/Object;
.source "RequestUrl2Service.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/cleanmaster/h5webgame/RequestUrl2Service$UrlRequestCallback;
}
.end annotation
# instance fields
.field private a:Lcom/android/volley/RequestQueue;
# direct methods
.method public constructor <init>()V
.registers 2
.prologue
.line 23
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 24
iget-object v0, p0, Lcom/cleanmaster/h5webgame/RequestUrl2Service;->a:Lcom/android/volley/RequestQueue;
if-nez v0, :cond_11
.line 25
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/android/volley/toolbox/Volley;->newRequestQueue(Landroid/content/Context;)Lcom/android/volley/RequestQueue;
move-result-object v0
iput-object v0, p0, Lcom/cleanmaster/h5webgame/RequestUrl2Service;->a:Lcom/android/volley/RequestQueue;
.line 27
:cond_11
return-void
.end method
.method private a(Lcom/android/volley/Response$Listener;Lcom/android/volley/Response$ErrorListener;Lorg/json/JSONObject;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/android/volley/Response$Listener",
"<",
"Lorg/json/JSONObject;",
">;",
"Lcom/android/volley/Response$ErrorListener;",
"Lorg/json/JSONObject;",
")V"
}
.end annotation
.prologue
.line 42
const-string v0, "https://cmpoints.cmcm.com/api/v1/accounts/afander/getSid/?"
invoke-direct {p0, v0, p1, p2, p3}, Lcom/cleanmaster/h5webgame/RequestUrl2Service;->a(Ljava/lang/String;Lcom/android/volley/Response$Listener;Lcom/android/volley/Response$ErrorListener;Lorg/json/JSONObject;)V
.line 43
return-void
.end method
.method private a(Ljava/lang/String;Lcom/android/volley/Response$Listener;Lcom/android/volley/Response$ErrorListener;Lorg/json/JSONObject;)V
.registers 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Lcom/android/volley/Response$Listener",
"<",
"Lorg/json/JSONObject;",
">;",
"Lcom/android/volley/Response$ErrorListener;",
"Lorg/json/JSONObject;",
")V"
}
.end annotation
.prologue
.line 35
new-instance v0, Lcom/android/volley/toolbox/JsonObjectRequest;
const/4 v1, 0x1
move-object v2, p1
move-object v3, p4
move-object v4, p2
move-object v5, p3
invoke-direct/range {v0 .. v5}, Lcom/android/volley/toolbox/JsonObjectRequest;-><init>(ILjava/lang/String;Lorg/json/JSONObject;Lcom/android/volley/Response$Listener;Lcom/android/volley/Response$ErrorListener;)V
.line 36
const-string v1, "GAME_URL_REQUEST"
invoke-virtual {v0, v1}, Lcom/android/volley/toolbox/JsonObjectRequest;->setTag(Ljava/lang/Object;)Lcom/android/volley/Request;
.line 37
iget-object v1, p0, Lcom/cleanmaster/h5webgame/RequestUrl2Service;->a:Lcom/android/volley/RequestQueue;
invoke-virtual {v1, v0}, Lcom/android/volley/RequestQueue;->add(Lcom/android/volley/Request;)Lcom/android/volley/Request;
.line 38
return-void
.end method
.method private b()Lorg/json/JSONObject;
.registers 4
.prologue
.line 70
new-instance v1, Lorg/json/JSONObject;
invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V
.line 72
:try_start_5
const-string/jumbo v0, "token"
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v2
invoke-virtual {v2}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getAnumLoginToken()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 73
const-string v0, "accountid"
invoke-static {}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstance()Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v2
invoke-virtual {v2}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getAnumLoginAccountId()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
:try_end_20
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_20} :catch_21
.line 77
:goto_20
return-object v1
.line 74
:catch_21
move-exception v0
.line 75
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_20
.end method
# virtual methods
.method public a()V
.registers 3
.prologue
.line 81
iget-object v0, p0, Lcom/cleanmaster/h5webgame/RequestUrl2Service;->a:Lcom/android/volley/RequestQueue;
if-eqz v0, :cond_b
.line 82
iget-object v0, p0, Lcom/cleanmaster/h5webgame/RequestUrl2Service;->a:Lcom/android/volley/RequestQueue;
const-string v1, "GAME_URL_REQUEST"
invoke-virtual {v0, v1}, Lcom/android/volley/RequestQueue;->cancelAll(Ljava/lang/Object;)V
.line 84
:cond_b
return-void
.end method
.method public a(Lcom/cleanmaster/h5webgame/RequestUrl2Service$UrlRequestCallback;)V
.registers 5
.prologue
.line 51
invoke-direct {p0}, Lcom/cleanmaster/h5webgame/RequestUrl2Service;->b()Lorg/json/JSONObject;
move-result-object v0
.line 52
new-instance v1, Lcom/cleanmaster/h5webgame/c;
invoke-direct {v1, p0, p1}, Lcom/cleanmaster/h5webgame/c;-><init>(Lcom/cleanmaster/h5webgame/RequestUrl2Service;Lcom/cleanmaster/h5webgame/RequestUrl2Service$UrlRequestCallback;)V
new-instance v2, Lcom/cleanmaster/h5webgame/d;
invoke-direct {v2, p0, p1}, Lcom/cleanmaster/h5webgame/d;-><init>(Lcom/cleanmaster/h5webgame/RequestUrl2Service;Lcom/cleanmaster/h5webgame/RequestUrl2Service$UrlRequestCallback;)V
invoke-direct {p0, v1, v2, v0}, Lcom/cleanmaster/h5webgame/RequestUrl2Service;->a(Lcom/android/volley/Response$Listener;Lcom/android/volley/Response$ErrorListener;Lorg/json/JSONObject;)V
.line 67
return-void
.end method