VegeFruits v7.1版本的 MD5 值为:2ff167dfba698c783e879938fe00b9ce
以下内容为反编译后的 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 int ALL = 2;
public static final int LANDSCAPE = 1;
public static final int PORTRAIT = 0;
@Deprecated
public static final int SENSOR = 2;
String[] b;
AdColonyUserMetadata e;
String a = "";
JSONArray c = t.b();
JSONObject d = t.a();
public AdColonyAppOptions() {
setOriginStore("google");
if (a.b()) {
i a = a.a();
a(a.b().a);
a(a.b().b);
}
}
public AdColonyAppOptions setAppVersion(@NonNull String app_version) {
if (au.d(app_version)) {
setOption(TapjoyConstants.TJC_APP_VERSION_NAME, app_version);
}
return this;
}
public String getAppVersion() {
return t.b(this.d, TapjoyConstants.TJC_APP_VERSION_NAME);
}
public AdColonyAppOptions setUserID(@NonNull String user_id) {
if (au.d(user_id)) {
setOption("user_id", user_id);
}
return this;
}
public String getUserID() {
return t.b(this.d, "user_id");
}
public AdColonyAppOptions setOption(@NonNull String key, boolean value) {
if (au.d(key)) {
t.a(this.d, key, value);
}
return this;
}
public Object getOption(@NonNull String key) {
return t.a(this.d, key);
}
public AdColonyAppOptions setOption(@NonNull String key, double value) {
if (au.d(key)) {
t.a(this.d, key, value);
}
return this;
}
public AdColonyAppOptions setOption(@NonNull String key, @NonNull String value) {
if (key != null && au.d(key) && au.d(value)) {
t.a(this.d, key, value);
}
return this;
}
public AdColonyAppOptions setOriginStore(@NonNull String origin_store) {
if (au.d(origin_store)) {
setOption("origin_store", origin_store);
}
return this;
}
public String getOriginStore() {
return t.b(this.d, "origin_store");
}
public AdColonyAppOptions setRequestedAdOrientation(@IntRange(from = 0, to = 2) int orientation) {
setOption("orientation", orientation);
return this;
}
public int getRequestedAdOrientation() {
return t.a(this.d, "orientation", -1);
}
public AdColonyAppOptions setAppOrientation(@IntRange(from = 0, to = 2) int orientation) {
setOption("app_orientation", orientation);
return this;
}
public int getAppOrientation() {
return t.a(this.d, "app_orientation", -1);
}
public AdColonyAppOptions setUserMetadata(@NonNull AdColonyUserMetadata metadata) {
this.e = metadata;
t.a(this.d, "user_metadata", metadata.c);
return this;
}
public AdColonyAppOptions setMultiWindowEnabled(boolean enabled) {
t.a(this.d, "multi_window_enabled", enabled);
return this;
}
public boolean getMultiWindowEnabled() {
return t.d(this.d, "multi_window_enabled");
}
public AdColonyUserMetadata getUserMetadata() {
return this.e;
}
public static AdColonyAppOptions getMoPubAppOptions(@NonNull String clientOptions) {
if (clientOptions == null || clientOptions.isEmpty()) {
return null;
}
AdColonyAppOptions adColonyAppOptions = new AdColonyAppOptions();
for (String str : clientOptions.split(",")) {
String[] split = str.split(":");
if (split.length != 2) {
Log.e("AdColonyMoPub", "AdColony client options not recognized - please check your MoPub dashboard");
return null;
}
String str2 = split[0];
char c = 65535;
switch (str2.hashCode()) {
case 109770977:
if (str2.equals("store")) {
c = 0;
}
switch (c) {
case 0:
adColonyAppOptions.setOriginStore(split[1]);
break;
case 1:
adColonyAppOptions.setAppVersion(split[1]);
break;
default:
Log.e("AdColonyMoPub", "AdColony client options in wrong format - please check your MoPub dashboard");
return null;
}
case 351608024:
if (str2.equals("version")) {
c = 1;
}
switch (c) {
}
break;
default:
switch (c) {
}
break;
}
}
return adColonyAppOptions;
}
public AdColonyAppOptions a(String str) {
if (str != null) {
this.a = str;
t.a(this.d, TapjoyConstants.TJC_APP_ID, str);
}
return this;
}
public AdColonyAppOptions a(String... strArr) {
if (strArr != null) {
this.b = strArr;
this.c = t.b();
for (String str : strArr) {
t.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 (t.i(this.d, "use_forced_controller")) {
ADCVMModule.a = t.d(this.d, "use_forced_controller");
}
if (t.i(this.d, "use_staging_launch_server")) {
a.a().b(t.d(this.d, "use_staging_launch_server") ? "https://adc3-launch-server-staging.herokuapp.com/v4/launch" : "https://adc3-launch.adcolony.com/v4/launch");
}
}
}