正在查看: Oolka v2.4.42 应用的 HttpService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Oolka v2.4.42 应用的 HttpService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mixpanel.android.util;
import android.annotation.SuppressLint;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
public class HttpService implements RemoteService {
public static boolean b;
public final boolean a;
public class a implements Runnable {
public a() {
}
@Override
public void run() {
throw new UnsupportedOperationException("Method not decompiled: com.mixpanel.android.util.HttpService.a.run():void");
}
}
public HttpService(boolean z, com.mixpanel.android.util.a aVar) {
this.a = z;
}
public static boolean g(String str) {
return !str.toLowerCase().contains("https://api.mixpanel.com".toLowerCase());
}
public static byte[] j(InputStream inputStream) throws IOException {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] bArr = new byte[8192];
while (true) {
int read = inputStream.read(bArr, 0, 8192);
if (read == -1) {
byteArrayOutputStream.flush();
return byteArrayOutputStream.toByteArray();
}
byteArrayOutputStream.write(bArr, 0, read);
}
}
@Override
public byte[] a(@androidx.annotation.NonNull java.lang.String r33, com.mixpanel.android.util.c r34, java.util.Map<java.lang.String, java.lang.Object> r35, java.util.Map<java.lang.String, java.lang.String> r36, byte[] r37, javax.net.ssl.SSLSocketFactory r38) throws com.mixpanel.android.util.RemoteService.ServiceUnavailableException, java.io.IOException {
throw new UnsupportedOperationException("Method not decompiled: com.mixpanel.android.util.HttpService.a(java.lang.String, com.mixpanel.android.util.c, java.util.Map, java.util.Map, byte[], javax.net.ssl.SSLSocketFactory):byte[]");
}
@Override
@SuppressLint({"MissingPermission"})
public boolean b(Context context, b bVar) {
if (b || i(bVar)) {
return false;
}
boolean z = true;
try {
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
if (activeNetworkInfo == null) {
MPLog.i("MixpanelAPI.Message", "A default network has not been set so we cannot be certain whether we are offline");
} else {
boolean isConnectedOrConnecting = activeNetworkInfo.isConnectedOrConnecting();
StringBuilder sb = new StringBuilder();
sb.append("ConnectivityManager says we ");
sb.append(isConnectedOrConnecting ? "are" : "are not");
sb.append(" online");
MPLog.i("MixpanelAPI.Message", sb.toString());
z = isConnectedOrConnecting;
}
} catch (SecurityException unused) {
MPLog.i("MixpanelAPI.Message", "Don't have permission to check connectivity, will assume we are online");
}
return z;
}
@Override
public void c() {
new Thread(new a()).start();
}
public final void h(HttpURLConnection httpURLConnection, String str, String str2, long j, long j2, long j3, Exception exc) {
}
public final boolean i(b bVar) {
if (bVar == null) {
return false;
}
try {
return bVar.a();
} catch (Exception e) {
MPLog.j("MixpanelAPI.Message", "Client State should not throw exception, will assume is not on offline mode", e);
return false;
}
}
public HttpService() {
this(false, null);
}
}