正在查看: Bhakti v5.4.0 应用的 AbstractC0849j.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Bhakti v5.4.0 应用的 AbstractC0849j.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package L8;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import kotlin.collections.C5694v;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
import okhttp3.HttpUrl;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import p8.C6226A;
public abstract class AbstractC0849j {
public static final String[] f13075a = {"com.android.chrome", "com.chrome.beta", "com.chrome.dev"};
public static final Fc.i f13076b = new Fc.i(1);
public static final Fc.i f13077c = new Fc.i(2);
public static final String a() {
if (Q8.a.b(AbstractC0849j.class)) {
return null;
}
try {
Context a2 = C6226A.a();
List<ResolveInfo> queryIntentServices = a2.getPackageManager().queryIntentServices(new Intent("android.support.customtabs.action.CustomTabsService"), 0);
Intrinsics.checkNotNullExpressionValue(queryIntentServices, "context.packageManager.q…ervices(serviceIntent, 0)");
String[] strArr = f13075a;
Intrinsics.checkNotNullParameter(strArr, "<this>");
HashSet hashSet = new HashSet(kotlin.collections.Q.b(3));
C5694v.N(strArr, hashSet);
Iterator<ResolveInfo> it = queryIntentServices.iterator();
while (it.hasNext()) {
ServiceInfo serviceInfo = it.next().serviceInfo;
if (serviceInfo != null && hashSet.contains(serviceInfo.packageName)) {
return serviceInfo.packageName;
}
}
return null;
} catch (Throwable th2) {
Q8.a.a(AbstractC0849j.class, th2);
return null;
}
}
public static final String b() {
if (Q8.a.b(AbstractC0849j.class)) {
return null;
}
try {
return "fbconnect://cct." + C6226A.a().getPackageName();
} catch (Throwable th2) {
Q8.a.a(AbstractC0849j.class, th2);
return null;
}
}
public static final String c() {
return Ai.o.u(new Object[]{C6226A.f65722r}, 1, "m.%s", "format(format, *args)");
}
public static final String d() {
return Ai.o.u(new Object[]{C6226A.f()}, 1, "https://graph.%s", "format(format, *args)");
}
public static final String e() {
return Ai.o.u(new Object[]{C6226A.f65721q}, 1, "m.%s", "format(format, *args)");
}
public static final String f(String developerDefinedRedirectURI) {
if (Q8.a.b(AbstractC0849j.class)) {
return null;
}
try {
Intrinsics.checkNotNullParameter(developerDefinedRedirectURI, "developerDefinedRedirectURI");
return q8.g.m(C6226A.a(), developerDefinedRedirectURI) ? developerDefinedRedirectURI : q8.g.m(C6226A.a(), b()) ? b() : HttpUrl.FRAGMENT_ENCODE_SET;
} catch (Throwable th2) {
Q8.a.a(AbstractC0849j.class, th2);
return null;
}
}
public static JSONObject g(BufferedInputStream stream) {
Intrinsics.checkNotNullParameter(stream, "stream");
if (stream.read() != 0) {
return null;
}
int i10 = 0;
int i11 = 0;
for (int i12 = 0; i12 < 3; i12++) {
int read = stream.read();
if (read == -1) {
Ai.p pVar = a0.f13037d;
p8.N n = p8.N.CACHE;
AtomicLong atomicLong = O.f13004g;
Intrinsics.checkNotNullExpressionValue("O", "TAG");
Ai.p.H(n, "O", "readHeader: stream.read returned -1 while reading header size");
return null;
}
i11 = (i11 << 8) + (read & 255);
}
byte[] bArr = new byte[i11];
while (i10 < i11) {
int read2 = stream.read(bArr, i10, i11 - i10);
if (read2 < 1) {
Ai.p pVar2 = a0.f13037d;
p8.N n10 = p8.N.CACHE;
AtomicLong atomicLong2 = O.f13004g;
Intrinsics.checkNotNullExpressionValue("O", "TAG");
Ai.p.H(n10, "O", "readHeader: stream.read stopped at " + Integer.valueOf(i10) + " when expected " + i11);
return null;
}
i10 += read2;
}
try {
Object nextValue = new JSONTokener(new String(bArr, Charsets.UTF_8)).nextValue();
if (nextValue instanceof JSONObject) {
return (JSONObject) nextValue;
}
Ai.p pVar3 = a0.f13037d;
p8.N n11 = p8.N.CACHE;
AtomicLong atomicLong3 = O.f13004g;
Intrinsics.checkNotNullExpressionValue("O", "TAG");
Ai.p.H(n11, "O", "readHeader: expected JSONObject, got " + nextValue.getClass().getCanonicalName());
return null;
} catch (JSONException e4) {
throw new IOException(e4.getMessage());
}
}
}