正在查看: 星辰VPN v1.2.3 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 星辰VPN v1.2.3 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package im.crisp.client.internal.k;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import im.crisp.client.internal.e.d;
import im.crisp.client.internal.e.e;
import im.crisp.client.internal.h.l;
import im.crisp.client.internal.v.f;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Date;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.internal.EverythingIsNonNull;
public final class a {
private static final String a = "CrispImageREST";
private static final String b = "https://image.crisp.chat/";
private static final int c = (int) f.a(42);
private static im.crisp.client.internal.k.b d;
public class C0034a implements Callback<ResponseBody> {
public final c a;
public C0034a(c cVar) {
this.a = cVar;
}
@Override
@EverythingIsNonNull
public void onFailure(Call<ResponseBody> call, Throwable th) {
this.a.a(new e(th));
}
@Override
@EverythingIsNonNull
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
if (!response.isSuccessful()) {
this.a.a(new e(response.code()));
return;
}
ResponseBody body = response.body();
if (body != null) {
Bitmap decodeStream = BitmapFactory.decodeStream(body.byteStream());
if (decodeStream != null) {
this.a.a(decodeStream);
} else {
this.a.a(new e(e.d));
}
}
}
}
public class b implements Callback<ResponseBody> {
public final c a;
public b(c cVar) {
this.a = cVar;
}
@Override
@EverythingIsNonNull
public void onFailure(Call<ResponseBody> call, Throwable th) {
this.a.a(new e(th));
}
@Override
@EverythingIsNonNull
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
if (!response.isSuccessful()) {
this.a.a(new e(response.code()));
return;
}
ResponseBody body = response.body();
if (body != null) {
Bitmap decodeStream = BitmapFactory.decodeStream(body.byteStream());
if (decodeStream != null) {
this.a.a(decodeStream);
} else {
this.a.a(new e(e.d));
}
}
}
}
public interface c {
void a(@NonNull Bitmap bitmap);
void a(@NonNull Throwable th);
}
private static im.crisp.client.internal.k.b a() {
if (d == null) {
d = (im.crisp.client.internal.k.b) new Retrofit.Builder().baseUrl(b).client(im.crisp.client.internal.j.b.c()).build().create(im.crisp.client.internal.k.b.class);
}
return d;
}
@Nullable
public static URL a(String str) {
try {
return new URL("https://image.crisp.chat/avatar/operator/" + str + "/" + c + "/?" + new Date().getTime());
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
public static void a(@NonNull c cVar) {
l p = im.crisp.client.internal.b.a.i().p();
if (p == null) {
cVar.a(new im.crisp.client.internal.e.a(im.crisp.client.internal.e.a.b));
return;
}
try {
a().a(im.crisp.client.internal.j.b.f(), c, p.f()).enqueue(new C0034a(cVar));
} catch (d e) {
cVar.a(e);
}
}
public static void a(@NonNull c cVar, String str) {
a().b(str, c, new Date().getTime()).enqueue(new b(cVar));
}
@Nullable
public static URL b() {
l p = im.crisp.client.internal.b.a.i().p();
if (p == null) {
return null;
}
try {
return new URL("https://image.crisp.chat/avatar/website/" + im.crisp.client.internal.j.b.f() + "/" + c + "/?" + p.f());
} catch (d | MalformedURLException e) {
e.printStackTrace();
return null;
}
}
}