导航菜单

页面标题

页面副标题

CallApp v2.226 - te.java 源代码

正在查看: CallApp v2.226 应用的 te.java JAVA 源代码文件

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


package com.fyber.fairbid;

import android.os.Handler;
import android.os.Looper;
import com.digitalturbine.onedt.igniteauth.network.protobuf.IgniteRequestOuterClass;
import com.digitalturbine.onedt.igniteauth.network.protobuf.IgniteResponseOuterClass;
import com.fyber.fairbid.http.connection.HttpConnection;
import com.google.protobuf.GeneratedMessageLite;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;

public abstract class te {
    public static byte[] a(String str, String str2, se seVar) {
        try {
            IgniteRequestOuterClass.IgniteRequest.Builder createBuilder = IgniteRequestOuterClass.IgniteRequest.h.createBuilder();
            createBuilder.b(str);
            createBuilder.a(str2);
            return createBuilder.build().toByteArray();
        } catch (Throwable th) {
            new Handler(Looper.getMainLooper()).post(new wz(seVar, new Exception(a1.d0.C("Failed to build ignite request: ", th.getMessage())), 1));
            return null;
        }
    }

    public static void b(byte[] bArr, se seVar) {
        HttpURLConnection httpURLConnection;
        HttpURLConnection httpURLConnection2 = null;
        try {
            httpURLConnection = (HttpURLConnection) new URL("https://init-mp.fyber.com/init").openConnection();
        } catch (Throwable th) {
            th = th;
        }
        try {
            httpURLConnection.setDoOutput(true);
            httpURLConnection.setDoInput(true);
            httpURLConnection.setRequestMethod("POST");
            httpURLConnection.setRequestProperty(HttpConnection.CONTENT_TYPE_HEADER, "application/x-protobuf; messageType=IgniteRequest");
            OutputStream outputStream = httpURLConnection.getOutputStream();
            if (bArr != null) {
                outputStream.write(bArr);
            }
            outputStream.close();
            a(httpURLConnection, seVar);
            httpURLConnection.disconnect();
        } catch (Throwable th2) {
            th = th2;
            httpURLConnection2 = httpURLConnection;
            try {
                new Handler(Looper.getMainLooper()).post(new com.callapp.contacts.widget.referandearn.a(19, seVar, th));
            } finally {
                if (httpURLConnection2 != null) {
                    httpURLConnection2.disconnect();
                }
            }
        }
    }

    public static void a(byte[] bArr, se seVar) {
        new Thread((Runnable) new com.callapp.contacts.widget.referandearn.a(20, bArr, seVar)).start();
    }

    public static void a(HttpURLConnection httpURLConnection, se seVar) {
        int responseCode = httpURLConnection.getResponseCode();
        if (responseCode == 200) {
            a(httpURLConnection.getInputStream(), seVar);
        } else {
            new Handler(Looper.getMainLooper()).post(new wz(seVar, new Exception(a1.d0.j(responseCode, "HTTP error code: ")), 0));
        }
    }

    public static void a(InputStream inputStream, se seVar) {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        byte[] bArr = new byte[16384];
        while (true) {
            int read = inputStream.read(bArr, 0, 16384);
            if (read != -1) {
                byteArrayOutputStream.write(bArr, 0, read);
            } else {
                byteArrayOutputStream.flush();
                byte[] byteArray = byteArrayOutputStream.toByteArray();
                byteArrayOutputStream.close();
                new Handler(Looper.getMainLooper()).post(new com.callapp.contacts.widget.referandearn.a(21, seVar, GeneratedMessageLite.parseFrom(IgniteResponseOuterClass.IgniteResponse.d, byteArray)));
                return;
            }
        }
    }
}