524 lines
13 KiB
Smali
524 lines
13 KiB
Smali
.class public Lcom/moji/statistics/EventParams;
|
|
.super Ljava/lang/Object;
|
|
.source "EventParams.java"
|
|
|
|
# interfaces
|
|
.implements Ljava/io/Serializable;
|
|
|
|
|
|
# static fields
|
|
.field private static final TAG:Ljava/lang/String; = "EventParams"
|
|
|
|
.field private static final serialVersionUID:J
|
|
|
|
|
|
# instance fields
|
|
.field private receiverWithParamPairs:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Lcom/moji/statistics/EVENT_RECEIVER;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 17
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 21
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static varargs getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 121
|
|
:try_start_0
|
|
new-instance v1, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V
|
|
:try_end_0
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 122
|
|
:goto_0
|
|
:try_start_1
|
|
array-length v2, p0
|
|
|
|
if-ge v0, v2, :cond_1
|
|
|
|
.line 123
|
|
aget-object v2, p0, v0
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 126
|
|
:cond_0
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "property"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
add-int/lit8 v3, v0, 0x1
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
aget-object v3, p0, v0
|
|
|
|
invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
:try_end_1
|
|
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
:goto_1
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
move-object v1, v0
|
|
|
|
:goto_2
|
|
const-string v0, "EventParams"
|
|
|
|
.line 129
|
|
invoke-static {v0, p0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:cond_1
|
|
return-object v1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public contains(Lcom/moji/statistics/EVENT_RECEIVER;)Z
|
|
.locals 1
|
|
|
|
.line 28
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getMiaozhenParam()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 88
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_RECEIVER;->MIAOZHEN:Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getNewAdParams()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 63
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_RECEIVER;->AD_SERVER:Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected getParaMap()Ljava/util/Map;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Map<",
|
|
"Lcom/moji/statistics/EVENT_RECEIVER;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 24
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getParam(Lcom/moji/statistics/EVENT_RECEIVER;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 93
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/String;
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const-string p1, ""
|
|
|
|
:cond_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getRTServerParam()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 73
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_RECEIVER;->RT_SERVER:Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getServerParam()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 68
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_RECEIVER;->SERVER:Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getTDParam()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 83
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_RECEIVER;->TALKING_DATA:Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getUmengParam()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 78
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_RECEIVER;->UMENG:Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public setNewAdParams(Ljava/lang/String;)Lcom/moji/statistics/EventParams;
|
|
.locals 2
|
|
|
|
.line 50
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_RECEIVER;->AD_SERVER:Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
invoke-interface {v0, v1, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setParams(Lcom/moji/statistics/EVENT_RECEIVER;Ljava/lang/String;)Lcom/moji/statistics/EventParams;
|
|
.locals 1
|
|
|
|
.line 32
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setParams(Lcom/moji/statistics/EventParams;)V
|
|
.locals 3
|
|
|
|
.line 55
|
|
invoke-virtual {p1}, Lcom/moji/statistics/EventParams;->getParaMap()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
.line 56
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 57
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
.line 58
|
|
iget-object v2, p1, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
invoke-interface {v2, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
invoke-virtual {p0, v1, v2}, Lcom/moji/statistics/EventParams;->setParams(Lcom/moji/statistics/EVENT_RECEIVER;Ljava/lang/String;)Lcom/moji/statistics/EventParams;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public setRTParams(IJLcom/moji/statistics/RT_EVENT_TYPE;I)Lcom/moji/statistics/EventParams;
|
|
.locals 2
|
|
|
|
.line 37
|
|
new-instance v0, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
|
|
|
|
:try_start_0
|
|
const-string v1, "ad_index"
|
|
|
|
.line 39
|
|
invoke-virtual {v0, v1, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
|
|
|
|
const-string p1, "ad_id"
|
|
|
|
.line 40
|
|
invoke-virtual {v0, p1, p2, p3}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
|
|
|
|
const-string p1, "stat_type"
|
|
|
|
.line 41
|
|
iget p2, p4, Lcom/moji/statistics/RT_EVENT_TYPE;->mValue:I
|
|
|
|
invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
|
|
|
|
const-string p1, "stat_value"
|
|
|
|
.line 42
|
|
invoke-virtual {v0, p1, p5}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 45
|
|
:catch_0
|
|
iget-object p1, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
sget-object p2, Lcom/moji/statistics/EVENT_RECEIVER;->RT_SERVER:Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-interface {p1, p2, p3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 5
|
|
|
|
.line 98
|
|
iget-object v0, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
return-object v0
|
|
|
|
.line 101
|
|
:cond_0
|
|
new-instance v0, Lorg/json/JSONArray;
|
|
|
|
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
|
|
|
|
.line 102
|
|
iget-object v1, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
.line 103
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
.line 104
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/moji/statistics/EVENT_RECEIVER;
|
|
|
|
.line 105
|
|
iget-object v3, p0, Lcom/moji/statistics/EventParams;->receiverWithParamPairs:Ljava/util/Map;
|
|
|
|
invoke-interface {v3, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
.line 106
|
|
new-instance v4, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v4}, Lorg/json/JSONObject;-><init>()V
|
|
|
|
.line 108
|
|
:try_start_0
|
|
invoke-virtual {v2}, Lcom/moji/statistics/EVENT_RECEIVER;->name()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v4, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
:try_end_0
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception v2
|
|
|
|
const-string v3, "EventParams"
|
|
|
|
.line 110
|
|
invoke-static {v3, v2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 112
|
|
:goto_1
|
|
invoke-virtual {v0, v4}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
|
|
|
|
goto :goto_0
|
|
|
|
.line 114
|
|
:cond_1
|
|
invoke-virtual {v0}, Lorg/json/JSONArray;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|