Proxy Master v3.4.9版本的 MD5 值为:14d0aa2468d13530c8f6e96bcc114bf5

以下内容为反编译后的 h.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.firebase.messaging.Constants;
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 h {
    final AtomicBoolean f10917a = new AtomicBoolean(false);
    final a1 f10918b;
    final Context f10919c;

    public h(a1 a1Var, Context context) {
        this.f10918b = a1Var;
        this.f10919c = context.getApplicationContext();
    }

    public static h a(a1 a1Var, Context context) {
        return new h(a1Var, context);
    }

    public static void a(MyTracker.AttributionListener attributionListener, MyTrackerAttribution myTrackerAttribution) {
        try {
            attributionListener.onReceiveAttribution(myTrackerAttribution);
        } catch (Throwable unused) {
            z0.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)) {
                    z0.a("AttributionHandler: deeplink is empty");
                    return;
                } else {
                    a(new JSONObject().put("deeplink", queryParameter));
                    return;
                }
            } catch (Throwable th) {
                z0.b("AttributionHandler error: handling referrer failed with error: ", th);
                return;
            }
        } else {
            str2 = "AttributionHandler: attribution has already been received";
        }
        z0.a(str2);
    }

    public void a(JSONObject jSONObject) {
        String optString = jSONObject.optString("deeplink");
        if (TextUtils.isEmpty(optString)) {
            z0.a("AttributionHandler: deeplink is empty");
        } else if (!this.f10917a.compareAndSet(false, true)) {
            z0.a("AttributionHandler: attribution has already been received");
        } else {
            r0 a8 = r0.a(this.f10919c);
            if (!TextUtils.isEmpty(a8.g())) {
                z0.a("AttributionHandler: attribution has already been received");
                return;
            }
            a8.i(jSONObject.toString());
            MyTracker.AttributionListener d10 = this.f10918b.d();
            if (d10 == null) {
                return;
            }
            Handler c10 = this.f10918b.c();
            if (c10 == null) {
                c10 = g.f10906a;
            }
            try {
                c10.post(new h1(2, d10, MyTrackerAttribution.newAttribution(optString)));
            } catch (Throwable th) {
                z0.b("AttributionHandler error: exception occurred while post runnable", th);
            }
        }
    }

    public boolean a() {
        if (this.f10917a.get()) {
            return true;
        }
        return !TextUtils.isEmpty(r0.a(this.f10919c).g());
    }

    public void b(String str) {
        if (a()) {
            z0.a("AttributionHandler: attribution has already been received");
            return;
        }
        try {
            JSONObject optJSONObject = new JSONObject(str).optJSONObject("attribution");
            if (optJSONObject == null) {
                z0.a("AttributionHandler: empty attribution object has been returned");
            } else if (!optJSONObject.has(Constants.IPC_BUNDLE_KEY_SEND_ERROR)) {
                a(optJSONObject);
            } else {
                int optInt = optJSONObject.optInt(Constants.IPC_BUNDLE_KEY_SEND_ERROR);
                z0.a("AttributionHandler: attribution response returned error " + optInt);
            }
        } catch (Throwable th) {
            z0.b("AttributionHandler error: handling server attribution failed with error: ", th);
        }
    }
}