AnalyticsWrapper.java
2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package com.bitstrips.imoji.analytics;
import com.bitstrips.imoji.models.Sticker;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
public class AnalyticsWrapper
implements Serializable
{
private String a;
private String b;
private String c;
private String d;
private String e;
private SearchSource f = null;
private String g;
private int h = -1;
private boolean i = false;
public Map<String, String> buildMap()
{
HashMap localHashMap = new HashMap();
localHashMap.put("share_from", "DEFAULT");
if (this.d != null) {
localHashMap.put("comic_id", this.d);
}
if (this.c != null) {
localHashMap.put("template_id", this.c);
}
if (this.a != null) {
localHashMap.put("supertag", this.a);
}
if (this.b != null) {
localHashMap.put("search_term", this.b);
}
if (this.f != null) {
localHashMap.put("search_type", this.f.toString());
}
if (this.e != null) {
localHashMap.put("share_to", this.e);
}
if (this.g != null) {
localHashMap.put("search_term", this.g);
}
if (this.h >= 0) {
localHashMap.put("result_count", String.valueOf(this.h));
}
if (this.i) {
localHashMap.put("share_type", "attach");
}
return localHashMap;
}
public AnalyticsWrapper labelForImojiShare(Sticker paramSticker, String paramString)
{
this.a = paramString;
this.c = paramSticker.getTemplateId();
this.d = paramSticker.getComicId();
return this;
}
public AnalyticsWrapper labelForSearchSubmit(String paramString, int paramInt)
{
this.g = paramString;
this.h = paramInt;
return this;
}
public AnalyticsWrapper setIsAttach()
{
this.i = true;
return this;
}
public AnalyticsWrapper setShareTo(String paramString)
{
this.e = paramString;
return this;
}
public String toString()
{
return new JSONObject(buildMap()).toString();
}
public AnalyticsWrapper updateLabelForSearch(String paramString, SearchSource paramSearchSource)
{
this.a = "#search";
this.b = paramString;
this.f = paramSearchSource;
return this;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/analytics/AnalyticsWrapper.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/