GoooBet v1.0版本的 MD5 值为:ff9748f16167bfd7735b669c0a9931c5
以下内容为反编译后的 ag.java 源代码,内容仅作参考
package com.appodeal.ads;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import com.appodeal.ads.e;
import com.appodeal.ads.utils.Log;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.json.JSONObject;
public final class ag {
static final boolean f1041a = !ag.class.desiredAssertionStatus();
public interface a {
void a(int i, boolean z);
}
ag() {
}
public static String a() {
String e = e();
return TextUtils.isEmpty(e) ? String.format("https://%s:443", "a.appbaqend.com") : e;
}
private static String a(String str, String str2) {
String str3 = "Could not find SystemProperties class";
try {
String property = System.getProperty(str);
if (!TextUtils.isEmpty(property)) {
if (!".none.".equalsIgnoreCase(property)) {
return property;
}
}
} catch (Throwable th) {
Log.log("Debug", "System.getProperty() threw an exception");
Log.log(th);
}
try {
String str4 = (String) Class.forName("android.os.SystemProperties").getMethod("get", String.class, String.class).invoke(null, str, str2);
if (!TextUtils.isEmpty(str4)) {
if (!".none.".equalsIgnoreCase(str4)) {
return str4;
}
}
return str2;
} catch (ClassNotFoundException e) {
e = e;
Log.log("Debug", str3);
Log.log(e);
return str2;
} catch (IllegalAccessException e2) {
e = e2;
str3 = "Could not access SystemProperties.get()";
Log.log("Debug", str3);
Log.log(e);
return str2;
} catch (NoSuchMethodException e3) {
e = e3;
Log.log("Debug", str3);
Log.log(e);
return str2;
} catch (InvocationTargetException e4) {
e = e4;
str3 = "SystemProperties.get() threw an exception";
Log.log("Debug", str3);
Log.log(e);
return str2;
} catch (Throwable th2) {
e = th2;
Log.log(e);
return str2;
}
}
public static List<com.appodeal.ads.utils.j> a(List<JSONObject> list, boolean z) {
String str;
String str2;
ArrayList arrayList = new ArrayList();
if (list != null && list.size() > 0) {
for (JSONObject jSONObject : list) {
try {
String c = bw.c(jSONObject.getString("status"));
if (jSONObject.has("package_name")) {
String[] split = jSONObject.getString("package_name").split(":");
String str3 = split.length >= 1 ? split[0] : c;
str = split.length >= 2 ? split[1] : "-1";
str2 = str3;
} else {
str = "-1";
str2 = c;
}
arrayList.add(new com.appodeal.ads.utils.j(arrayList.size(), list.indexOf(jSONObject), str2, c, str, jSONObject.getString("ecpm"), z));
} catch (Exception e) {
Log.log(e);
}
}
}
return arrayList;
}
public static void a(Activity activity, final j jVar, final a aVar) {
final com.appodeal.ads.utils.i iVar = new com.appodeal.ads.utils.i(activity, new ArrayList<com.appodeal.ads.utils.j>() {
{
addAll(ag.a(j.this.v(), true));
addAll(ag.a(j.this.u(), false));
}
});
final LinearLayout linearLayout = new LinearLayout(activity);
linearLayout.setOrientation(1);
linearLayout.setBackgroundColor(Color.parseColor("#404040"));
linearLayout.setTag("appodeal");
linearLayout.setClickable(true);
EditText editText = new EditText(activity);
editText.setLayoutParams(new LinearLayout.LayoutParams(-1, (int) TypedValue.applyDimension(1, 56.0f, activity.getResources().getDisplayMetrics())));
editText.setTextSize(20.0f);
editText.setTextColor(-1);
editText.setHint("What adunit you search for?");
editText.setHintTextColor(Color.parseColor("#80ffffff"));
editText.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable editable) {
com.appodeal.ads.utils.i.this.getFilter().filter(editable.toString());
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
}
});
ListView listView = new ListView(activity);
listView.setAdapter((ListAdapter) iVar);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
((InputMethodManager) view.getContext().getSystemService("input_method")).hideSoftInputFromWindow(linearLayout.getWindowToken(), 0);
((ViewGroup) linearLayout.getParent()).removeView(linearLayout);
com.appodeal.ads.utils.j jVar2 = (com.appodeal.ads.utils.j) adapterView.getAdapter().getItem(i);
a aVar2 = aVar;
if (aVar2 != null) {
aVar2.a(jVar2.g, jVar2.f);
}
}
});
listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long j) {
((com.appodeal.ads.utils.i) adapterView.getAdapter()).a();
return true;
}
});
listView.setLayoutParams(new LinearLayout.LayoutParams(-1, -1, 1.0f));
listView.setCacheColorHint(Color.parseColor("#404040"));
listView.setDivider(new ColorDrawable(Color.parseColor("#b3b3b3")));
listView.setDividerHeight(1);
linearLayout.addView(editText);
linearLayout.addView(listView);
activity.addContentView(linearLayout, new ViewGroup.LayoutParams(-1, -1));
}
public static void a(Context context) {
Appodeal.setTesting(aa.b || d());
Log.LogLevel logLevel = Log.LogLevel.none;
if (g()) {
logLevel = b();
}
if (aa.d.getValue() > logLevel.getValue()) {
logLevel = aa.d;
}
Appodeal.setLogLevel(logLevel);
b(context);
}
static Log.LogLevel b() {
try {
return Log.LogLevel.valueOf(a("debug.appodeal.sdk.loglevel", Log.LogLevel.none.name()));
} catch (Exception e) {
Log.log("Debug", "Log Level property is not valid");
Log.log(e);
return Log.LogLevel.none;
}
}
private static void b(Context context) {
try {
String f = f();
if (TextUtils.isEmpty(f)) {
return;
}
if (!f1041a && f == null) {
throw new AssertionError();
}
List asList = Arrays.asList(f.split(","));
for (e.a aVar : e.d(context)) {
if (!asList.contains(aVar.f1153a)) {
Appodeal.disableNetwork(context, aVar.f1153a);
}
}
} catch (Throwable th) {
Log.log(th);
}
}
public static boolean c() {
try {
return Boolean.parseBoolean(a("debug.appodeal.sdk.testactivity", "false"));
} catch (Exception e) {
Log.log("Debug", "Start Test Activity property is not valid");
Log.log(e);
return false;
}
}
private static boolean d() {
try {
return Boolean.parseBoolean(a("debug.appodeal.sdk.testmode", "false"));
} catch (Exception e) {
Log.log("Debug", "Test Mode property is not valid");
Log.log(e);
return false;
}
}
private static String e() {
return a("debug.appodeal.sdk.url", (String) null);
}
private static String f() {
return a("debug.appodeal.sdk.networks", (String) null);
}
private static boolean g() {
try {
return Boolean.parseBoolean(a("debug.appodeal.sdk.log", "false"));
} catch (Exception e) {
Log.log("Debug", "Log Enable property is not valid");
Log.log(e);
return false;
}
}
}