APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Gizmo
版本号:1.7.0
包名称:ai.saveall.app

MD5 校验值:51aae3247d6bd20bca268c4c9a4dd21c

反编译源代码说明

AFc1iSDK.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package com.appsflyer.internal;

import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
import kotlin.collections.AbstractC0827p;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;

public final class AFc1iSDK {

    @NotNull
    public static final AFa1wSDK AFa1wSDK = new AFa1wSDK(null);

    @NotNull
    public static String values = "https://%smonitorsdk.%s/remote-debug/exception-manager";

    @NotNull
    public byte[] AFInAppEventType;
    public Map<String, String> AFKeystoreWrapper;
    public int valueOf;

    public static final class AFa1wSDK {
        private AFa1wSDK() {
        }

        public AFa1wSDK(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }
    }

    public AFc1iSDK(@NotNull byte[] bArr, Map<String, String> map, int i5) {
        Intrinsics.checkNotNullParameter(bArr, "");
        this.AFInAppEventType = bArr;
        this.AFKeystoreWrapper = map;
        this.valueOf = i5;
    }

    public final boolean valueOf() {
        URLConnection openConnection;
        String str;
        boolean z5 = false;
        long currentTimeMillis = System.currentTimeMillis();
        HttpURLConnection httpURLConnection = null;
        try {
            String format = String.format(values, AppsFlyerLib.getInstance().getHostPrefix(), AFa1dSDK.valueOf().getHostName());
            Intrinsics.checkNotNullExpressionValue(format, "");
            Intrinsics.checkNotNullParameter(format, "");
            openConnection = new URL(format).openConnection();
        } catch (Throwable th) {
            th = th;
        }
        if (openConnection == null) {
            throw new NullPointerException("null cannot be cast to non-null type java.net.HttpURLConnection");
        }
        HttpURLConnection httpURLConnection2 = (HttpURLConnection) openConnection;
        try {
            httpURLConnection2.setRequestMethod("POST");
            StringBuilder sb = new StringBuilder();
            sb.append(httpURLConnection2.getRequestMethod());
            sb.append(':');
            sb.append(httpURLConnection2.getURL());
            StringBuilder sb2 = new StringBuilder(sb.toString());
            sb2.append("\n length: ");
            sb2.append(new String(this.AFInAppEventType, kotlin.text.b.f15693b).length());
            Map<String, String> map = this.AFKeystoreWrapper;
            if (map != null) {
                for (Map.Entry<String, String> entry : map.entrySet()) {
                    sb2.append("\n ");
                    sb2.append(entry.getKey());
                    sb2.append(": ");
                    sb2.append(entry.getValue());
                }
            }
            StringBuilder sb3 = new StringBuilder("HTTP: [");
            sb3.append(httpURLConnection2.hashCode());
            sb3.append("] ");
            sb3.append((Object) sb2);
            String obj = sb3.toString();
            Intrinsics.checkNotNullParameter(obj, "");
            AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj)));
            httpURLConnection2.setInstanceFollowRedirects(false);
            httpURLConnection2.setUseCaches(false);
            httpURLConnection2.setReadTimeout(this.valueOf);
            httpURLConnection2.setConnectTimeout(this.valueOf);
            httpURLConnection2.addRequestProperty("Content-Type", "application/json");
            Map<String, String> map2 = this.AFKeystoreWrapper;
            if (map2 != null) {
                for (Map.Entry<String, String> entry2 : map2.entrySet()) {
                    httpURLConnection2.addRequestProperty(entry2.getKey(), entry2.getValue());
                }
            }
            httpURLConnection2.setDoOutput(true);
            httpURLConnection2.setRequestProperty("Content-Length", String.valueOf(this.AFInAppEventType.length));
        } catch (Throwable th2) {
            th = th2;
            httpURLConnection = httpURLConnection2;
            try {
                long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
                StringBuilder sb4 = new StringBuilder("error: ");
                sb4.append(th);
                sb4.append("\n\ttook ");
                sb4.append(currentTimeMillis2);
                sb4.append("ms\n\t");
                sb4.append(th.getMessage());
                String obj2 = sb4.toString();
                StringBuilder sb5 = new StringBuilder("HTTP: [");
                sb5.append(httpURLConnection != null ? httpURLConnection.hashCode() : 0);
                sb5.append("] ");
                sb5.append(obj2);
                String obj3 = sb5.toString();
                Intrinsics.checkNotNullParameter(obj3, "");
                AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj3)));
                if (httpURLConnection != null) {
                    httpURLConnection.disconnect();
                }
                return z5;
            } finally {
                if (httpURLConnection != null) {
                    httpURLConnection.disconnect();
                }
            }
        }
        try {
            OutputStream outputStream = httpURLConnection2.getOutputStream();
            Intrinsics.checkNotNullExpressionValue(outputStream, "");
            BufferedOutputStream bufferedOutputStream = outputStream instanceof BufferedOutputStream ? (BufferedOutputStream) outputStream : new BufferedOutputStream(outputStream, 8192);
            bufferedOutputStream.write(this.AFInAppEventType);
            bufferedOutputStream.close();
            InputStream inputStream = AFc1kSDK.valueOf(httpURLConnection2) ? httpURLConnection2.getInputStream() : httpURLConnection2.getErrorStream();
            if (inputStream != null) {
                Intrinsics.checkNotNullExpressionValue(inputStream, "");
                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, kotlin.text.b.f15693b), 8192);
                str = AbstractC0827p.F(n4.o.e(bufferedReader), null, null, null, 0, null, null, 63, null);
                bufferedReader.close();
            }
            str = "";
            long currentTimeMillis3 = System.currentTimeMillis() - currentTimeMillis;
            StringBuilder sb6 = new StringBuilder("response code:");
            sb6.append(httpURLConnection2.getResponseCode());
            sb6.append(' ');
            sb6.append(httpURLConnection2.getResponseMessage());
            sb6.append("\n\tbody:");
            sb6.append(str);
            sb6.append("\n\ttook ");
            sb6.append(currentTimeMillis3);
            sb6.append("ms");
            String obj4 = sb6.toString();
            StringBuilder sb7 = new StringBuilder("HTTP: [");
            sb7.append(httpURLConnection2.hashCode());
            sb7.append("] ");
            sb7.append(obj4);
            String obj5 = sb7.toString();
            Intrinsics.checkNotNullParameter(obj5, "");
            AFLogger.afRDLog("[Exception Manager]: ".concat(String.valueOf(obj5)));
            z5 = AFc1kSDK.valueOf(httpURLConnection2);
            httpURLConnection2.disconnect();
            return z5;
        } finally {
        }
    }
}