GoooBet v1.0版本的 MD5 值为:ff9748f16167bfd7735b669c0a9931c5
以下内容为反编译后的 k.java 源代码,内容仅作参考
package com.my.tracker.obfuscated;
import android.content.Context;
import android.net.Uri;
import android.os.Handler;
import android.text.TextUtils;
import com.google.android.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 k {
final AtomicBoolean f3198a = new AtomicBoolean(false);
final f b;
final Context c;
public class a implements Runnable {
final MyTracker.AttributionListener f3199a;
final MyTrackerAttribution b;
a(k kVar, MyTracker.AttributionListener attributionListener, MyTrackerAttribution myTrackerAttribution) {
this.f3199a = attributionListener;
this.b = myTrackerAttribution;
}
@Override
public void run() {
try {
this.f3199a.onReceiveAttribution(this.b);
} catch (Throwable unused) {
e.b("AttributionHandler error: exception at AttributionListener::onReceiveAttribution()");
}
}
}
k(f fVar, Context context) {
this.b = fVar;
this.c = context.getApplicationContext();
}
public static k a(f fVar, Context context) {
return new k(fVar, context);
}
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)) {
e.a("AttributionHandler: deeplink is empty");
return;
} else {
a(new JSONObject().put("deeplink", queryParameter));
return;
}
} catch (Throwable th) {
e.b("AttributionHandler error: handling referrer failed with error: ", th);
return;
}
}
str2 = "AttributionHandler: attribution has already been received";
}
e.a(str2);
}
void a(JSONObject jSONObject) {
String optString = jSONObject.optString("deeplink");
if (TextUtils.isEmpty(optString)) {
e.a("AttributionHandler: deeplink is empty");
return;
}
if (!this.f3198a.compareAndSet(false, true)) {
e.a("AttributionHandler: attribution has already been received");
return;
}
m0 a2 = m0.a(this.c);
if (!TextUtils.isEmpty(a2.e())) {
e.a("AttributionHandler: attribution has already been received");
return;
}
a2.h(jSONObject.toString());
MyTracker.AttributionListener b = this.b.b();
if (b == null) {
return;
}
Handler a3 = this.b.a();
if (a3 == null) {
a3 = g.f3181a;
}
try {
a3.post(new a(this, b, MyTrackerAttribution.newAttribution(optString)));
} catch (Throwable th) {
e.b("AttributionHandler error: exception occurred while post runnable", th);
}
}
boolean a() {
if (this.f3198a.get()) {
return true;
}
return !TextUtils.isEmpty(m0.a(this.c).e());
}
public void b(String str) {
if (a()) {
e.a("AttributionHandler: attribution has already been received");
return;
}
try {
JSONObject optJSONObject = new JSONObject(str).optJSONObject("attribution");
if (optJSONObject == null) {
e.a("AttributionHandler: empty attribution object has been returned");
return;
}
if (!optJSONObject.has("error")) {
a(optJSONObject);
return;
}
e.a("AttributionHandler: attribution response returned error " + optJSONObject.optInt("error"));
} catch (Throwable th) {
e.b("AttributionHandler error: handling server attribution failed with error: ", th);
}
}
}