GoooBet v1.0版本的 MD5 值为:ff9748f16167bfd7735b669c0a9931c5
以下内容为反编译后的 AdInformationConfig.java 源代码,内容仅作参考
package com.startapp.android.publish.adsCommon.adinformation;
import android.content.Context;
import com.google.android.exoplayer2.extractor.ts.TsExtractor;
import com.startapp.android.publish.adsCommon.adinformation.AdInformationPositions;
import com.startapp.android.publish.adsCommon.k;
import com.startapp.android.publish.common.model.AdPreferences;
import com.startapp.common.c.f;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
public class AdInformationConfig implements Serializable {
private static final long serialVersionUID = 1;
private boolean enabled = true;
private float fatFingersFactor = 200.0f;
private String dialogUrlSecured = "https://d1byvlfiet2h9q.cloudfront.net/InApp/resources/adInformationDialog3.html";
private String eulaUrlSecured = "https://www.com.startapp.com/policy/sdk-policy/";
@f(b = HashMap.class, c = AdInformationPositions.Position.class, d = AdPreferences.Placement.class)
protected HashMap<AdPreferences.Placement, AdInformationPositions.Position> Positions = new HashMap<>();
private transient EnumMap<ImageResourceType, e> f3464a = new EnumMap<>(ImageResourceType.class);
@f(b = ArrayList.class, c = e.class)
private List<e> ImageResources = new ArrayList();
public enum ImageResourceType {
INFO_S(17, 14),
INFO_EX_S(88, 14),
INFO_L(25, 21),
INFO_EX_L(TsExtractor.TS_STREAM_TYPE_HDMV_DTS, 21);
private int height;
private int width;
ImageResourceType(int i, int i2) {
this.width = i;
this.height = i2;
}
public int getDefaultWidth() {
return this.width;
}
public int getDefaultHeight() {
return this.height;
}
public static ImageResourceType getByName(String str) {
ImageResourceType imageResourceType = INFO_S;
ImageResourceType[] values = values();
for (int i = 0; i < values.length; i++) {
if (values[i].name().toLowerCase().compareTo(str.toLowerCase()) == 0) {
imageResourceType = values[i];
}
}
return imageResourceType;
}
}
private AdInformationConfig() {
}
public static AdInformationConfig a() {
AdInformationConfig adInformationConfig = new AdInformationConfig();
a(adInformationConfig);
return adInformationConfig;
}
public static void a(AdInformationConfig adInformationConfig) {
adInformationConfig.i();
adInformationConfig.h();
}
public String b() {
String str = this.eulaUrlSecured;
return (str == null || str.equals("")) ? "https://www.com.startapp.com/policy/sdk-policy/" : this.eulaUrlSecured;
}
public String c() {
return (!this.f3464a.containsKey(ImageResourceType.INFO_L) || this.f3464a.get(ImageResourceType.INFO_L).d().equals("")) ? "https://info.startappservice.com/InApp/resources/info_l.png" : this.f3464a.get(ImageResourceType.INFO_L).d();
}
public boolean d() {
return this.enabled;
}
public boolean a(Context context) {
return !k.a(context, "userDisabledAdInformation", (Boolean) false).booleanValue() && d();
}
public void a(Context context, boolean z) {
k.b(context, "userDisabledAdInformation", Boolean.valueOf(!z));
}
public float e() {
return this.fatFingersFactor / 100.0f;
}
protected void a(ImageResourceType imageResourceType, e eVar) {
j().put((EnumMap<ImageResourceType, e>) imageResourceType, (ImageResourceType) eVar);
}
public String f() {
String str = this.dialogUrlSecured;
return str != null ? str : "https://d1byvlfiet2h9q.cloudfront.net/InApp/resources/adInformationDialog3.html";
}
public AdInformationPositions.Position a(AdPreferences.Placement placement) {
AdInformationPositions.Position position = this.Positions.get(placement);
if (position != null) {
return position;
}
AdInformationPositions.Position position2 = AdInformationPositions.Position.BOTTOM_LEFT;
this.Positions.put(placement, position2);
return position2;
}
public e a(ImageResourceType imageResourceType) {
return j().get(imageResourceType);
}
public void g() {
for (e eVar : this.ImageResources) {
a(ImageResourceType.getByName(eVar.a()), eVar);
eVar.e();
}
}
protected void h() {
for (ImageResourceType imageResourceType : ImageResourceType.values()) {
if (j().get(imageResourceType) == null) {
throw new IllegalArgumentException("AdInformation error in ImageResource [" + imageResourceType + "] cannot be found in MetaData");
}
}
}
protected void i() {
for (ImageResourceType imageResourceType : ImageResourceType.values()) {
e eVar = j().get(imageResourceType);
Boolean bool = true;
if (eVar == null) {
eVar = e.c(imageResourceType.name());
Iterator<e> it = this.ImageResources.iterator();
while (true) {
if (it.hasNext()) {
if (ImageResourceType.getByName(it.next().a()).equals(imageResourceType)) {
bool = false;
break;
}
} else {
break;
}
}
j().put((EnumMap<ImageResourceType, e>) imageResourceType, (ImageResourceType) eVar);
if (bool.booleanValue()) {
this.ImageResources.add(eVar);
}
}
eVar.a(imageResourceType.getDefaultWidth());
eVar.b(imageResourceType.getDefaultHeight());
eVar.a(imageResourceType.name().toLowerCase() + ".png");
}
}
public EnumMap<ImageResourceType, e> j() {
return this.f3464a;
}
public void k() {
this.f3464a = new EnumMap<>(ImageResourceType.class);
}
}