360 Wi-Fi v1.0.1版本的 MD5 值为:53dc85b63eb655b13344ce30ddaccae2

以下内容为反编译后的 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.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 b;
    final Context c;

    public e(w0 w0Var, Context context) {
        this.b = w0Var;
        this.c = context.getApplicationContext();
    }

    public static e a(w0 w0Var, Context context) {
        return new e(w0Var, context);
    }

    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("error")) {
                a(optJSONObject);
            } else {
                int optInt = optJSONObject.optInt("error");
                v0.a("AttributionHandler: attribution response returned error " + optInt);
            }
        } catch (Throwable th) {
            v0.b("AttributionHandler error: handling server attribution failed with error: ", th);
        }
    }

    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);
    }

    public 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());
            MyTracker.AttributionListener d = this.b.d();
            if (d == null) {
                return;
            }
            Handler c = this.b.c();
            if (c == null) {
                c = d.a;
            }
            try {
                c.post(new ILliiILllillL(2, d, MyTrackerAttribution.newAttribution(optString)));
            } catch (Throwable th) {
                v0.b("AttributionHandler error: exception occurred while post runnable", th);
            }
        }
    }

    public boolean a() {
        if (this.a.get()) {
            return true;
        }
        return !TextUtils.isEmpty(l0.a(this.c).f());
    }
}