AvatarBuilderMetricsHelper.java
7.8 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
package com.bitstrips.imoji.abv3;
import android.support.annotation.NonNull;
import android.util.Log;
import com.bitstrips.imoji.analytics.Action;
import com.bitstrips.imoji.analytics.Category;
import com.bitstrips.imoji.analytics.LegacyAnalyticsService;
import javax.inject.Inject;
import javax.inject.Singleton;
import org.json.JSONException;
import org.json.JSONObject;
@Singleton
public class AvatarBuilderMetricsHelper
{
public static final String BITMOJI = "bitmoji";
public static final String FULL = "full";
public static final String HALF = "half";
public static final String PARAM_GENDER = "gender";
public static final String SNAPCHAT = "snapchat";
public static final String UPGRADE_TEASER_SHOW_ME = "show_me";
public static final String UPGRADE_TEASER_SKIP = "skip";
public static final String UPGRADE_TEASER_SOURCE = "source";
public static final String UPGRADE_TEASER_TYPE = "teaser_type";
public static final String UPGRADE_TEASER_UPGRADE_ACTION = "upgrade_action";
public static final String UPGRADE_TEASER_VIEW = "view";
public static final String UPGRADE_TEASER_VIEW_COUNT = "teaser_view_count";
private static final String a = AvatarBuilderMetricsHelper.class.getSimpleName();
private final LegacyAnalyticsService b;
@Inject
public AvatarBuilderMetricsHelper(LegacyAnalyticsService paramLegacyAnalyticsService)
{
this.b = paramLegacyAnalyticsService;
}
@NonNull
private static JSONObject a(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle)
throws JSONException
{
JSONObject localJSONObject = new JSONObject();
if (paramAvatarBuilderGender != null) {}
for (paramAvatarBuilderGender = paramAvatarBuilderGender.getMetricsLabel();; paramAvatarBuilderGender = "")
{
localJSONObject.put("gender", paramAvatarBuilderGender);
localJSONObject.put("style", paramAvatarBuilderStyle.getMetricsLabel());
return localJSONObject;
}
}
private void a(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle, String paramString)
{
try
{
paramAvatarBuilderGender = a(paramAvatarBuilderGender, paramAvatarBuilderStyle);
paramAvatarBuilderGender.put("selfie_action", paramString);
paramAvatarBuilderGender = paramAvatarBuilderGender.toString();
a(Category.NATIVE_AVATAR_BUILDER, Action.BITMOJI_AVATAR_SELFIE_ACTION, paramAvatarBuilderGender);
return;
}
catch (JSONException paramAvatarBuilderGender)
{
Log.e(a, "Unable to create selfie metric", paramAvatarBuilderGender);
}
}
private void a(Category paramCategory, Action paramAction, String paramString)
{
this.b.sendEvent(paramCategory, paramAction, paramString);
}
private void a(String paramString1, String paramString2, String paramString3, Integer paramInteger)
{
try
{
JSONObject localJSONObject = new JSONObject();
localJSONObject.put("source", paramString1);
localJSONObject.put("teaser_type", paramString2);
localJSONObject.put("upgrade_action", paramString3);
if (paramInteger != null) {
localJSONObject.put("teaser_view_count", paramInteger);
}
paramString1 = localJSONObject.toString();
a(Category.NATIVE_AVATAR_BUILDER, Action.BITMOJI_UPGRADE_STYLE_ACTION, paramString1);
return;
}
catch (JSONException paramString1)
{
Log.e(a, "Unable to create upgrade metric", paramString1);
}
}
private void b(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle, String paramString)
{
try
{
paramAvatarBuilderGender = a(paramAvatarBuilderGender, paramAvatarBuilderStyle);
paramAvatarBuilderGender.put("likeness", paramString);
paramAvatarBuilderGender = paramAvatarBuilderGender.toString();
a(Category.NATIVE_AVATAR_BUILDER, Action.BITMOJI_AVATAR_LIKENESS_ACTION, paramAvatarBuilderGender);
return;
}
catch (JSONException paramAvatarBuilderGender)
{
Log.e(a, "Unable to create likeness metric", paramAvatarBuilderGender);
}
}
public void avatarExit(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle, AvatarBuilderActivityMode paramAvatarBuilderActivityMode, String paramString)
{
try
{
paramAvatarBuilderGender = a(paramAvatarBuilderGender, paramAvatarBuilderStyle);
paramAvatarBuilderGender.put("editflow", paramAvatarBuilderActivityMode.getModeName());
paramAvatarBuilderGender.put("exit", paramString);
paramAvatarBuilderGender = paramAvatarBuilderGender.toString();
a(Category.NATIVE_AVATAR_BUILDER, Action.BITMOJI_AVATAR_EXIT, paramAvatarBuilderGender);
return;
}
catch (JSONException paramAvatarBuilderGender)
{
Log.e(a, "Unable to create avatarExit metric", paramAvatarBuilderGender);
}
}
public void genderSelected(AvatarBuilderGender paramAvatarBuilderGender)
{
try
{
JSONObject localJSONObject = new JSONObject();
localJSONObject.put("gender", paramAvatarBuilderGender.getMetricsLabel());
paramAvatarBuilderGender = localJSONObject.toString();
a(Category.NATIVE_AVATAR_BUILDER, Action.BITMOJI_AVATAR_GENDER_SELECT, paramAvatarBuilderGender);
return;
}
catch (JSONException paramAvatarBuilderGender)
{
Log.e(a, "Unable to create gender metric", paramAvatarBuilderGender);
}
}
public void looksLikeMe(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle)
{
b(paramAvatarBuilderGender, paramAvatarBuilderStyle, "lookslikeme");
}
public void save(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle, AvatarBuilderActivityMode paramAvatarBuilderActivityMode, Integer paramInteger, String paramString)
{
try
{
paramAvatarBuilderGender = a(paramAvatarBuilderGender, paramAvatarBuilderStyle);
paramAvatarBuilderGender.put("editflow", paramAvatarBuilderActivityMode.getModeName());
if (paramInteger != null) {
paramAvatarBuilderGender.put("outfit_id", paramInteger);
}
paramAvatarBuilderGender.put("exit", paramString);
paramAvatarBuilderGender = paramAvatarBuilderGender.toString();
a(Category.NATIVE_AVATAR_BUILDER, Action.BITMOJI_AVATAR_SAVE, paramAvatarBuilderGender);
return;
}
catch (JSONException paramAvatarBuilderGender)
{
Log.e(a, "Unable to create save metric", paramAvatarBuilderGender);
}
}
public void selfieCancel(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle)
{
a(paramAvatarBuilderGender, paramAvatarBuilderStyle, "cancel");
}
public void selfieSnap(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle)
{
a(paramAvatarBuilderGender, paramAvatarBuilderStyle, "snap");
}
public void selfieStart(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle)
{
a(paramAvatarBuilderGender, paramAvatarBuilderStyle, "start");
}
public void tweak(AvatarBuilderGender paramAvatarBuilderGender, AvatarBuilderStyle paramAvatarBuilderStyle)
{
b(paramAvatarBuilderGender, paramAvatarBuilderStyle, "tweakflow");
}
public void upgradeTeaserShowMe(String paramString1, String paramString2)
{
a(paramString1, paramString2, "show_me", null);
}
public void upgradeTeaserSkip(String paramString1, String paramString2)
{
a(paramString1, paramString2, "skip", null);
}
public void upgradeTeaserView(String paramString1, String paramString2, Integer paramInteger)
{
a(paramString1, paramString2, "view", paramInteger);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/AvatarBuilderMetricsHelper.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/