ADResult.smali
.class public Lio/dcloud/feature/gg/dcloud/ADResult;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
}
.end annotation
# instance fields
.field private d:Ljava/lang/String;
.field private handler:Lio/dcloud/h/c/c/b/b/d;
.field private receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
# direct methods
.method public varargs constructor <init>([Lio/dcloud/feature/gg/dcloud/IADReceiver;)V
.registers 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
.line 3
invoke-static {}, Lio/dcloud/h/c/a;->d()Lio/dcloud/h/c/a;
move-result-object p1
invoke-virtual {p1}, Lio/dcloud/h/c/a;->a()Lio/dcloud/h/c/c/c/c;
move-result-object p1
check-cast p1, Lio/dcloud/h/c/c/b/b/d;
iput-object p1, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->handler:Lio/dcloud/h/c/c/b/b/d;
return-void
.end method
.method private gd()Ljava/lang/String;
.registers 9
.line 1
invoke-static {}, Lio/dcloud/EntryProxy;->getInstnace()Lio/dcloud/EntryProxy;
move-result-object v0
invoke-virtual {v0}, Lio/dcloud/EntryProxy;->getCoreHandler()Lio/dcloud/common/DHInterface/ICore;
move-result-object v0
sget-object v1, Lio/dcloud/common/DHInterface/IMgr$MgrType;->AppMgr:Lio/dcloud/common/DHInterface/IMgr$MgrType;
sget-object v2, Lio/dcloud/common/util/BaseInfo;->sDefaultBootApp:Ljava/lang/String;
const/16 v3, 0x1c
invoke-interface {v0, v1, v3, v2}, Lio/dcloud/common/DHInterface/ICore;->dispatchEvent(Lio/dcloud/common/DHInterface/IMgr$MgrType;ILjava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lio/dcloud/common/DHInterface/IApp;
if-eqz v0, :cond_59
.line 3
invoke-interface {v0}, Lio/dcloud/common/DHInterface/IAppInfo;->getActivity()Landroid/app/Activity;
move-result-object v1
.line 4
new-instance v2, Lorg/json/JSONObject;
iget-object v3, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->handler:Lio/dcloud/h/c/c/b/b/d;
invoke-virtual {v3, v1}, Lio/dcloud/h/c/c/b/b/d;->b(Landroid/content/Context;)Ljava/util/HashMap;
move-result-object v3
invoke-direct {v2, v3}, Lorg/json/JSONObject;-><init>(Ljava/util/Map;)V
invoke-virtual {v2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
move-result-object v2
iput-object v2, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->d:Ljava/lang/String;
.line 5
iget-object v2, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
new-instance v3, Lio/dcloud/feature/gg/dcloud/ADHandler$ADReceiver;
invoke-direct {v3, v1}, Lio/dcloud/feature/gg/dcloud/ADHandler$ADReceiver;-><init>(Landroid/content/Context;)V
const/4 v4, 0x0
aput-object v3, v2, v4
.line 6
iget-object v2, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
new-instance v3, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
invoke-direct {v3, v1}, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;-><init>(Landroid/content/Context;)V
const/4 v5, 0x1
aput-object v3, v2, v5
.line 7
iget-object v2, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
new-instance v3, Lio/dcloud/feature/gg/dcloud/AdFeatureImpl$AdReceiver;
const/4 v6, 0x3
new-array v6, v6, [Ljava/lang/Object;
const/4 v7, 0x0
aput-object v7, v6, v4
aput-object v7, v6, v5
const-string v4, ""
const/4 v5, 0x2
aput-object v4, v6, v5
invoke-interface {v0}, Lio/dcloud/common/DHInterface/IApp;->obtainAppId()Ljava/lang/String;
move-result-object v0
invoke-direct {v3, v1, v6, v0}, Lio/dcloud/feature/gg/dcloud/AdFeatureImpl$AdReceiver;-><init>(Landroid/content/Context;[Ljava/lang/Object;Ljava/lang/String;)V
aput-object v3, v2, v5
.line 9
:cond_59
iget-object v0, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->d:Ljava/lang/String;
return-object v0
.end method
# virtual methods
.method public cad(Ljava/lang/String;)V
.registers 10
.line 1
iget-object v0, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
if-eqz v0, :cond_65
const/4 v0, 0x0
.line 3
:try_start_5
new-instance v1, Lorg/json/JSONObject;
invoke-direct {v1, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
const-string p1, "ret"
const/4 v2, -0x1
.line 4
invoke-virtual {v1, p1, v2}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I
move-result p1
if-nez p1, :cond_29
.line 6
iget-object p1, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
array-length v2, p1
move v3, v0
:goto_17
if-ge v3, v2, :cond_65
aget-object v4, p1, v3
.line 7
instance-of v5, v4, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
if-nez v5, :cond_23
instance-of v5, v4, Lio/dcloud/feature/gg/dcloud/ADHandler$ADReceiver;
if-eqz v5, :cond_26
.line 8
:cond_23
invoke-interface {v4, v1}, Lio/dcloud/feature/gg/dcloud/IADReceiver;->onReceiver(Lorg/json/JSONObject;)V
:cond_26
add-int/lit8 v3, v3, 0x1
goto :goto_17
.line 11
:cond_29
iget-object v2, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
array-length v3, v2
move v4, v0
:goto_2d
if-ge v4, v3, :cond_65
aget-object v5, v2, v4
.line 12
instance-of v6, v5, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
if-nez v6, :cond_39
instance-of v6, v5, Lio/dcloud/feature/gg/dcloud/ADHandler$ADReceiver;
if-eqz v6, :cond_46
.line 13
:cond_39
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v6
const-string v7, "desc"
invoke-virtual {v1, v7}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
invoke-interface {v5, v6, v7}, Lio/dcloud/feature/gg/dcloud/IADReceiver;->onError(Ljava/lang/String;Ljava/lang/String;)V
:try_end_46
.catch Lorg/json/JSONException; {:try_start_5 .. :try_end_46} :catch_49
:cond_46
add-int/lit8 v4, v4, 0x1
goto :goto_2d
:catch_49
move-exception p1
.line 16
iget-object v1, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
array-length v2, v1
:goto_4d
if-ge v0, v2, :cond_65
aget-object v3, v1, v0
.line 17
instance-of v4, v3, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
if-nez v4, :cond_59
instance-of v4, v3, Lio/dcloud/feature/gg/dcloud/ADHandler$ADReceiver;
if-eqz v4, :cond_62
.line 18
:cond_59
invoke-virtual {p1}, Lorg/json/JSONException;->getMessage()Ljava/lang/String;
move-result-object v4
const-string v5, "Exception"
invoke-interface {v3, v5, v4}, Lio/dcloud/feature/gg/dcloud/IADReceiver;->onError(Ljava/lang/String;Ljava/lang/String;)V
:cond_62
add-int/lit8 v0, v0, 0x1
goto :goto_4d
:cond_65
return-void
.end method
.method public dc(Ljava/lang/String;II)V
.registers 11
.line 1
iget-object v0, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
if-eqz v0, :cond_e2
const-string v1, "NotFountDataError"
const/16 v2, -0x138f
const/4 v3, 0x0
if-eqz p2, :cond_26
.line 3
array-length p1, v0
:goto_c
const-string p2, "network error"
if-ge v3, p1, :cond_1d
aget-object p3, v0, v3
.line 4
instance-of v4, p3, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
if-eqz v4, :cond_17
goto :goto_1a
.line 6
:cond_17
invoke-interface {p3, v1, p2}, Lio/dcloud/feature/gg/dcloud/IADReceiver;->onError(Ljava/lang/String;Ljava/lang/String;)V
:goto_1a
add-int/lit8 v3, v3, 0x1
goto :goto_c
.line 8
:cond_1d
iget-object p1, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->handler:Lio/dcloud/h/c/c/b/b/d;
if-eqz p1, :cond_e2
.line 9
invoke-virtual {p1, v2, p2}, Lio/dcloud/h/c/c/b/b/d;->a(ILjava/lang/String;)V
goto/16 :goto_e2
:cond_26
const/16 p2, 0xc8
if-eq p3, p2, :cond_4b
.line 12
array-length p1, v0
:goto_2b
if-ge v3, p1, :cond_3e
aget-object p2, v0, v3
.line 13
instance-of v4, p2, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
if-eqz v4, :cond_34
goto :goto_3b
.line 15
:cond_34
invoke-static {p3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v4
invoke-interface {p2, v1, v4}, Lio/dcloud/feature/gg/dcloud/IADReceiver;->onError(Ljava/lang/String;Ljava/lang/String;)V
:goto_3b
add-int/lit8 v3, v3, 0x1
goto :goto_2b
.line 17
:cond_3e
iget-object p1, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->handler:Lio/dcloud/h/c/c/b/b/d;
if-eqz p1, :cond_e2
.line 18
invoke-static {p3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object p2
invoke-virtual {p1, v2, p2}, Lio/dcloud/h/c/c/b/b/d;->a(ILjava/lang/String;)V
goto/16 :goto_e2
.line 22
:cond_4b
:try_start_4b
new-instance p2, Lorg/json/JSONObject;
invoke-direct {p2, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
const-string p1, "ret"
const/4 p3, -0x1
.line 23
invoke-virtual {p2, p1, p3}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I
move-result p1
if-nez p1, :cond_7d
.line 25
iget-object p1, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
array-length p3, p1
move v0, v3
:goto_5d
if-ge v0, p3, :cond_75
aget-object v1, p1, v0
.line 26
instance-of v4, v1, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
if-eqz v4, :cond_66
goto :goto_72
:cond_66
const-string v4, "data"
.line 28
invoke-virtual {p2, v4}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
move-result-object v4
invoke-static {v4}, Lio/dcloud/feature/gg/AdSplashUtil;->decodeChannel(Lorg/json/JSONObject;)V
.line 29
invoke-interface {v1, p2}, Lio/dcloud/feature/gg/dcloud/IADReceiver;->onReceiver(Lorg/json/JSONObject;)V
:goto_72
add-int/lit8 v0, v0, 0x1
goto :goto_5d
.line 31
:cond_75
iget-object p1, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->handler:Lio/dcloud/h/c/c/b/b/d;
if-eqz p1, :cond_e2
.line 32
invoke-virtual {p1, p2}, Lio/dcloud/h/c/c/b/b/d;->a(Lorg/json/JSONObject;)V
goto :goto_e2
.line 35
:cond_7d
iget-object p3, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
array-length v0, p3
:try_end_80
.catch Ljava/lang/Exception; {:try_start_4b .. :try_end_80} :catch_be
move v1, v3
:goto_81
const-string v4, "desc"
if-ge v1, v0, :cond_9a
:try_start_85
aget-object v5, p3, v1
.line 36
instance-of v6, v5, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
if-eqz v6, :cond_8c
goto :goto_97
.line 38
:cond_8c
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v6
invoke-virtual {p2, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v4
invoke-interface {v5, v6, v4}, Lio/dcloud/feature/gg/dcloud/IADReceiver;->onError(Ljava/lang/String;Ljava/lang/String;)V
:goto_97
add-int/lit8 v1, v1, 0x1
goto :goto_81
.line 40
:cond_9a
iget-object p3, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->handler:Lio/dcloud/h/c/c/b/b/d;
if-eqz p3, :cond_e2
.line 41
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, ":"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-virtual {p3, v2, p1}, Lio/dcloud/h/c/c/b/b/d;->a(ILjava/lang/String;)V
:try_end_bd
.catch Ljava/lang/Exception; {:try_start_85 .. :try_end_bd} :catch_be
goto :goto_e2
:catch_be
move-exception p1
.line 45
iget-object p2, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->receivers:[Lio/dcloud/feature/gg/dcloud/IADReceiver;
array-length p3, p2
:goto_c2
if-ge v3, p3, :cond_d7
aget-object v0, p2, v3
.line 46
instance-of v1, v0, Lio/dcloud/feature/gg/dcloud/ADResult$CADReceiver;
if-eqz v1, :cond_cb
goto :goto_d4
.line 48
:cond_cb
invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v1
const-string v4, "Exception"
invoke-interface {v0, v4, v1}, Lio/dcloud/feature/gg/dcloud/IADReceiver;->onError(Ljava/lang/String;Ljava/lang/String;)V
:goto_d4
add-int/lit8 v3, v3, 0x1
goto :goto_c2
.line 50
:cond_d7
iget-object p2, p0, Lio/dcloud/feature/gg/dcloud/ADResult;->handler:Lio/dcloud/h/c/c/b/b/d;
if-eqz p2, :cond_e2
.line 51
invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object p1
invoke-virtual {p2, v2, p1}, Lio/dcloud/h/c/c/b/b/d;->a(ILjava/lang/String;)V
:cond_e2
:goto_e2
return-void
.end method