156 lines
3.3 KiB
Smali
156 lines
3.3 KiB
Smali
.class public Lcom/moji/http/log/MojiAdStat;
|
|
.super Ljava/lang/Object;
|
|
.source "MojiAdStat.java"
|
|
|
|
|
|
# instance fields
|
|
.field public a:[Ljava/lang/String;
|
|
|
|
.field private b:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 3
|
|
|
|
.line 16
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x3
|
|
|
|
.line 21
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
const-string v1, "http://192.168.1.71:8080"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "http://192.168.1.23:9000"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v1, "http://192.168.1.26:9000"
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
iput-object v0, p0, Lcom/moji/http/log/MojiAdStat;->a:[Ljava/lang/String;
|
|
|
|
const-string v0, "http://ad.api.moji.com"
|
|
|
|
.line 22
|
|
iput-object v0, p0, Lcom/moji/http/log/MojiAdStat;->b:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.line 31
|
|
invoke-static {}, Lcom/moji/tool/log/MJLogger;->b()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 32
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "setting_develop_console_use_ad_test_host_port"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 33
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string v1, "setting_develop_console_ad_test_host_index"
|
|
|
|
.line 34
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result v0
|
|
|
|
if-ltz v0, :cond_0
|
|
|
|
.line 35
|
|
iget-object v1, p0, Lcom/moji/http/log/MojiAdStat;->a:[Ljava/lang/String;
|
|
|
|
array-length v1, v1
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
.line 36
|
|
iget-object v1, p0, Lcom/moji/http/log/MojiAdStat;->a:[Ljava/lang/String;
|
|
|
|
aget-object v0, v1, v0
|
|
|
|
.line 37
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 38
|
|
iput-object v0, p0, Lcom/moji/http/log/MojiAdStat;->b:Ljava/lang/String;
|
|
|
|
.line 43
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/http/log/MojiAdStat;->b:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public a(Lorg/json/JSONObject;)V
|
|
.locals 2
|
|
|
|
.line 25
|
|
:try_start_0
|
|
new-instance v0, Lcom/moji/http/log/MojiAdStatRequest;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/http/log/MojiAdStat;->a()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1, p1}, Lcom/moji/http/log/MojiAdStatRequest;-><init>(Ljava/lang/String;Lorg/json/JSONObject;)V
|
|
|
|
invoke-virtual {v0}, Lcom/moji/http/log/MojiAdStatRequest;->f()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/String;
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
const-string v0, "MojiAdStat"
|
|
|
|
.line 27
|
|
invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|