Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.my.tracker.obfuscated;
import android.content.Context;
import android.net.Uri;
import android.os.Handler;
import android.text.TextUtils;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.my.tracker.MyTracker;
import com.my.tracker.MyTrackerAttribution;
import java.net.URLDecoder;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONObject;
public final class e {
final AtomicBoolean f51807a = new AtomicBoolean(false);
final w0 f51808b;
final Context f51809c;
public e(w0 w0Var, Context context) {
this.f51808b = w0Var;
this.f51809c = context.getApplicationContext();
}
public static e a(w0 w0Var, Context context) {
return new e(w0Var, context);
}
public static void a(MyTracker.AttributionListener attributionListener, MyTrackerAttribution myTrackerAttribution) {
try {
attributionListener.onReceiveAttribution(myTrackerAttribution);
} catch (Throwable unused) {
v0.b("AttributionHandler error: exception at AttributionListener::onReceiveAttribution()");
}
}
public void b(String str) {
if (a()) {
v0.a("AttributionHandler: attribution has already been received");
return;
}
try {
JSONObject optJSONObject = new JSONObject(str).optJSONObject("attribution");
if (optJSONObject == null) {
v0.a("AttributionHandler: empty attribution object has been returned");
return;
}
if (!optJSONObject.has("error")) {
a(optJSONObject);
return;
}
v0.a("AttributionHandler: attribution response returned error " + optJSONObject.optInt("error"));
} catch (Throwable th2) {
v0.b("AttributionHandler error: handling server attribution failed with error: ", th2);
}
}
public void a(String str) {
String str2;
if (TextUtils.isEmpty(str)) {
str2 = "AttributionHandler: referrer is empty";
} else {
if (!a()) {
try {
String queryParameter = Uri.parse("https://my.com/?" + URLDecoder.decode(str, C.UTF8_NAME)).getQueryParameter("mt_deeplink");
if (TextUtils.isEmpty(queryParameter)) {
v0.a("AttributionHandler: deeplink is empty");
return;
} else {
a(new JSONObject().put("deeplink", queryParameter));
return;
}
} catch (Throwable th2) {
v0.b("AttributionHandler error: handling referrer failed with error: ", th2);
return;
}
}
str2 = "AttributionHandler: attribution has already been received";
}
v0.a(str2);
}
public void a(JSONObject jSONObject) {
String optString = jSONObject.optString("deeplink");
if (TextUtils.isEmpty(optString)) {
v0.a("AttributionHandler: deeplink is empty");
return;
}
if (!this.f51807a.compareAndSet(false, true)) {
v0.a("AttributionHandler: attribution has already been received");
return;
}
l0 a11 = l0.a(this.f51809c);
if (!TextUtils.isEmpty(a11.f())) {
v0.a("AttributionHandler: attribution has already been received");
return;
}
a11.i(jSONObject.toString());
final MyTracker.AttributionListener d11 = this.f51808b.d();
if (d11 == null) {
return;
}
Handler c11 = this.f51808b.c();
if (c11 == null) {
c11 = d.f51790a;
}
final MyTrackerAttribution newAttribution = MyTrackerAttribution.newAttribution(optString);
try {
c11.post(new Runnable() {
@Override
public final void run() {
e.a(MyTracker.AttributionListener.this, newAttribution);
}
});
} catch (Throwable th2) {
v0.b("AttributionHandler error: exception occurred while post runnable", th2);
}
}
public boolean a() {
if (this.f51807a.get()) {
return true;
}
return !TextUtils.isEmpty(l0.a(this.f51809c).f());
}
}