导航菜单

页面标题

页面副标题

Atlys v4.8.7 - o.java 源代码

正在查看: Atlys v4.8.7 应用的 o.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package xk;

import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.webkit.URLUtil;
import android.webkit.WebSettings;
import in.juspay.hyper.constants.LogLevel;
import in.juspay.hyper.constants.LogSubCategory;
import in.juspay.hypersdk.core.PaymentConstants;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Locale;
import org.json.JSONException;
import org.json.JSONObject;
import rh.AbstractC1076d;
import zk.C1257a;

public abstract class o {
    public static final int[] h = {3, 4, 5, 8, 9, 10};
    public JSONObject a;
    public final int b;
    public final E.j c;
    public long d;
    public final Context e;
    public final HashSet f;
    public int g;

    public o(Context context, int i) {
        this.d = 0L;
        this.g = 0;
        this.e = context;
        this.b = i;
        this.c = E.j.U(context);
        this.a = new JSONObject();
        this.f = new HashSet();
    }

    public static xk.o b(org.json.JSONObject r6, android.content.Context r7) {
        throw new UnsupportedOperationException("Method not decompiled: xk.o.b(org.json.JSONObject, android.content.Context):xk.o");
    }

    public abstract void a();

    public int c() {
        return 1;
    }

    public final String d() {
        StringBuilder sb = new StringBuilder();
        this.c.getClass();
        sb.append(URLUtil.isHttpsUrl(null) ? null : "https://api2.branch.io/");
        sb.append(AbstractC1076d.y(this.b));
        return sb.toString();
    }

    public abstract void e(int i, String str);

    public boolean f() {
        return !(this instanceof q);
    }

    public void g() {
        LinkedHashMap linkedHashMap;
        String str;
        boolean z = this instanceof w;
        if (z || (this instanceof C1257a)) {
            E.j jVar = this.c;
            u uVar = new u(jVar);
            String urlString = jVar.k0("bnc_external_intent_uri");
            kotlin.jvm.internal.l.h(urlString, "urlString");
            Uri parse = Uri.parse(urlString);
            Iterator<String> it = parse.getQueryParameterNames().iterator();
            while (true) {
                boolean hasNext = it.hasNext();
                linkedHashMap = (LinkedHashMap) uVar.a;
                if (!hasNext) {
                    break;
                }
                String originalParamName = it.next();
                kotlin.jvm.internal.l.g(originalParamName, "originalParamName");
                Locale locale = Locale.ROOT;
                String lowerCase = originalParamName.toLowerCase(locale);
                kotlin.jvm.internal.l.g(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                String queryParameter = parse.getQueryParameter(originalParamName);
                E.j.q("Found URL Query Parameter - Key: " + lowerCase + ", Value: " + queryParameter);
                String lowerCase2 = lowerCase.toLowerCase(locale);
                kotlin.jvm.internal.l.g(lowerCase2, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                if (d6.k.i0("gclid").contains(lowerCase2)) {
                    i iVar = (i) linkedHashMap.get(lowerCase);
                    if (iVar == null) {
                        iVar = new i(lowerCase, 30);
                    }
                    iVar.b = queryParameter;
                    iVar.c = new Date();
                    iVar.d = true;
                    if (iVar.e == 0) {
                        iVar.e = kotlin.jvm.internal.l.c(lowerCase, "gclid") ? 2592000L : 0L;
                    }
                    linkedHashMap.put(lowerCase, iVar);
                }
            }
            JSONObject l = u.l(linkedHashMap);
            E.j jVar2 = (E.j) uVar.b;
            jVar2.getClass();
            jVar2.G0("bnc_referringUrlQueryParameters", String.valueOf(l));
            E.j.q(jVar2.e0().toString());
            u uVar2 = new u(jVar);
            LinkedHashMap linkedHashMap2 = new LinkedHashMap();
            JSONObject jSONObject = new JSONObject();
            if ((this instanceof C1257a) || z) {
                LinkedHashMap linkedHashMap3 = (LinkedHashMap) uVar2.a;
                i iVar2 = (i) linkedHashMap3.get("gclid");
                if (iVar2 != null && (str = iVar2.b) != null && !kotlin.jvm.internal.l.c(str, "bnc_no_value")) {
                    jSONObject.put("gclid", iVar2.b);
                    if (z) {
                        jSONObject.put("is_deeplink_gclid", iVar2.d);
                    }
                    iVar2.d = false;
                    jVar.G0("bnc_referringUrlQueryParameters", String.valueOf(u.l(linkedHashMap3)));
                }
            }
            if (jSONObject.length() > 0) {
                Iterator<String> keys = jSONObject.keys();
                while (keys.hasNext()) {
                    String key = keys.next();
                    kotlin.jvm.internal.l.g(key, "key");
                    Object obj = jSONObject.get(key);
                    kotlin.jvm.internal.l.g(obj, "gclid.get(key)");
                    linkedHashMap2.put(key, obj);
                }
            }
            JSONObject jSONObject2 = new JSONObject(linkedHashMap2);
            Iterator<String> keys2 = jSONObject2.keys();
            while (keys2.hasNext()) {
                String next = keys2.next();
                try {
                    this.a.put(next, jSONObject2.get(next));
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }
        }
    }

    public abstract void h(x xVar, e eVar);

    public boolean i() {
        return this instanceof q;
    }

    public void j(JSONObject jSONObject) {
        String str;
        String str2;
        u uVar;
        this.a = jSONObject;
        try {
            if (c() == 1) {
                u d = u.d();
                JSONObject jSONObject2 = this.a;
                Context context = (Context) d.b;
                C1170C c = d.c();
                String str3 = c.a;
                if (u.h(str3)) {
                    uVar = d;
                } else {
                    uVar = d;
                    jSONObject2.put("hardware_id", str3);
                    jSONObject2.put("is_hardware_id_real", c.b);
                }
                String a = Ae.a.a(context);
                if (!u.h(a)) {
                    jSONObject2.put("anon_id", a);
                }
                String str4 = Build.MANUFACTURER;
                if (!u.h(str4)) {
                    jSONObject2.put("brand", str4);
                }
                String str5 = Build.MODEL;
                if (!u.h(str5)) {
                    jSONObject2.put("model", str5);
                }
                DisplayMetrics f = Ae.a.f(context);
                jSONObject2.put("screen_dpi", f.densityDpi);
                jSONObject2.put("screen_height", f.heightPixels);
                jSONObject2.put("screen_width", f.widthPixels);
                jSONObject2.put("wifi", "wifi".equalsIgnoreCase(Ae.a.b(context)));
                jSONObject2.put("ui_mode", Ae.a.g(context));
                String d2 = Ae.a.d(context);
                if (!u.h(d2)) {
                    jSONObject2.put("os", d2);
                }
                jSONObject2.put("os_version", Build.VERSION.SDK_INT);
                uVar.i(this, jSONObject2);
                String country = Locale.getDefault().getCountry();
                if (!TextUtils.isEmpty(country)) {
                    jSONObject2.put("country", country);
                }
                String language = Locale.getDefault().getLanguage();
                if (!TextUtils.isEmpty(language)) {
                    jSONObject2.put("language", language);
                }
                String c2 = Ae.a.c();
                if (!TextUtils.isEmpty(c2)) {
                    jSONObject2.put("local_ip", c2);
                }
            } else {
                JSONObject jSONObject3 = new JSONObject();
                this.a.put("user_data", jSONObject3);
                u d3 = u.d();
                Context context2 = (Context) d3.b;
                String str6 = d3.c().a;
                if (u.h(str6)) {
                    str = "language";
                } else {
                    str = "language";
                    jSONObject3.put("android_id", str6);
                }
                String a2 = Ae.a.a(context2);
                if (!u.h(a2)) {
                    jSONObject3.put("anon_id", a2);
                }
                String str7 = Build.MANUFACTURER;
                if (!u.h(str7)) {
                    jSONObject3.put("brand", str7);
                }
                String str8 = Build.MODEL;
                if (!u.h(str8)) {
                    jSONObject3.put("model", str8);
                }
                DisplayMetrics f2 = Ae.a.f(context2);
                jSONObject3.put("screen_dpi", f2.densityDpi);
                jSONObject3.put("screen_height", f2.heightPixels);
                jSONObject3.put("screen_width", f2.widthPixels);
                jSONObject3.put("ui_mode", Ae.a.g(context2));
                String d4 = Ae.a.d(context2);
                if (!u.h(d4)) {
                    jSONObject3.put("os", d4);
                }
                jSONObject3.put("os_version", Build.VERSION.SDK_INT);
                d3.i(this, jSONObject3);
                String country2 = Locale.getDefault().getCountry();
                if (!TextUtils.isEmpty(country2)) {
                    jSONObject3.put("country", country2);
                }
                String language2 = Locale.getDefault().getLanguage();
                if (!TextUtils.isEmpty(language2)) {
                    jSONObject3.put(str, language2);
                }
                String c3 = Ae.a.c();
                if (!TextUtils.isEmpty(c3)) {
                    jSONObject3.put("local_ip", c3);
                }
                E.j jVar = this.c;
                if (jVar != null) {
                    if (!u.h(jVar.d0())) {
                        jSONObject3.put("randomized_device_token", jVar.d0());
                    }
                    String k0 = jVar.k0("bnc_identity");
                    if (!u.h(k0)) {
                        jSONObject3.put("developer_identity", k0);
                    }
                    String k02 = jVar.k0("bnc_app_store_source");
                    if (!"bnc_no_value".equals(k02)) {
                        jSONObject3.put("app_store", k02);
                    }
                }
                jSONObject3.put("app_version", d3.b());
                jSONObject3.put(PaymentConstants.Category.SDK, LogSubCategory.LifeCycle.ANDROID);
                jSONObject3.put("sdk_version", "5.6.4");
                if (TextUtils.isEmpty(e.r)) {
                    try {
                        E.j.q("Retrieving user agent string from WebSettings");
                        e.r = WebSettings.getDefaultUserAgent(context2);
                    } catch (Exception e) {
                        E.j.q(e.getMessage());
                    }
                    str2 = e.r;
                } else {
                    str2 = e.r;
                }
                jSONObject3.put("user_agent", str2);
            }
        } catch (JSONException unused) {
        }
        this.a.put(LogLevel.DEBUG, false);
    }

    public boolean k() {
        return this instanceof p;
    }

    public boolean l() {
        return this instanceof C1257a;
    }

    public JSONObject m() {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("REQ_POST", this.a);
            jSONObject.put("REQ_POST_PATH", AbstractC1076d.y(this.b));
            return jSONObject;
        } catch (JSONException unused) {
            return null;
        }
    }

    public final void n(JSONObject jSONObject) {
        try {
            Context context = (Context) u.d().b;
            boolean z = false;
            if (context != null) {
                try {
                    PackageManager packageManager = context.getPackageManager();
                    Intent launchIntentForPackage = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
                    if (launchIntentForPackage != null) {
                        z = !packageManager.queryIntentActivities(launchIntentForPackage, 65536).isEmpty();
                    }
                } catch (Exception e) {
                    E.j.r("Error obtaining PackageInfo", e);
                }
            }
            String str = z ? "FULL_APP" : "INSTANT_APP";
            if (c() != 4) {
                jSONObject.put(PaymentConstants.ENV, str);
                return;
            }
            JSONObject optJSONObject = jSONObject.optJSONObject("user_data");
            if (optJSONObject != null) {
                optJSONObject.put(PaymentConstants.ENV, str);
            }
        } catch (Exception unused) {
        }
    }

    public o(int i, JSONObject jSONObject, Context context) {
        this.d = 0L;
        this.g = 0;
        this.e = context;
        this.b = i;
        this.a = jSONObject;
        this.c = E.j.U(context);
        this.f = new HashSet();
    }
}