AvatarBuilderConfig.java
11.7 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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
package com.bitstrips.imoji.abv3;
import android.support.annotation.NonNull;
import android.util.Log;
import com.bitstrips.imoji.abv3.bottombar.AvatarBottomBarItem;
import com.bitstrips.imoji.abv3.bottombar.AvatarBottomBarSubCategory;
import com.bitstrips.imoji.abv3.category.AvatarCategoryDetails;
import com.bitstrips.imoji.abv3.model.AvatarAssets;
import com.bitstrips.imoji.abv3.model.AvatarBrand;
import com.bitstrips.imoji.abv3.model.AvatarCategory;
import com.bitstrips.imoji.abv3.model.AvatarMetadata;
import com.bitstrips.imoji.abv3.model.AvatarOutfit;
import com.bitstrips.imoji.abv3.model.AvatarOutfits;
import com.bitstrips.imoji.abv3.model.AvatarOutfitsData;
import com.bitstrips.imoji.abv3.model.AvatarStyleData;
import com.bitstrips.imoji.abv3.model.AvatarStyles;
import com.bitstrips.imoji.abv3.model.AvatarTraits;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class AvatarBuilderConfig
{
public static final String CATEGORY_BEARD = "beard";
public static final String CATEGORY_BEARD_TONE = "beard_tone";
public static final String CATEGORY_BLUSH = "blush_tone";
public static final String CATEGORY_BODY = "body";
public static final String CATEGORY_BREAST = "breast";
public static final String CATEGORY_BROW = "brow";
public static final String CATEGORY_BROW_TONE = "brow_tone";
public static final String CATEGORY_EYE = "eye";
public static final String CATEGORY_EYESHADOW = "eyeshadow_tone";
public static final String CATEGORY_FACE_PROPORTION = "face_proportion";
public static final String CATEGORY_HAIR = "hair";
public static final String CATEGORY_HAIR_ACCESSORY = "hair_accessory";
public static final String CATEGORY_HAIR_TONE = "hair_tone";
public static final String CATEGORY_HAIR_TREATMENT_TONE = "hair_treatment_tone";
public static final String CATEGORY_HAT = "hat";
public static final String CATEGORY_JAW = "jaw";
public static final String CATEGORY_LIKENESS = "likeness";
public static final String CATEGORY_LIPSTICK = "lipstick_tone";
public static final String CATEGORY_MOUTH = "mouth";
public static final String CATEGORY_OUTFIT = "outfit";
public static final String CATEGORY_SAVE = "save";
public static final String CATEGORY_SKIN_TONE = "skin_tone";
public static final String DISPLAY_TYPE_BODY = "body";
public static final String DISPLAY_TYPE_BODY_FIXED = "body-fixed";
public static final String DISPLAY_TYPE_COLOR = "color";
public static final String DISPLAY_TYPE_EYE_COLOR = "eye-color";
public static final String DISPLAY_TYPE_HEAD = "head";
public static final String DISPLAY_TYPE_MAKEUP = "makeup";
public static final String DISPLAY_TYPE_THUMBNAIL = "thumbnail";
public static final String PARAM_GENDER = "gender";
public static final String PARAM_STYLE = "style";
public static final int ROTATION_CENTER = 0;
public static final int ROTATION_LEFT = 7;
public static final int ROTATION_RIGHT = 1;
private static final Set<String> a;
private final AvatarBuilderGender b;
private final AvatarBuilderStyle c;
private final boolean d;
private final boolean e;
private final AvatarAssets f;
private final AvatarTraits g;
private AvatarOutfits h;
private final AvatarBuilderFlow i;
private final AvatarBuilderFlow j;
private final AvatarBuilderFlow k;
private final Map<String, Integer> l;
private List<AvatarBrand> m;
private Map<String, AvatarCategory> n;
private String o;
static
{
HashSet localHashSet = new HashSet();
a = localHashSet;
localHashSet.add("save");
a.add("likeness");
a.add("outfit");
}
public AvatarBuilderConfig(@NonNull AvatarBuilderGender paramAvatarBuilderGender, @NonNull AvatarBuilderStyle paramAvatarBuilderStyle, boolean paramBoolean1, boolean paramBoolean2, String paramString, @NonNull AvatarBuilderFlow paramAvatarBuilderFlow1, AvatarBuilderFlow paramAvatarBuilderFlow2, AvatarBuilderFlow paramAvatarBuilderFlow3, @NonNull AvatarAssets paramAvatarAssets, @NonNull Map<String, Integer> paramMap)
{
this.b = paramAvatarBuilderGender;
this.c = paramAvatarBuilderStyle;
this.d = paramBoolean1;
this.e = paramBoolean2;
this.o = paramString;
this.f = paramAvatarAssets;
this.l = paramMap;
this.g = this.f.mTraits;
this.h = this.f.mOutfits;
paramAvatarBuilderGender = this.g.mMale;
paramAvatarBuilderStyle = this.h.mMaleOutfitsData;
if (this.b == AvatarBuilderGender.GENDER_FEMALE)
{
paramAvatarBuilderGender = this.g.mFemale;
paramAvatarBuilderStyle = this.h.mFemaleOutfitsData;
}
for (;;)
{
paramString = paramAvatarBuilderGender.mBitmoji;
if (this.c == AvatarBuilderStyle.STYLE_BITSTRIPS) {
paramAvatarBuilderGender = paramAvatarBuilderGender.mBitstrips;
}
for (;;)
{
this.n = new HashMap();
paramAvatarBuilderGender = paramAvatarBuilderGender.mCategories.iterator();
for (;;)
{
if (paramAvatarBuilderGender.hasNext())
{
paramString = (AvatarCategory)paramAvatarBuilderGender.next();
this.n.put(paramString.getCategoryKey(), paramString);
continue;
if (this.c != AvatarBuilderStyle.STYLE_CM) {
break label259;
}
paramAvatarBuilderGender = paramAvatarBuilderGender.mCM;
break;
}
}
this.m = paramAvatarBuilderStyle.mBrands;
a();
this.i = a(paramAvatarBuilderFlow1, this.n);
this.j = a(paramAvatarBuilderFlow2, this.n);
this.k = a(paramAvatarBuilderFlow3, this.n);
return;
label259:
paramAvatarBuilderGender = paramString;
}
}
}
private static AvatarBuilderFlow a(AvatarBuilderFlow paramAvatarBuilderFlow, Map<String, AvatarCategory> paramMap)
{
if (paramAvatarBuilderFlow == null) {
return null;
}
ArrayList localArrayList1 = new ArrayList();
ArrayList localArrayList2 = new ArrayList();
Iterator localIterator1 = paramAvatarBuilderFlow.getBottomBarItems().iterator();
while (localIterator1.hasNext())
{
AvatarBottomBarItem localAvatarBottomBarItem = (AvatarBottomBarItem)localIterator1.next();
ArrayList localArrayList3 = new ArrayList();
Iterator localIterator2 = localAvatarBottomBarItem.getSubCategories().iterator();
while (localIterator2.hasNext())
{
Object localObject = (AvatarBottomBarSubCategory)localIterator2.next();
String str = ((AvatarBottomBarSubCategory)localObject).getCategoryKey();
if ((a.contains(str)) || (paramMap.get(str) != null))
{
localArrayList3.add(localObject);
localObject = paramAvatarBuilderFlow.getCategoryDetailsList().iterator();
while (((Iterator)localObject).hasNext())
{
AvatarCategoryDetails localAvatarCategoryDetails = (AvatarCategoryDetails)((Iterator)localObject).next();
if (localAvatarCategoryDetails.getCategoryKey().equals(str)) {
localArrayList1.add(localAvatarCategoryDetails);
}
}
}
}
if (!localArrayList3.isEmpty()) {
localArrayList2.add(new AvatarBottomBarItem(localAvatarBottomBarItem.getIconResource(), localArrayList3));
}
}
return new AvatarBuilderFlow(localArrayList1, localArrayList2);
}
private void a()
{
Iterator localIterator1 = this.m.iterator();
while (localIterator1.hasNext())
{
AvatarBrand localAvatarBrand = (AvatarBrand)localIterator1.next();
Iterator localIterator2 = localAvatarBrand.getOutfitList().iterator();
while (localIterator2.hasNext()) {
((AvatarOutfit)localIterator2.next()).setBrand(localAvatarBrand);
}
}
}
public AvatarCategory getAvatarCategory(@NonNull String paramString)
{
return (AvatarCategory)this.n.get(paramString);
}
public List<AvatarBottomBarItem> getBodyBottomBarItems()
{
if (this.k.getBottomBarItems() == null) {
return null;
}
return Collections.unmodifiableList(this.k.getBottomBarItems());
}
public List<AvatarCategoryDetails> getBodyCategoryDetails()
{
if (this.k.getCategoryDetailsList() == null) {
return null;
}
return Collections.unmodifiableList(this.k.getCategoryDetailsList());
}
@NonNull
public List<AvatarBottomBarItem> getBottomBarItems()
{
return this.i.getBottomBarItems();
}
public ArrayList<String> getCategoriesForSpinner()
{
Log.e("AvatarBuilderConfig", "This method is not available in Avatar Builder V3");
return null;
}
public AvatarCategoryDetails getCategoryDetails(@NonNull String paramString)
{
Iterator localIterator = this.i.getCategoryDetailsList().iterator();
while (localIterator.hasNext())
{
AvatarCategoryDetails localAvatarCategoryDetails = (AvatarCategoryDetails)localIterator.next();
if (localAvatarCategoryDetails.getCategoryKey().equals(paramString)) {
return localAvatarCategoryDetails;
}
}
return null;
}
@NonNull
public List<AvatarCategoryDetails> getCategoryDetails()
{
return Collections.unmodifiableList(this.i.getCategoryDetailsList());
}
public List<AvatarCategoryDetails> getCategoryDetailsFull()
{
Log.e("AvatarBuilderConfig", "This method is not available in Avatar Builder V3");
return null;
}
@NonNull
public AvatarBuilderGender getGender()
{
return this.b;
}
public Map<String, Integer> getInitialUserAvatarData()
{
return Collections.unmodifiableMap(this.l);
}
public List<AvatarBrand> getOutfits()
{
return Collections.unmodifiableList(this.m);
}
public String getStartCategory()
{
return this.o;
}
@NonNull
public AvatarBuilderStyle getStyle()
{
return this.c;
}
public List<AvatarBottomBarItem> getTweakBottomBarItems()
{
if (this.j.getBottomBarItems() == null) {
return null;
}
return Collections.unmodifiableList(this.j.getBottomBarItems());
}
public List<AvatarCategoryDetails> getTweakCategoryDetails()
{
if (this.j.getCategoryDetailsList() == null) {
return null;
}
return Collections.unmodifiableList(this.j.getCategoryDetailsList());
}
public Integer getUserOption(String paramString)
{
return (Integer)this.l.get(paramString);
}
public boolean isColourlessBeard(Integer paramInteger)
{
if ((this.g.mMetadata == null) || (this.g.mMetadata.mColourlessBeards == null)) {}
while ((!this.g.mMetadata.mColourlessBeards.contains(paramInteger)) && (paramInteger != null)) {
return false;
}
return true;
}
public boolean isColourlessHair(Integer paramInteger)
{
if ((this.g.mMetadata == null) || (this.g.mMetadata.mColourlessHair == null)) {
return false;
}
return this.g.mMetadata.mColourlessHair.contains(paramInteger);
}
public boolean isHairTreatmentHair(Integer paramInteger)
{
if ((this.g.mMetadata == null) || (this.g.mMetadata.mHairTreatmentMap == null)) {
return false;
}
return this.g.mMetadata.mHairTreatmentMap.containsKey(String.valueOf(paramInteger));
}
public boolean isLiplessMouth(Integer paramInteger)
{
if ((this.g.mMetadata == null) || (this.g.mMetadata.mLiplessMouths == null)) {
return false;
}
return this.g.mMetadata.mLiplessMouths.contains(paramInteger);
}
public boolean showTopSaveButton()
{
return this.d;
}
public boolean showTopSaveButtonDialog()
{
return this.e;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/abv3/AvatarBuilderConfig.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/