Wolves Themes v1.0版本的 MD5 值为:cddc92b47f6b7c4a195c9625507eb51c
以下内容为反编译后的 AdColonyAppOptions.java 源代码,内容仅作参考
package com.adcolony.sdk;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.util.Log;
import com.tapjoy.TapjoyConstants;
import org.json.JSONArray;
import org.json.JSONObject;
public class AdColonyAppOptions {
public static final String ADMARVEL = "AdMarvel";
public static final String ADMOB = "AdMob";
public static final String ADOBEAIR = "Adobe AIR";
public static final String AERSERVE = "AerServe";
public static final int ALL = 2;
public static final String APPODEAL = "Appodeal";
public static final String COCOS2DX = "Cocos2d-x";
public static final String CORONA = "Corona";
public static final String FUSEPOWERED = "Fuse Powered";
public static final String FYBER = "Fyber";
public static final String IRONSOURCE = "ironSource";
public static final int LANDSCAPE = 1;
public static final String MOPUB = "MoPub";
public static final int PORTRAIT = 0;
@Deprecated
public static final int SENSOR = 2;
public static final String UNITY = "Unity";
String[] b;
AdColonyUserMetadata e;
String a = "";
JSONArray c = y.b();
JSONObject d = y.a();
public AdColonyAppOptions() {
setOriginStore("google");
if (a.b()) {
l a = a.a();
if (a.e()) {
a(a.d().a);
a(a.d().b);
}
}
}
public AdColonyAppOptions setAppVersion(@NonNull String str) {
if (az.d(str)) {
setOption(TapjoyConstants.TJC_APP_VERSION_NAME, str);
}
return this;
}
public String getAppVersion() {
return y.b(this.d, TapjoyConstants.TJC_APP_VERSION_NAME);
}
public AdColonyAppOptions setUserID(@NonNull String str) {
if (az.d(str)) {
setOption("user_id", str);
}
return this;
}
public String getUserID() {
return y.b(this.d, "user_id");
}
public AdColonyAppOptions setOption(@NonNull String str, boolean z) {
if (az.d(str)) {
y.a(this.d, str, z);
}
return this;
}
public Object getOption(@NonNull String str) {
return y.a(this.d, str);
}
public AdColonyAppOptions setOption(@NonNull String str, double d) {
if (az.d(str)) {
y.a(this.d, str, d);
}
return this;
}
public AdColonyAppOptions setOption(@NonNull String str, @NonNull String str2) {
if (str != null && az.d(str) && az.d(str2)) {
y.a(this.d, str, str2);
}
return this;
}
public AdColonyAppOptions setOriginStore(@NonNull String str) {
if (az.d(str)) {
setOption("origin_store", str);
}
return this;
}
public String getOriginStore() {
return y.b(this.d, "origin_store");
}
public AdColonyAppOptions setRequestedAdOrientation(@IntRange(from = 0, to = 2) int i) {
setOption("orientation", i);
return this;
}
public int getRequestedAdOrientation() {
return y.a(this.d, "orientation", -1);
}
public AdColonyAppOptions setAppOrientation(@IntRange(from = 0, to = 2) int i) {
setOption("app_orientation", i);
return this;
}
public int getAppOrientation() {
return y.a(this.d, "app_orientation", -1);
}
public AdColonyAppOptions setUserMetadata(@NonNull AdColonyUserMetadata adColonyUserMetadata) {
this.e = adColonyUserMetadata;
y.a(this.d, "user_metadata", adColonyUserMetadata.c);
return this;
}
public AdColonyAppOptions setTestModeEnabled(boolean z) {
y.a(this.d, "test_mode", z);
return this;
}
public boolean getTestModeEnabled() {
return y.d(this.d, "test_mode");
}
public AdColonyAppOptions setMultiWindowEnabled(boolean z) {
y.a(this.d, "multi_window_enabled", z);
return this;
}
public boolean getMultiWindowEnabled() {
return y.d(this.d, "multi_window_enabled");
}
public AdColonyUserMetadata getUserMetadata() {
return this.e;
}
public AdColonyAppOptions setMediationNetwork(@NonNull String str, @NonNull String str2) {
if (az.d(str) && az.d(str2)) {
y.a(this.d, "mediation_network", str);
y.a(this.d, "mediation_network_version", str2);
}
return this;
}
public JSONObject getMediationInfo() {
JSONObject a = y.a();
y.a(a, "name", y.b(this.d, "mediation_network"));
y.a(a, "version", y.b(this.d, "mediation_network_version"));
return a;
}
public AdColonyAppOptions setPlugin(@NonNull String str, @NonNull String str2) {
if (az.d(str) && az.d(str2)) {
y.a(this.d, TapjoyConstants.TJC_PLUGIN, str);
y.a(this.d, "plugin_version", str2);
}
return this;
}
public JSONObject getPluginInfo() {
JSONObject a = y.a();
y.a(a, "name", y.b(this.d, TapjoyConstants.TJC_PLUGIN));
y.a(a, "version", y.b(this.d, "plugin_version"));
return a;
}
public AdColonyAppOptions setKeepScreenOn(boolean z) {
y.a(this.d, "keep_screen_on", z);
return this;
}
public boolean getKeepScreenOn() {
return y.d(this.d, "keep_screen_on");
}
public static AdColonyAppOptions getMoPubAppOptions(@NonNull String str) {
AdColonyAppOptions mediationNetwork = new AdColonyAppOptions().setMediationNetwork(MOPUB, "1.0");
if (str == null || str.isEmpty()) {
return mediationNetwork;
}
for (String str2 : str.split(",")) {
String[] split = str2.split(":");
if (split.length == 2) {
String str3 = split[0];
char c = 65535;
int hashCode = str3.hashCode();
if (hashCode != 109770977) {
if (hashCode == 351608024 && str3.equals("version")) {
c = 1;
}
} else if (str3.equals("store")) {
c = 0;
}
switch (c) {
case 0:
mediationNetwork.setOriginStore(split[1]);
break;
case 1:
mediationNetwork.setAppVersion(split[1]);
break;
default:
Log.e("AdColonyMoPub", "AdColony client options in wrong format - please check your MoPub dashboard");
return mediationNetwork;
}
} else {
Log.e("AdColonyMoPub", "AdColony client options not recognized - please check your MoPub dashboard");
return null;
}
}
return mediationNetwork;
}
public AdColonyAppOptions a(String str) {
if (str == null) {
return this;
}
this.a = str;
y.a(this.d, "app_id", str);
return this;
}
public AdColonyAppOptions a(String... strArr) {
if (strArr == null) {
return this;
}
this.b = strArr;
this.c = y.b();
for (String str : strArr) {
y.a(this.c, str);
}
return this;
}
public String a() {
return this.a;
}
public String[] b() {
return this.b;
}
public JSONArray c() {
return this.c;
}
public JSONObject d() {
return this.d;
}
public void e() {
if (y.i(this.d, "use_forced_controller")) {
ADCVMModule.a = y.d(this.d, "use_forced_controller");
}
if (y.i(this.d, "use_staging_launch_server")) {
l.f = y.d(this.d, "use_staging_launch_server") ? "https://adc3-launch-server-staging.herokuapp.com/v4/launch" : "https://adc3-launch.adcolony.com/v4/launch";
}
}
}