正在查看: Kickcash v16.1 应用的 g.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kickcash v16.1 应用的 g.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.microsoft.clarity.qn;
import android.net.Uri;
import com.microsoft.clarity.gr.m;
import com.microsoft.clarity.gr.q;
import com.microsoft.clarity.hr.b0;
import com.microsoft.clarity.models.AssetType;
import com.microsoft.clarity.models.ingest.SessionEvent;
import java.net.HttpURLConnection;
import kotlin.Pair;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
public final class g implements b {
public class a {
public static final int[] a;
static {
int[] iArr = new int[AssetType.values().length];
iArr[AssetType.Image.ordinal()] = 1;
iArr[AssetType.Typeface.ordinal()] = 2;
iArr[AssetType.Web.ordinal()] = 3;
iArr[AssetType.Unsupported.ordinal()] = 4;
a = iArr;
}
}
public static String e(AssetType assetType) {
String str;
Uri.Builder appendPath = Uri.parse("https://www.clarity.ms/").buildUpon().appendPath("api").appendPath("v1").appendPath("assets");
int i = a.a[assetType.ordinal()];
if (i == 1) {
str = "image";
} else {
if (i != 2) {
if (i == 3) {
throw new IllegalArgumentException("Web assets have their own endpoint");
}
if (i != 4) {
throw new m();
}
throw new IllegalArgumentException("Unexpected asset type");
}
str = "typeface";
}
String uri = appendPath.appendPath(str).build().toString();
Intrinsics.checkNotNullExpressionValue(uri, "parse(BuildConfig.API_BA…)\n .toString()");
return uri;
}
public static boolean f(@NotNull AssetType assetType, @NotNull String str) {
Intrinsics.checkNotNullParameter(str, "hash");
Intrinsics.checkNotNullParameter(assetType, "type");
HttpURLConnection c = com.microsoft.clarity.sn.g.c(e(assetType), "HEAD", b0.f(q.a("Content-Hash", str)));
try {
try {
c.connect();
return com.microsoft.clarity.sn.g.g(c);
} catch (Exception e) {
e.printStackTrace();
c.disconnect();
return false;
}
} finally {
c.disconnect();
}
}
public static boolean g(@NotNull String str) {
Intrinsics.checkNotNullParameter(str, "path");
String uri = Uri.parse("https://www.clarity.ms/").buildUpon().appendPath("api").appendPath("v1").appendPath("assets").appendPath("web").build().toString();
Intrinsics.checkNotNullExpressionValue(uri, "parse(BuildConfig.API_BA…)\n .toString()");
HttpURLConnection c = com.microsoft.clarity.sn.g.c(uri, "HEAD", b0.f(q.a("Content-Path", str)));
try {
try {
c.connect();
return com.microsoft.clarity.sn.g.g(c);
} catch (Exception e) {
e.printStackTrace();
c.disconnect();
return false;
}
} finally {
c.disconnect();
}
}
@Override
public final boolean a(@NotNull AssetType assetType, @NotNull com.microsoft.clarity.nn.b bVar, @NotNull String str) {
Intrinsics.checkNotNullParameter(str, "hash");
Intrinsics.checkNotNullParameter(assetType, "type");
Intrinsics.checkNotNullParameter(bVar, "asset");
if (f(assetType, str)) {
return true;
}
boolean z = false;
HttpURLConnection c = com.microsoft.clarity.sn.g.c(e(assetType), "POST", b0.k(new Pair[]{q.a("Content-Hash", str), q.a("Content-Type", "application/octet-stream")}));
try {
try {
com.microsoft.clarity.sn.g.d(c, bVar);
c.connect();
z = com.microsoft.clarity.sn.g.g(c);
} catch (Exception e) {
e.printStackTrace();
}
return z;
} finally {
c.disconnect();
}
}
@Override
public final boolean b(@NotNull SessionEvent sessionEvent, @NotNull f fVar) {
Intrinsics.checkNotNullParameter(sessionEvent, "sessionEvent");
Intrinsics.checkNotNullParameter(fVar, "type");
return c(sessionEvent.serialize(), fVar);
}
@Override
public final boolean c(@NotNull String str, @NotNull f fVar) {
Intrinsics.checkNotNullParameter(str, "serializedEvent");
Intrinsics.checkNotNullParameter(fVar, "type");
Uri.Builder appendPath = Uri.parse("https://www.clarity.ms/").buildUpon().appendPath("api").appendPath("v1");
StringBuilder sb = new StringBuilder();
sb.append(fVar == f.Playback ? "playback" : "analytics");
sb.append("-events");
String uri = appendPath.appendPath(sb.toString()).build().toString();
Intrinsics.checkNotNullExpressionValue(uri, "parse(BuildConfig.API_BA…)\n .toString()");
HttpURLConnection c = com.microsoft.clarity.sn.g.c(uri, "POST", b0.f(q.a("Content-Type", "application/json")));
try {
try {
com.microsoft.clarity.sn.g.e(c, str);
c.connect();
return com.microsoft.clarity.sn.g.g(c);
} catch (Exception e) {
e.printStackTrace();
c.disconnect();
return false;
}
} finally {
c.disconnect();
}
}
@Override
public final boolean d(@NotNull String str, @NotNull byte[] bArr) {
Intrinsics.checkNotNullParameter(str, "path");
Intrinsics.checkNotNullParameter(bArr, "content");
if (g(str)) {
return true;
}
String uri = Uri.parse("https://www.clarity.ms/").buildUpon().appendPath("api").appendPath("v1").appendPath("assets").appendPath("web").build().toString();
Intrinsics.checkNotNullExpressionValue(uri, "parse(BuildConfig.API_BA…)\n .toString()");
boolean z = false;
HttpURLConnection c = com.microsoft.clarity.sn.g.c(uri, "POST", b0.k(new Pair[]{q.a("Content-Path", str), q.a("Content-Type", "application/octet-stream")}));
try {
try {
com.microsoft.clarity.sn.g.f(c, bArr);
c.connect();
z = com.microsoft.clarity.sn.g.g(c);
} catch (Exception e) {
e.printStackTrace();
}
return z;
} finally {
c.disconnect();
}
}
}