atsameip v0.1版本的 MD5 值为:28547cf98b0a2d02acb37969dcfb83e9
以下内容为反编译后的 g0.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 com.ironsource.mediationsdk.utils.IronSourceConstants;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.json.JSONObject;
public final class g0 {
static final boolean a = !g0.class.desiredAssertionStatus();
class a extends ArrayList<com.appodeal.ads.utils.j> {
final j a;
a(j jVar) {
this.a = jVar;
addAll(g0.a(jVar.q(), true));
addAll(g0.a(jVar.t(), false));
}
}
class b implements TextWatcher {
final com.appodeal.ads.utils.i a;
b(com.appodeal.ads.utils.i iVar) {
this.a = iVar;
}
@Override
public void afterTextChanged(Editable editable) {
this.a.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) {
}
}
class c implements AdapterView.OnItemClickListener {
final LinearLayout a;
final e b;
c(LinearLayout linearLayout, e eVar) {
this.a = linearLayout;
this.b = eVar;
}
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
((InputMethodManager) view.getContext().getSystemService("input_method")).hideSoftInputFromWindow(this.a.getWindowToken(), 0);
((ViewGroup) this.a.getParent()).removeView(this.a);
com.appodeal.ads.utils.j jVar = (com.appodeal.ads.utils.j) adapterView.getAdapter().getItem(i);
e eVar = this.b;
if (eVar != null) {
eVar.a(jVar.g, jVar.f);
}
}
}
class d implements AdapterView.OnItemLongClickListener {
d() {
}
@Override
public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long j) {
((com.appodeal.ads.utils.i) adapterView.getAdapter()).a();
return true;
}
}
public interface e {
void a(int i, boolean z);
}
g0() {
}
private static String a() {
return a("debug.appodeal.sdk.networks", (String) null);
}
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 e2) {
e = e2;
Log.log("Debug", str3);
Log.log(e);
return str2;
} catch (IllegalAccessException e3) {
e = e3;
str3 = "Could not access SystemProperties.get()";
Log.log("Debug", str3);
Log.log(e);
return str2;
} catch (NoSuchMethodException e4) {
e = e4;
Log.log("Debug", str3);
Log.log(e);
return str2;
} catch (InvocationTargetException e5) {
e = e5;
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 a2 = z1.a(jSONObject.getString(IronSourceConstants.EVENTS_STATUS));
if (jSONObject.has("package_name")) {
String[] split = jSONObject.getString("package_name").split(":");
String str3 = split.length >= 1 ? split[0] : a2;
str = split.length >= 2 ? split[1] : "-1";
str2 = str3;
} else {
str = "-1";
str2 = a2;
}
arrayList.add(new com.appodeal.ads.utils.j(arrayList.size(), list.indexOf(jSONObject), str2, a2, str, jSONObject.getString("ecpm"), z));
} catch (Exception e2) {
Log.log(e2);
}
}
}
return arrayList;
}
public static void a(Activity activity, j jVar, e eVar) {
com.appodeal.ads.utils.i iVar = new com.appodeal.ads.utils.i(activity, new a(jVar));
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 b(iVar));
ListView listView = new ListView(activity);
listView.setAdapter((ListAdapter) iVar);
listView.setOnItemClickListener(new c(linearLayout, eVar));
listView.setOnItemLongClickListener(new d());
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));
}
private static void a(Context context) {
try {
String a2 = a();
if (TextUtils.isEmpty(a2)) {
return;
}
if (!a && a2 == null) {
throw new AssertionError();
}
List asList = Arrays.asList(a2.split(","));
for (e.f fVar : com.appodeal.ads.e.c(context)) {
if (!asList.contains(fVar.a)) {
Appodeal.disableNetwork(context, fVar.a);
}
}
} catch (Throwable th) {
Log.log(th);
}
}
public static String b() {
String d2 = d();
return TextUtils.isEmpty(d2) ? String.format("https://%s:443", "a.appbaqend.com") : d2;
}
public static void b(Context context) {
Appodeal.setTesting(a0.b || f());
Log.LogLevel logLevel = Log.LogLevel.none;
if (e()) {
logLevel = c();
}
if (a0.d.getValue() > logLevel.getValue()) {
logLevel = a0.d;
}
Appodeal.setLogLevel(logLevel);
a(context);
}
static Log.LogLevel c() {
try {
return Log.LogLevel.valueOf(a("debug.appodeal.sdk.loglevel", Log.LogLevel.none.name()));
} catch (Exception e2) {
Log.log("Debug", "Log Level property is not valid");
Log.log(e2);
return Log.LogLevel.none;
}
}
private static String d() {
return a("debug.appodeal.sdk.url", (String) null);
}
private static boolean e() {
try {
return Boolean.parseBoolean(a("debug.appodeal.sdk.log", "false"));
} catch (Exception e2) {
Log.log("Debug", "Log Enable property is not valid");
Log.log(e2);
return false;
}
}
private static boolean f() {
try {
return Boolean.parseBoolean(a("debug.appodeal.sdk.testmode", "false"));
} catch (Exception e2) {
Log.log("Debug", "Test Mode property is not valid");
Log.log(e2);
return false;
}
}
public static boolean g() {
try {
return Boolean.parseBoolean(a("debug.appodeal.sdk.testactivity", "false"));
} catch (Exception e2) {
Log.log("Debug", "Start Test Activity property is not valid");
Log.log(e2);
return false;
}
}
}