MD5 校验值:63f8e52e07318fa084f03ba71262387f
d.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package e8; import android.content.Context; import android.content.pm.PackageManager; import android.os.Bundle; import java.security.GeneralSecurityException; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; public class d { public static boolean f8666u = false; private static d f8667v; private static final Object f8668w = new Object(); private final int f8669a; private final int f8670b; private final boolean f8671c; private final long f8672d; private final int f8673e; private int f8674f; private final boolean f8675g; private final boolean f8676h; private boolean f8677i = true; private String f8678j; private String f8679k; private String f8680l; private int f8681m; private final String f8682n; private final int f8683o; private final int f8684p; private boolean f8685q; private final boolean f8686r; private SSLSocketFactory f8687s; private f8.e f8688t; d(Bundle bundle, Context context) { long floatValue; SSLSocketFactory sSLSocketFactory = null; try { SSLContext sSLContext = SSLContext.getInstance("TLS"); sSLContext.init(null, null, null); sSLSocketFactory = sSLContext.getSocketFactory(); } catch (GeneralSecurityException e10) { f8.d.f("MixpanelAPI.Conf", "System has no SSL support. Built-in events editor will not be available", e10); } this.f8687s = sSLSocketFactory; boolean z10 = bundle.getBoolean("com.mixpanel.android.MPConfig.EnableDebugLogging", false); f8666u = z10; if (z10) { f8.d.g(2); } if (bundle.containsKey("com.mixpanel.android.MPConfig.DebugFlushInterval")) { f8.d.k("MixpanelAPI.Conf", "We do not support com.mixpanel.android.MPConfig.DebugFlushInterval anymore. There will only be one flush interval. Please, update your AndroidManifest.xml."); } this.f8669a = bundle.getInt("com.mixpanel.android.MPConfig.BulkUploadLimit", 40); this.f8670b = bundle.getInt("com.mixpanel.android.MPConfig.FlushInterval", 60000); this.f8681m = bundle.getInt("com.mixpanel.android.MPConfig.FlushBatchSize", 50); this.f8671c = bundle.getBoolean("com.mixpanel.android.MPConfig.FlushOnBackground", true); this.f8673e = bundle.getInt("com.mixpanel.android.MPConfig.MinimumDatabaseLimit", 20971520); this.f8674f = bundle.getInt("com.mixpanel.android.MPConfig.MaximumDatabaseLimit", Integer.MAX_VALUE); this.f8682n = bundle.getString("com.mixpanel.android.MPConfig.ResourcePackageName"); this.f8675g = bundle.getBoolean("com.mixpanel.android.MPConfig.DisableAppOpenEvent", true); this.f8676h = bundle.getBoolean("com.mixpanel.android.MPConfig.DisableExceptionHandler", false); this.f8683o = bundle.getInt("com.mixpanel.android.MPConfig.MinimumSessionDuration", 10000); this.f8684p = bundle.getInt("com.mixpanel.android.MPConfig.SessionTimeoutDuration", Integer.MAX_VALUE); this.f8685q = bundle.getBoolean("com.mixpanel.android.MPConfig.UseIpAddressForGeolocation", true); this.f8686r = bundle.getBoolean("com.mixpanel.android.MPConfig.RemoveLegacyResidualFiles", false); Object obj = bundle.get("com.mixpanel.android.MPConfig.DataExpiration"); long j10 = 432000000; if (obj != null) { try { if (obj instanceof Integer) { floatValue = ((Integer) obj).intValue(); } else { if (!(obj instanceof Float)) { throw new NumberFormatException(obj.toString() + " is not a number."); } floatValue = ((Float) obj).floatValue(); } j10 = floatValue; } catch (Exception e11) { f8.d.d("MixpanelAPI.Conf", "Error parsing com.mixpanel.android.MPConfig.DataExpiration meta-data value", e11); } } this.f8672d = j10; boolean containsKey = true ^ bundle.containsKey("com.mixpanel.android.MPConfig.UseIpAddressForGeolocation"); String string = bundle.getString("com.mixpanel.android.MPConfig.EventsEndpoint"); if (string != null) { x(containsKey ? string : e(string, u())); } else { y("https://api.mixpanel.com"); } String string2 = bundle.getString("com.mixpanel.android.MPConfig.PeopleEndpoint"); if (string2 != null) { C(containsKey ? string2 : e(string2, u())); } else { D("https://api.mixpanel.com"); } String string3 = bundle.getString("com.mixpanel.android.MPConfig.GroupsEndpoint"); if (string3 != null) { A(containsKey ? string3 : e(string3, u())); } else { B("https://api.mixpanel.com"); } f8.d.i("MixpanelAPI.Conf", toString()); } private void A(String str) { this.f8680l = str; } private void B(String str) { A(e(str + "/groups/", u())); } private void C(String str) { this.f8679k = str; } private void D(String str) { C(e(str + "/engage/", u())); } private String e(String str, boolean z10) { StringBuilder sb; String str2 = "1"; if (str.contains("?ip=")) { sb = new StringBuilder(); sb.append(str.substring(0, str.indexOf("?ip="))); sb.append("?ip="); } else { sb = new StringBuilder(); sb.append(str); sb.append("?ip="); } sb.append(str2); return sb.toString(); } public static d k(Context context) { synchronized (f8668w) { if (f8667v == null) { f8667v = v(context.getApplicationContext()); } } return f8667v; } private boolean u() { return this.f8685q; } static d v(Context context) { String packageName = context.getPackageName(); try { Bundle bundle = context.getPackageManager().getApplicationInfo(packageName, 128).metaData; if (bundle == null) { bundle = new Bundle(); } return new d(bundle, context); } catch (PackageManager.NameNotFoundException e10) { throw new RuntimeException("Can't configure Mixpanel with package name " + packageName, e10); } } private void x(String str) { this.f8678j = str; } private void y(String str) { x(e(str + "/track/", u())); } public void E(String str) { y(str); D(str); B(str); } public void F(boolean z10) { this.f8685q = z10; x(e(f(), z10)); C(e(p(), z10)); A(e(j(), z10)); } public int a() { return this.f8669a; } public long b() { return this.f8672d; } public boolean c() { return this.f8675g; } public boolean d() { return this.f8676h; } public String f() { return this.f8678j; } public int g() { return this.f8681m; } public int h() { return this.f8670b; } public boolean i() { return this.f8671c; } public String j() { return this.f8680l; } public int l() { return this.f8674f; } public int m() { return this.f8673e; } public int n() { return this.f8683o; } public synchronized f8.e o() { return this.f8688t; } public String p() { return this.f8679k; } public boolean q() { return this.f8686r; } public synchronized SSLSocketFactory r() { return this.f8687s; } public int s() { return this.f8684p; } public boolean t() { return this.f8677i; } public String toString() { return "Mixpanel (7.3.2) configured with:\n TrackAutomaticEvents: " + t() + "\n BulkUploadLimit " + a() + "\n FlushInterval " + h() + "\n FlushInterval " + g() + "\n DataExpiration " + b() + "\n MinimumDatabaseLimit " + m() + "\n MaximumDatabaseLimit " + l() + "\n DisableAppOpenEvent " + c() + "\n EnableDebugLogging " + f8666u + "\n EventsEndpoint " + f() + "\n PeopleEndpoint " + p() + "\n MinimumSessionDuration: " + n() + "\n SessionTimeoutDuration: " + s() + "\n DisableExceptionHandler: " + d() + "\n FlushOnBackground: " + i(); } public void w(boolean z10) { f8666u = z10; f8.d.g(z10 ? 2 : Integer.MAX_VALUE); } public void z(int i10) { this.f8681m = i10; } }