Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 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.adjust.sdk.Constants;
import com.mbridge.msdk.foundation.entity.CampaignEx;
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 a = new AtomicBoolean(false);
final w0 f4569b;
final Context c;
e(w0 w0Var, Context context) {
this.f4569b = w0Var;
this.c = 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 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, "UTF-8")).getQueryParameter("mt_deeplink");
if (TextUtils.isEmpty(queryParameter)) {
v0.a("AttributionHandler: deeplink is empty");
return;
} else {
a(new JSONObject().put(Constants.DEEPLINK, queryParameter));
return;
}
} catch (Throwable th) {
v0.b("AttributionHandler error: handling referrer failed with error: ", th);
return;
}
} else {
str2 = "AttributionHandler: attribution has already been received";
}
v0.a(str2);
}
void a(JSONObject jSONObject) {
String optString = jSONObject.optString(Constants.DEEPLINK);
if (TextUtils.isEmpty(optString)) {
v0.a("AttributionHandler: deeplink is empty");
} else if (!this.a.compareAndSet(false, true)) {
v0.a("AttributionHandler: attribution has already been received");
} else {
l0 a = l0.a(this.c);
if (!TextUtils.isEmpty(a.f())) {
v0.a("AttributionHandler: attribution has already been received");
return;
}
a.i(jSONObject.toString());
final MyTracker.AttributionListener d = this.f4569b.d();
if (d == null) {
return;
}
Handler c = this.f4569b.c();
if (c == null) {
c = d.a;
}
final MyTrackerAttribution newAttribution = MyTrackerAttribution.newAttribution(optString);
try {
c.post(new Runnable() {
@Override
public final void run() {
e.a(MyTracker.AttributionListener.this, newAttribution);
}
});
} catch (Throwable th) {
v0.b("AttributionHandler error: exception occurred while post runnable", th);
}
}
}
boolean a() {
if (this.a.get()) {
return true;
}
return !TextUtils.isEmpty(l0.a(this.c).f());
}
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");
} else if (!optJSONObject.has(CampaignEx.JSON_NATIVE_VIDEO_ERROR)) {
a(optJSONObject);
} else {
int optInt = optJSONObject.optInt(CampaignEx.JSON_NATIVE_VIDEO_ERROR);
v0.a("AttributionHandler: attribution response returned error " + optInt);
}
} catch (Throwable th) {
v0.b("AttributionHandler error: handling server attribution failed with error: ", th);
}
}
}