VidMate v4.2613版本的 MD5 值为:993482c79f779838c3f6749049d55510
以下内容为反编译后的 AdInformationConfig.java 源代码,内容仅作参考
package com.startapp.android.publish.adsCommon.adinformation;
import android.content.Context;
import com.startapp.android.publish.adsCommon.a.o;
import com.startapp.android.publish.adsCommon.adinformation.AdInformationPositions;
import com.startapp.android.publish.adsCommon.k;
import com.startapp.android.publish.common.model.AdPreferences;
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 final 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/";
@com.startapp.common.d.e(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> a = new EnumMap<>(ImageResourceType.class);
@com.startapp.common.d.e(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(130, 21);
private int height;
private int width;
ImageResourceType(int i, int i2) {
this.width = i;
this.height = i2;
}
public final int getDefaultWidth() {
return this.width;
}
public final 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 final String b() {
return (this.eulaUrlSecured == null || this.eulaUrlSecured.equals("")) ? "https://www.com.startapp.com/policy/sdk-policy/" : this.eulaUrlSecured;
}
public final String c() {
return (!this.a.containsKey(ImageResourceType.INFO_L) || this.a.get(ImageResourceType.INFO_L).d().equals("")) ? "https://info.startappservice.com/InApp/resources/info_l.png" : this.a.get(ImageResourceType.INFO_L).d();
}
public final boolean a(Context context) {
return !k.a(context, "userDisabledAdInformation", Boolean.FALSE).booleanValue() && this.enabled;
}
public static void a(Context context, boolean z) {
k.b(context, "userDisabledAdInformation", Boolean.FALSE);
}
public final float d() {
return this.fatFingersFactor / 100.0f;
}
public final String e() {
return this.dialogUrlSecured != null ? this.dialogUrlSecured : "https://d1byvlfiet2h9q.cloudfront.net/InApp/resources/adInformationDialog3.html";
}
public final 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 final void f() {
for (e eVar : this.ImageResources) {
this.a.put((EnumMap<ImageResourceType, e>) ImageResourceType.getByName(eVar.a()), (ImageResourceType) eVar);
eVar.e();
}
}
private void h() {
for (ImageResourceType imageResourceType : ImageResourceType.values()) {
if (this.a.get(imageResourceType) == null) {
throw new IllegalArgumentException("AdInformation error in ImageResource [" + imageResourceType + "] cannot be found in MetaData");
}
}
}
private void i() {
for (ImageResourceType imageResourceType : ImageResourceType.values()) {
e eVar = this.a.get(imageResourceType);
Boolean bool = Boolean.TRUE;
if (eVar == null) {
eVar = e.b(imageResourceType.name());
Iterator<e> it = this.ImageResources.iterator();
while (true) {
if (it.hasNext()) {
if (ImageResourceType.getByName(it.next().a()).equals(imageResourceType)) {
bool = Boolean.FALSE;
break;
}
} else {
break;
}
}
this.a.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 final void g() {
this.a = new EnumMap<>(ImageResourceType.class);
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
AdInformationConfig adInformationConfig = (AdInformationConfig) obj;
return this.enabled == adInformationConfig.enabled && Float.compare(adInformationConfig.fatFingersFactor, this.fatFingersFactor) == 0 && o.b(this.dialogUrlSecured, adInformationConfig.dialogUrlSecured) && o.b(this.eulaUrlSecured, adInformationConfig.eulaUrlSecured) && o.b(this.Positions, adInformationConfig.Positions) && o.b(this.ImageResources, adInformationConfig.ImageResources);
}
public final int hashCode() {
return o.a(Boolean.valueOf(this.enabled), Float.valueOf(this.fatFingersFactor), this.dialogUrlSecured, this.eulaUrlSecured, this.Positions, this.ImageResources);
}
public final e a(ImageResourceType imageResourceType) {
return this.a.get(imageResourceType);
}
}