正在查看: Bhakti v5.4.0 应用的 o0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Bhakti v5.4.0 应用的 o0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package L8;
import Fp.p;
import Q8.a;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.view.View;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import androidx.fragment.app.FragmentActivity;
import b5.C0045c;
import iq.c;
import iq.i;
import iq.k;
import iq.r;
import java.io.BufferedInputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.HttpURLConnection;
import java.net.URLConnection;
import java.net.URLDecoder;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import jq.o;
import kotlin.Unit;
import kotlin.collections.G;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.N;
import kotlin.text.Charsets;
import kotlin.text.Regex;
import kotlin.text.StringsKt__StringsKt;
import mp.v;
import okhttp3.HttpUrl;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import p8.F;
import p8.M;
import p8.b;
import p8.t;
import q8.g;
import q8.m;
import qp.C0116f;
import z5.K;
import zc.C0121b;
import zc.C0123f;
import zc.h;
public abstract class o0 {
public static int a = 0;
public static long b = -1;
public static long c = -1;
public static long d = -1;
public static String e = "";
public static String f = "";
public static String g = "NoCarrier";
public static String h = "";
public static Locale i;
public static final void A(URLConnection uRLConnection) {
if (uRLConnection == null || !(uRLConnection instanceof HttpURLConnection)) {
return;
}
((HttpURLConnection) uRLConnection).disconnect();
}
public static void A0(Parcel parcel, int i2, Parcelable parcelable, int i3, boolean z) {
if (parcelable == null) {
if (z) {
G0(parcel, i2, 0);
}
} else {
int H0 = H0(i2, parcel);
parcelable.writeToParcel(parcel, i3);
I0(H0, parcel);
}
}
public static final Object B(Object obj, String fieldName) {
Intrinsics.checkNotNullParameter(obj, "<this>");
Intrinsics.checkNotNullParameter(fieldName, "fieldName");
return C(obj, N.k(obj.getClass(), fieldName));
}
public static void B0(Parcel parcel, int i2, String str, boolean z) {
if (str == null) {
if (z) {
G0(parcel, i2, 0);
}
} else {
int H0 = H0(i2, parcel);
parcel.writeString(str);
I0(H0, parcel);
}
}
public static final Object C(Object obj, Field field) {
Intrinsics.checkNotNullParameter(obj, "<this>");
Intrinsics.checkNotNullParameter(field, "field");
Intrinsics.checkNotNullParameter(field, "<this>");
field.setAccessible(true);
Object obj2 = field.get(obj);
if (obj2 == null) {
return null;
}
return obj2;
}
public static void C0(Parcel parcel, int i2, String[] strArr, boolean z) {
if (strArr == null) {
if (z) {
G0(parcel, i2, 0);
}
} else {
int H0 = H0(i2, parcel);
parcel.writeStringArray(strArr);
I0(H0, parcel);
}
}
public static final String D(Context context) {
if (context == null) {
return "null";
}
if (context == context.getApplicationContext()) {
return "unknown";
}
String simpleName = context.getClass().getSimpleName();
Intrinsics.checkNotNullExpressionValue(simpleName, "{\n context.javaClass.simpleName\n }");
return simpleName;
}
public static void D0(Parcel parcel, int i2, List list) {
if (list == null) {
return;
}
int H0 = H0(i2, parcel);
parcel.writeStringList(list);
I0(H0, parcel);
}
public static String E(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
String str = m.c;
Intrinsics.checkNotNullParameter(context, "context");
if (m.a() == null) {
synchronized (m.c()) {
try {
if (m.a() == null) {
String string = context.getSharedPreferences("com.facebook.sdk.appEventPreferences", 0).getString("anonymousAppDeviceGUID", null);
if (!a.b(m.class)) {
try {
m.g = string;
} catch (Throwable th2) {
a.a(m.class, th2);
}
}
if (m.a() == null) {
String str2 = "XZ" + UUID.randomUUID();
if (!a.b(m.class)) {
try {
m.g = str2;
} catch (Throwable th3) {
a.a(m.class, th3);
}
}
context.getSharedPreferences("com.facebook.sdk.appEventPreferences", 0).edit().putString("anonymousAppDeviceGUID", m.a()).apply();
}
}
Unit unit = Unit.a;
} catch (Throwable th4) {
throw th4;
}
}
}
String a2 = m.a();
if (a2 != null) {
return a2;
}
throw new IllegalStateException("Required value was null.");
}
public static void E0(Parcel parcel, int i2, Parcelable[] parcelableArr, int i3) {
if (parcelableArr == null) {
return;
}
int H0 = H0(i2, parcel);
parcel.writeInt(parcelableArr.length);
for (Parcelable parcelable : parcelableArr) {
if (parcelable == null) {
parcel.writeInt(0);
} else {
int dataPosition = parcel.dataPosition();
parcel.writeInt(1);
int dataPosition2 = parcel.dataPosition();
parcelable.writeToParcel(parcel, i3);
int dataPosition3 = parcel.dataPosition();
parcel.setDataPosition(dataPosition);
parcel.writeInt(dataPosition3 - dataPosition2);
parcel.setDataPosition(dataPosition3);
}
}
I0(H0, parcel);
}
public static final String F(Context context) {
String string;
Intrinsics.checkNotNullParameter(context, "context");
try {
p8.A a2 = p8.A.a;
g.B();
String str = p8.A.e;
if (str != null) {
return str;
}
ApplicationInfo applicationInfo = context.getApplicationInfo();
int i2 = applicationInfo.labelRes;
if (i2 == 0) {
string = applicationInfo.nonLocalizedLabel.toString();
} else {
string = context.getString(i2);
Intrinsics.checkNotNullExpressionValue(string, "context.getString(stringId)");
}
return string;
} catch (Exception unused) {
return HttpUrl.FRAGMENT_ENCODE_SET;
}
}
public static void F0(Parcel parcel, int i2, List list, boolean z) {
if (list == null) {
if (z) {
G0(parcel, i2, 0);
return;
}
return;
}
int H0 = H0(i2, parcel);
int size = list.size();
parcel.writeInt(size);
for (int i3 = 0; i3 < size; i3++) {
Parcelable parcelable = (Parcelable) list.get(i3);
if (parcelable == null) {
parcel.writeInt(0);
} else {
int dataPosition = parcel.dataPosition();
parcel.writeInt(1);
int dataPosition2 = parcel.dataPosition();
parcelable.writeToParcel(parcel, 0);
int dataPosition3 = parcel.dataPosition();
parcel.setDataPosition(dataPosition);
parcel.writeInt(dataPosition3 - dataPosition2);
parcel.setDataPosition(dataPosition3);
}
}
I0(H0, parcel);
}
public static L8.C0024d G(android.content.Context r17) {
throw new UnsupportedOperationException("Method not decompiled: L8.o0.G(android.content.Context):L8.d");
}
public static void G0(Parcel parcel, int i2, int i3) {
parcel.writeInt(i2 | (i3 << 16));
}
public static final Date H(Bundle bundle, String str, Date dateBase) {
long parseLong;
Intrinsics.checkNotNullParameter(dateBase, "dateBase");
if (bundle == null) {
return null;
}
Object obj = bundle.get(str);
if (!(obj instanceof Long)) {
if (obj instanceof String) {
try {
parseLong = Long.parseLong((String) obj);
} catch (NumberFormatException unused) {
}
}
return null;
}
parseLong = ((Number) obj).longValue();
if (parseLong == 0) {
return new Date(Long.MAX_VALUE);
}
return new Date((parseLong * 1000) + dateBase.getTime());
}
public static int H0(int i2, Parcel parcel) {
parcel.writeInt(i2 | (-65536));
parcel.writeInt(0);
return parcel.dataPosition();
}
public static final JSONObject I() {
if (a.b(o0.class)) {
return null;
}
try {
String string = p8.A.a().getSharedPreferences("com.facebook.sdk.DataProcessingOptions", 0).getString("data_processing_options", null);
if (string != null) {
try {
return new JSONObject(string);
} catch (JSONException unused) {
}
}
return null;
} catch (Throwable th2) {
a.a(o0.class, th2);
return null;
}
}
public static void I0(int i2, Parcel parcel) {
int dataPosition = parcel.dataPosition();
parcel.setDataPosition(i2 - 4);
parcel.writeInt(dataPosition - i2);
parcel.setDataPosition(dataPosition);
}
public static final void J(n0 callback, String accessToken) {
String str;
Intrinsics.checkNotNullParameter(accessToken, "accessToken");
Intrinsics.checkNotNullParameter(callback, "callback");
JSONObject a2 = i0.a(accessToken);
if (a2 != null) {
callback.a(a2);
return;
}
p8.E m0Var = new m0(callback, accessToken);
Bundle bundle = new Bundle();
Date date = b.p;
b j2 = A5.C.j();
if (j2 == null || (str = j2.k) == null) {
str = "facebook";
}
bundle.putString("fields", str.equals("instagram") ? "id,name,profile_picture" : "id,name,first_name,middle_name,last_name");
bundle.putString("access_token", accessToken);
p8.I i2 = new p8.I(null, "me", null, null, new F(0));
Intrinsics.checkNotNullParameter(bundle, "<set-?>");
i2.d = bundle;
i2.k(M.GET);
i2.j(m0Var);
i2.d();
}
public static final String K(View view) {
Intrinsics.checkNotNullParameter(view, "<this>");
return view.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(view));
}
public static final Method L(Class clazz, String methodName, Class... parameterTypes) {
Intrinsics.checkNotNullParameter(clazz, "clazz");
Intrinsics.checkNotNullParameter(methodName, "methodName");
Intrinsics.checkNotNullParameter(parameterTypes, "parameterTypes");
try {
return clazz.getMethod(methodName, (Class[]) Arrays.copyOf(parameterTypes, parameterTypes.length));
} catch (NoSuchMethodException unused) {
return null;
}
}
public static final Method M(String className, String methodName, Class... parameterTypes) {
Intrinsics.checkNotNullParameter(className, "className");
Intrinsics.checkNotNullParameter(methodName, "methodName");
Intrinsics.checkNotNullParameter(parameterTypes, "parameterTypes");
try {
Class<?> clazz = Class.forName(className);
Intrinsics.checkNotNullExpressionValue(clazz, "clazz");
return L(clazz, methodName, (Class[]) Arrays.copyOf(parameterTypes, parameterTypes.length));
} catch (ClassNotFoundException unused) {
return null;
}
}
public static final String N(Object obj) {
Intrinsics.checkNotNullParameter(obj, "<this>");
String simpleName = obj.getClass().getSimpleName();
Intrinsics.checkNotNullExpressionValue(simpleName, "javaClass.simpleName");
return simpleName;
}
public static final Object O(String str, String str2, JSONObject jsonObject) {
Intrinsics.checkNotNullParameter(jsonObject, "jsonObject");
Object opt = jsonObject.opt(str);
if (opt != null && (opt instanceof String)) {
opt = new JSONTokener((String) opt).nextValue();
}
if (opt == null || (opt instanceof JSONObject) || (opt instanceof JSONArray)) {
return opt;
}
if (str2 == null) {
throw new t("Got an unexpected non-JSON object.");
}
JSONObject jSONObject = new JSONObject();
jSONObject.putOpt(str2, opt);
return jSONObject;
}
public static C0045c P(A5.y refHolder, SQLiteDatabase sqLiteDatabase) {
Intrinsics.checkNotNullParameter(refHolder, "refHolder");
Intrinsics.checkNotNullParameter(sqLiteDatabase, "sqLiteDatabase");
C0045c c0045c = (C0045c) refHolder.b;
if (c0045c != null) {
Intrinsics.checkNotNullParameter(sqLiteDatabase, "sqLiteDatabase");
if (Intrinsics.c(c0045c.a, sqLiteDatabase)) {
return c0045c;
}
}
C0045c c0045c2 = new C0045c(sqLiteDatabase);
refHolder.b = c0045c2;
return c0045c2;
}
public static String Q(String str, byte[] bArr) {
try {
MessageDigest hash = MessageDigest.getInstance(str);
Intrinsics.checkNotNullExpressionValue(hash, "hash");
hash.update(bArr);
byte[] digest = hash.digest();
StringBuilder sb = new StringBuilder();
Intrinsics.checkNotNullExpressionValue(digest, "digest");
for (byte b2 : digest) {
sb.append(Integer.toHexString((b2 >> 4) & 15));
sb.append(Integer.toHexString(b2 & 15));
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "builder.toString()");
return sb2;
} catch (NoSuchAlgorithmException unused) {
return null;
}
}
public static final Object R(Object obj, Method method, Object... args) {
Intrinsics.checkNotNullParameter(method, "method");
Intrinsics.checkNotNullParameter(args, "args");
try {
return method.invoke(obj, Arrays.copyOf(args, args.length));
} catch (IllegalAccessException | InvocationTargetException unused) {
return null;
}
}
public static final boolean S() {
try {
Intent intent = new Intent("android.intent.action.VIEW");
String format = String.format("fb%s://applinks", Arrays.copyOf(new Object[]{p8.A.b()}, 1));
Intrinsics.checkNotNullExpressionValue(format, "format(format, *args)");
intent.setData(Uri.parse(format));
Context a2 = p8.A.a();
PackageManager packageManager = a2.getPackageManager();
String packageName = a2.getPackageName();
List<ResolveInfo> queryIntentActivities = packageManager.queryIntentActivities(intent, 65536);
Intrinsics.checkNotNullExpressionValue(queryIntentActivities, "packageManager.queryInte…nager.MATCH_DEFAULT_ONLY)");
Iterator<ResolveInfo> it = queryIntentActivities.iterator();
while (it.hasNext()) {
if (Intrinsics.c(packageName, it.next().activityInfo.packageName)) {
return true;
}
}
} catch (Exception unused) {
}
return false;
}
public static final boolean T(FragmentActivity context) {
Intrinsics.checkNotNullParameter(context, "context");
if (Build.VERSION.SDK_INT >= 27) {
return context.getPackageManager().hasSystemFeature("android.hardware.type.pc");
}
String DEVICE = Build.DEVICE;
if (DEVICE != null) {
Intrinsics.checkNotNullExpressionValue(DEVICE, "DEVICE");
if (new Regex(".+_cheets|cheets_.+").c(DEVICE)) {
return true;
}
}
return false;
}
public static final boolean U() {
if (a.b(o0.class)) {
return false;
}
try {
JSONObject I = I();
if (I == null) {
return false;
}
try {
JSONArray jSONArray = I.getJSONArray("data_processing_options");
int length = jSONArray.length();
for (int i2 = 0; i2 < length; i2++) {
String string = jSONArray.getString(i2);
Intrinsics.checkNotNullExpressionValue(string, "options.getString(i)");
String lowerCase = string.toLowerCase();
Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase()");
if (Intrinsics.c(lowerCase, "ldu")) {
return true;
}
}
} catch (Exception unused) {
}
return false;
} catch (Throwable th2) {
a.a(o0.class, th2);
return false;
}
}
public static boolean V(Context context) {
Method M = M("com.google.android.gms.common.GooglePlayServicesUtil", "isGooglePlayServicesAvailable", Context.class);
if (M == null) {
return false;
}
Object R = R(null, M, context);
return (R instanceof Integer) && Intrinsics.c(R, 0);
}
public static boolean W(Context context) {
Method M = M("com.google.android.gms.common.GooglePlayServicesUtil", "isGooglePlayServicesAvailable", Context.class);
if (M == null) {
return false;
}
Object R = R(null, M, context);
return (R instanceof Integer) && Intrinsics.c(R, 0);
}
public static final boolean X(String str) {
return str == null || str.length() == 0;
}
public static final boolean Y(Uri uri) {
return uri != null && ("http".equalsIgnoreCase(uri.getScheme()) || "https".equalsIgnoreCase(uri.getScheme()) || "fbstaging".equalsIgnoreCase(uri.getScheme()));
}
public static final ArrayList Z(JSONArray jsonArray) {
Intrinsics.checkNotNullParameter(jsonArray, "jsonArray");
ArrayList arrayList = new ArrayList();
int length = jsonArray.length();
for (int i2 = 0; i2 < length; i2++) {
arrayList.add(jsonArray.getString(i2));
}
return arrayList;
}
public static r a(Function1 builderAction) {
iq.b json = c.d;
Intrinsics.checkNotNullParameter(json, "from");
Intrinsics.checkNotNullParameter(builderAction, "builderAction");
Intrinsics.checkNotNullParameter(json, "json");
i iVar = new i();
k kVar = json.a;
iVar.a = kVar.a;
iVar.b = kVar.f;
iVar.c = kVar.b;
iVar.d = kVar.c;
boolean z = kVar.e;
iVar.e = z;
String str = kVar.g;
iVar.f = str;
iVar.g = kVar.h;
String str2 = kVar.j;
iVar.h = str2;
iq.a aVar = kVar.p;
iVar.i = aVar;
iVar.j = kVar.l;
iVar.k = kVar.m;
iVar.l = kVar.n;
iVar.m = kVar.o;
iVar.n = kVar.k;
iVar.o = kVar.d;
boolean z2 = kVar.i;
iVar.p = z2;
iVar.q = json.b;
builderAction.invoke(iVar);
if (z2) {
if (!Intrinsics.c(str2, "type")) {
throw new IllegalArgumentException("Class discriminator should not be specified when array polymorphism is specified");
}
if (aVar != iq.a.POLYMORPHIC) {
throw new IllegalArgumentException("useArrayPolymorphism option can only be used if classDiscriminatorMode in a default POLYMORPHIC state.");
}
}
if (z) {
if (!Intrinsics.c(str, " ")) {
for (int i2 = 0; i2 < str.length(); i2++) {
char charAt = str.charAt(i2);
if (charAt != ' ' && charAt != '\t' && charAt != '\r' && charAt != '\n') {
throw new IllegalArgumentException("Only whitespace, tab, newline and carriage return are allowed as pretty print symbols. Had ".concat(str).toString());
}
}
}
} else if (!Intrinsics.c(str, " ")) {
throw new IllegalArgumentException("Indent should not be specified when default printing mode is used");
}
boolean z3 = iVar.a;
boolean z4 = iVar.c;
boolean z6 = iVar.b;
boolean z8 = iVar.m;
iq.a aVar2 = iVar.i;
boolean z10 = iVar.d;
boolean z11 = iVar.o;
boolean z12 = iVar.e;
String str3 = iVar.f;
boolean z13 = iVar.g;
boolean z14 = iVar.p;
String str4 = iVar.h;
k configuration = new k(z3, z4, z10, z11, z12, z6, str3, z13, z14, str4, iVar.n, iVar.j, iVar.k, iVar.l, z8, aVar2);
qd.b module = iVar.q;
Intrinsics.checkNotNullParameter(configuration, "configuration");
Intrinsics.checkNotNullParameter(module, "module");
r rVar = new r(configuration, module);
if (!Intrinsics.c(module, kq.a.a)) {
o collector = new o(z14, str4);
module.getClass();
Intrinsics.checkNotNullParameter(collector, "collector");
kotlin.collections.J j2 = kotlin.collections.J.a;
j2.getClass();
G g3 = G.a;
g3.getClass();
j2.getClass();
g3.getClass();
j2.getClass();
g3.getClass();
j2.getClass();
g3.getClass();
}
return rVar;
}
public static final HashMap a0(String str) {
Intrinsics.checkNotNullParameter(str, "str");
if (str.length() == 0) {
return new HashMap();
}
try {
HashMap hashMap = new HashMap();
JSONObject jSONObject = new JSONObject(str);
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String key = keys.next();
Intrinsics.checkNotNullExpressionValue(key, "key");
String string = jSONObject.getString(key);
Intrinsics.checkNotNullExpressionValue(string, "jsonObject.getString(key)");
hashMap.put(key, string);
}
return hashMap;
} catch (JSONException unused) {
return new HashMap();
}
}
public static final boolean b(Object obj, Object obj2) {
return obj == null ? obj2 == null : obj.equals(obj2);
}
public static final String b0(Map map) {
Intrinsics.checkNotNullParameter(map, "map");
boolean isEmpty = map.isEmpty();
String str = HttpUrl.FRAGMENT_ENCODE_SET;
if (!isEmpty) {
try {
JSONObject jSONObject = new JSONObject();
for (Map.Entry entry : map.entrySet()) {
jSONObject.put((String) entry.getKey(), (String) entry.getValue());
}
str = jSONObject.toString();
} catch (JSONException unused) {
}
Intrinsics.checkNotNullExpressionValue(str, "{\n try {\n va…\n \"\"\n }\n }");
}
return str;
}
public static final Uri c(Bundle bundle, String str, String str2) {
Uri.Builder builder = new Uri.Builder();
builder.scheme("https");
builder.authority(str);
builder.path(str2);
if (bundle != null) {
for (String str3 : bundle.keySet()) {
Object obj = bundle.get(str3);
if (obj instanceof String) {
builder.appendQueryParameter(str3, (String) obj);
}
}
}
Uri build = builder.build();
Intrinsics.checkNotNullExpressionValue(build, "builder.build()");
return build;
}
public static final Bundle c0(String str) {
List split$default;
List split$default2;
Bundle bundle = new Bundle();
if (!X(str)) {
if (str == null) {
throw new IllegalStateException("Required value was null.");
}
split$default = StringsKt__StringsKt.split$default(str, new String[]{"&"}, false, 0, 6, null);
for (String str2 : (String[]) split$default.toArray(new String[0])) {
split$default2 = StringsKt__StringsKt.split$default(str2, new String[]{"="}, false, 0, 6, null);
String[] strArr = (String[]) split$default2.toArray(new String[0]);
try {
if (strArr.length == 2) {
bundle.putString(URLDecoder.decode(strArr[0], "UTF-8"), URLDecoder.decode(strArr[1], "UTF-8"));
} else if (strArr.length == 1) {
bundle.putString(URLDecoder.decode(strArr[0], "UTF-8"), HttpUrl.FRAGMENT_ENCODE_SET);
}
} catch (UnsupportedEncodingException unused) {
p8.A a2 = p8.A.a;
}
}
}
return bundle;
}
public static long d(boolean z, int i2, z5.a backoffPolicy, long j2, long j3, int i3, boolean z2, long j4, long j5, long j6, long j7) {
Intrinsics.checkNotNullParameter(backoffPolicy, "backoffPolicy");
if (j7 != Long.MAX_VALUE && z2) {
return i3 == 0 ? j7 : p.c(j7, 900000 + j3);
}
if (z) {
return p.e(backoffPolicy == z5.a.LINEAR ? i2 * j2 : (long) Math.scalb(j2, i2 - 1), 18000000L) + j3;
}
if (z2) {
long j8 = i3 == 0 ? j3 + j4 : j3 + j6;
return (j5 == j6 || i3 != 0) ? j8 : (j6 - j5) + j8;
}
if (j3 == -1) {
return Long.MAX_VALUE;
}
return j3 + j4;
}
public static final void d0(Bundle bundle, JSONArray jSONArray) {
Intrinsics.checkNotNullParameter(bundle, "bundle");
if (jSONArray instanceof boolean[]) {
bundle.putBooleanArray("media", (boolean[]) jSONArray);
return;
}
if (jSONArray instanceof double[]) {
bundle.putDoubleArray("media", (double[]) jSONArray);
return;
}
if (jSONArray instanceof int[]) {
bundle.putIntArray("media", (int[]) jSONArray);
} else if (jSONArray instanceof long[]) {
bundle.putLongArray("media", (long[]) jSONArray);
} else {
bundle.putString("media", jSONArray.toString());
}
}
public static void e(String str, boolean z) {
if (!z) {
throw new IllegalArgumentException(String.valueOf(str));
}
}
public static final void e0(Bundle b2, String str, String str2) {
Intrinsics.checkNotNullParameter(b2, "b");
if (X(str2)) {
return;
}
b2.putString(str, str2);
}
public static void f(boolean z) {
if (!z) {
throw new IllegalArgumentException();
}
}
public static final void f0(Uri uri, Bundle b2, String str) {
Intrinsics.checkNotNullParameter(b2, "b");
if (uri != null) {
e0(b2, str, uri.toString());
}
}
public static void g(Handler handler) {
Looper myLooper = Looper.myLooper();
if (myLooper != handler.getLooper()) {
String name = myLooper != null ? myLooper.getThread().getName() : "null current looper";
String name2 = handler.getLooper().getThread().getName();
StringBuilder sb = new StringBuilder(String.valueOf(name).length() + String.valueOf(name2).length() + 35 + 1);
Ii.b.x(sb, "Must be called on ", name2, " thread, but got ", name);
sb.append(".");
throw new IllegalStateException(sb.toString());
}
}
public static final HashMap g0(Parcel parcel) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
int readInt = parcel.readInt();
if (readInt < 0) {
return null;
}
HashMap hashMap = new HashMap();
for (int i2 = 0; i2 < readInt; i2++) {
String readString = parcel.readString();
String readString2 = parcel.readString();
if (readString != null && readString2 != null) {
hashMap.put(readString, readString2);
}
}
return hashMap;
}
public static void h(String str) {
if (!c3.c.c0()) {
throw new IllegalStateException(str);
}
}
public static final String h0(InputStream inputStream) {
BufferedInputStream bufferedInputStream;
Throwable th2;
InputStreamReader inputStreamReader;
try {
bufferedInputStream = new BufferedInputStream(inputStream);
try {
inputStreamReader = new InputStreamReader(bufferedInputStream);
try {
StringBuilder sb = new StringBuilder();
char[] cArr = new char[2048];
while (true) {
int read = inputStreamReader.read(cArr);
if (read == -1) {
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "{\n bufferedInputStr…gBuilder.toString()\n }");
s(bufferedInputStream);
s(inputStreamReader);
return sb2;
}
sb.append(cArr, 0, read);
}
} catch (Throwable th3) {
th2 = th3;
s(bufferedInputStream);
s(inputStreamReader);
throw th2;
}
} catch (Throwable th4) {
th2 = th4;
inputStreamReader = null;
}
} catch (Throwable th5) {
bufferedInputStream = null;
th2 = th5;
inputStreamReader = null;
}
}
public static void i(String str) {
if (TextUtils.isEmpty(str)) {
throw new IllegalArgumentException("Given String is empty or null");
}
}
public static final void i0(Runnable runnable) {
try {
p8.A.d().execute(runnable);
} catch (Exception unused) {
}
}
public static void j(String str, String str2) {
if (TextUtils.isEmpty(str)) {
throw new IllegalArgumentException(str2);
}
}
public static final void j0(Object obj, String fieldName, Object obj2) {
Intrinsics.checkNotNullParameter(obj, "<this>");
Intrinsics.checkNotNullParameter(fieldName, "fieldName");
k0(obj, N.k(obj.getClass(), fieldName), obj2);
}
public static void k(String str) {
if (c3.c.c0()) {
throw new IllegalStateException(str);
}
}
public static final void k0(Object obj, Field field, Object obj2) {
Intrinsics.checkNotNullParameter(obj, "<this>");
Intrinsics.checkNotNullParameter(field, "field");
Intrinsics.checkNotNullParameter(field, "<this>");
field.setAccessible(true);
Field declaredField = Field.class.getDeclaredField("accessFlags");
declaredField.setAccessible(true);
declaredField.setInt(field, field.getModifiers() & (-17));
field.set(obj, obj2);
}
public static void l(Object obj) {
if (obj == null) {
throw new NullPointerException("null reference");
}
}
public static final void l0(org.json.JSONObject r4, L8.C0024d r5, java.lang.String r6, boolean r7, android.content.Context r8) {
throw new UnsupportedOperationException("Method not decompiled: L8.o0.l0(org.json.JSONObject, L8.d, java.lang.String, boolean, android.content.Context):void");
}
public static void m(Object obj, String str) {
if (obj == null) {
throw new NullPointerException(str);
}
}
public static final void m0(android.content.Context r11, org.json.JSONObject r12) {
throw new UnsupportedOperationException("Method not decompiled: L8.o0.m0(android.content.Context, org.json.JSONObject):void");
}
public static void n(Object obj) {
if (obj == null) {
throw new NullPointerException("Cannot return null from a non-@Nullable @Provides method");
}
}
public static final String n0(String str) {
if (str == null) {
return null;
}
byte[] bytes = str.getBytes(Charsets.UTF_8);
Intrinsics.checkNotNullExpressionValue(bytes, "this as java.lang.String).getBytes(charset)");
return Q("SHA-256", bytes);
}
public static void o(String str, boolean z) {
if (!z) {
throw new IllegalStateException(String.valueOf(str));
}
}
public static final void o0(Function2 function2, Object obj, pp.c cVar) {
try {
pp.c b2 = C0116f.b(C0116f.a(function2, obj, cVar));
mp.t tVar = v.b;
Qp.a.e(Unit.a, b2);
} catch (Throwable th2) {
mp.t tVar2 = v.b;
cVar.resumeWith(K.j(th2));
throw th2;
}
}
public static void p(boolean z) {
if (!z) {
throw new IllegalStateException();
}
}
public static void p0(Parcel parcel, int i2, Boolean bool) {
if (bool == null) {
return;
}
G0(parcel, i2, 4);
parcel.writeInt(bool.booleanValue() ? 1 : 0);
}
public static void q(Context context, String str) {
List split$default;
List split$default2;
CookieSyncManager.createInstance(context).sync();
CookieManager cookieManager = CookieManager.getInstance();
String cookie = cookieManager.getCookie(str);
if (cookie == null) {
return;
}
split$default = StringsKt__StringsKt.split$default(cookie, new String[]{";"}, false, 0, 6, null);
for (String str2 : (String[]) split$default.toArray(new String[0])) {
split$default2 = StringsKt__StringsKt.split$default(str2, new String[]{"="}, false, 0, 6, null);
String[] strArr = (String[]) split$default2.toArray(new String[0]);
if (strArr.length > 0) {
StringBuilder sb = new StringBuilder();
String str3 = strArr[0];
int length = str3.length() - 1;
int i2 = 0;
boolean z = false;
while (i2 <= length) {
boolean z2 = Intrinsics.h(str3.charAt(!z ? i2 : length), 32) <= 0;
if (z) {
if (!z2) {
break;
} else {
length--;
}
} else if (z2) {
i2++;
} else {
z = true;
}
}
sb.append(str3.subSequence(i2, length + 1).toString());
sb.append("=;expires=Sat, 1 Jan 2000 00:00:01 UTC;");
cookieManager.setCookie(str, sb.toString());
}
}
cookieManager.removeExpiredCookie();
}
public static void q0(Parcel parcel, int i2, Bundle bundle, boolean z) {
if (bundle == null) {
if (z) {
G0(parcel, i2, 0);
}
} else {
int H0 = H0(i2, parcel);
parcel.writeBundle(bundle);
I0(H0, parcel);
}
}
public static final void r(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
try {
q(context, "facebook.com");
q(context, ".facebook.com");
q(context, "https://facebook.com");
q(context, "https://.facebook.com");
} catch (Exception unused) {
}
}
public static void r0(Parcel parcel, int i2, byte[] bArr, boolean z) {
if (bArr == null) {
if (z) {
G0(parcel, i2, 0);
}
} else {
int H0 = H0(i2, parcel);
parcel.writeByteArray(bArr);
I0(H0, parcel);
}
}
public static final void s(Closeable closeable) {
if (closeable != null) {
try {
closeable.close();
} catch (IOException unused) {
}
}
}
public static void s0(Parcel parcel, int i2, Double d2) {
if (d2 == null) {
return;
}
G0(parcel, i2, 8);
parcel.writeDouble(d2.doubleValue());
}
public static final String t(String str) {
return X(str) ? HttpUrl.FRAGMENT_ENCODE_SET : str;
}
public static void t0(Parcel parcel, int i2, Float f3) {
if (f3 == null) {
return;
}
G0(parcel, i2, 4);
parcel.writeFloat(f3.floatValue());
}
public static final HashSet u(JSONArray jSONArray) {
if (jSONArray == null || jSONArray.length() == 0) {
return null;
}
HashSet hashSet = new HashSet();
int length = jSONArray.length();
for (int i2 = 0; i2 < length; i2++) {
String string = jSONArray.getString(i2);
Intrinsics.checkNotNullExpressionValue(string, "jsonArray.getString(i)");
hashSet.add(string);
}
return hashSet;
}
public static void u0(Parcel parcel, int i2, IBinder iBinder) {
if (iBinder == null) {
return;
}
int H0 = H0(i2, parcel);
parcel.writeStrongBinder(iBinder);
I0(H0, parcel);
}
public static final ArrayList v(JSONArray jsonArray) {
Intrinsics.checkNotNullParameter(jsonArray, "jsonArray");
try {
ArrayList arrayList = new ArrayList();
int length = jsonArray.length();
for (int i2 = 0; i2 < length; i2++) {
String string = jsonArray.getString(i2);
Intrinsics.checkNotNullExpressionValue(string, "jsonArray.getString(i)");
arrayList.add(string);
}
return arrayList;
} catch (JSONException unused) {
return new ArrayList();
}
}
public static void v0(Parcel parcel, int i2, int[] iArr, boolean z) {
if (iArr == null) {
if (z) {
G0(parcel, i2, 0);
}
} else {
int H0 = H0(i2, parcel);
parcel.writeIntArray(iArr);
I0(H0, parcel);
}
}
public static final HashMap w(JSONObject jsonObject) {
Intrinsics.checkNotNullParameter(jsonObject, "jsonObject");
HashMap hashMap = new HashMap();
JSONArray names = jsonObject.names();
if (names == null) {
return hashMap;
}
int length = names.length();
for (int i2 = 0; i2 < length; i2++) {
try {
String string = names.getString(i2);
Intrinsics.checkNotNullExpressionValue(string, "keys.getString(i)");
Object value = jsonObject.get(string);
if (value instanceof JSONObject) {
value = w((JSONObject) value);
}
Intrinsics.checkNotNullExpressionValue(value, "value");
hashMap.put(string, value);
} catch (JSONException unused) {
}
}
return hashMap;
}
public static void w0(Parcel parcel, int i2, List list) {
if (list == null) {
return;
}
int H0 = H0(i2, parcel);
int size = list.size();
parcel.writeInt(size);
for (int i3 = 0; i3 < size; i3++) {
parcel.writeInt(((Integer) list.get(i3)).intValue());
}
I0(H0, parcel);
}
public static final HashMap x(JSONObject jsonObject) {
Intrinsics.checkNotNullParameter(jsonObject, "jsonObject");
HashMap hashMap = new HashMap();
Iterator<String> keys = jsonObject.keys();
while (keys.hasNext()) {
String key = keys.next();
String optString = jsonObject.optString(key);
if (optString != null) {
Intrinsics.checkNotNullExpressionValue(key, "key");
hashMap.put(key, optString);
}
}
return hashMap;
}
public static void x0(Parcel parcel, int i2, Integer num) {
if (num == null) {
return;
}
G0(parcel, i2, 4);
parcel.writeInt(num.intValue());
}
public static final int y(InputStream inputStream, OutputStream outputStream) {
BufferedInputStream bufferedInputStream;
Intrinsics.checkNotNullParameter(outputStream, "outputStream");
BufferedInputStream bufferedInputStream2 = null;
try {
bufferedInputStream = new BufferedInputStream(inputStream);
} catch (Throwable th2) {
th = th2;
}
try {
byte[] bArr = new byte[8192];
int i2 = 0;
while (true) {
int read = bufferedInputStream.read(bArr);
if (read == -1) {
break;
}
outputStream.write(bArr, 0, read);
i2 += read;
}
bufferedInputStream.close();
if (inputStream != null) {
inputStream.close();
}
return i2;
} catch (Throwable th3) {
th = th3;
bufferedInputStream2 = bufferedInputStream;
if (bufferedInputStream2 != null) {
bufferedInputStream2.close();
}
if (inputStream != null) {
inputStream.close();
}
throw th;
}
}
public static void y0(Parcel parcel, int i2, Long l) {
if (l == null) {
return;
}
G0(parcel, i2, 8);
parcel.writeLong(l.longValue());
}
public static void z(ArrayList arrayList) {
HashMap hashMap = new HashMap(arrayList.size());
Iterator it = arrayList.iterator();
while (true) {
int i2 = 0;
if (!it.hasNext()) {
Iterator it2 = hashMap.values().iterator();
while (it2.hasNext()) {
for (C0123f c0123f : (Set) it2.next()) {
for (h hVar : c0123f.a.c) {
if (hVar.c == 0) {
Set<C0123f> set = (Set) hashMap.get(new zc.g(hVar.a, hVar.b == 2));
if (set != null) {
for (C0123f c0123f2 : set) {
c0123f.b.add(c0123f2);
c0123f2.c.add(c0123f);
}
}
}
}
}
}
HashSet hashSet = new HashSet();
Iterator it3 = hashMap.values().iterator();
while (it3.hasNext()) {
hashSet.addAll((Set) it3.next());
}
HashSet hashSet2 = new HashSet();
Iterator it4 = hashSet.iterator();
while (it4.hasNext()) {
C0123f c0123f3 = (C0123f) it4.next();
if (c0123f3.c.isEmpty()) {
hashSet2.add(c0123f3);
}
}
while (!hashSet2.isEmpty()) {
C0123f c0123f4 = (C0123f) hashSet2.iterator().next();
hashSet2.remove(c0123f4);
i2++;
Iterator it5 = c0123f4.b.iterator();
while (it5.hasNext()) {
C0123f c0123f5 = (C0123f) it5.next();
c0123f5.c.remove(c0123f4);
if (c0123f5.c.isEmpty()) {
hashSet2.add(c0123f5);
}
}
}
if (i2 == arrayList.size()) {
return;
}
ArrayList arrayList2 = new ArrayList();
Iterator it6 = hashSet.iterator();
while (it6.hasNext()) {
C0123f c0123f6 = (C0123f) it6.next();
if (!c0123f6.c.isEmpty() && !c0123f6.b.isEmpty()) {
arrayList2.add(c0123f6.a);
}
}
throw new zc.i(arrayList2);
}
C0121b c0121b = (C0121b) it.next();
C0123f c0123f7 = new C0123f(c0121b);
for (zc.p pVar : c0121b.b) {
boolean z = c0121b.e == 0;
zc.g gVar = new zc.g(pVar, !z);
if (!hashMap.containsKey(gVar)) {
hashMap.put(gVar, new HashSet());
}
Set set2 = (Set) hashMap.get(gVar);
if (!set2.isEmpty() && z) {
throw new IllegalArgumentException("Multiple components provide " + pVar + ".");
}
set2.add(c0123f7);
}
}
}
public static final void z0(Parcel parcel, Map map) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
if (map == null) {
parcel.writeInt(-1);
return;
}
parcel.writeInt(map.size());
for (Map.Entry entry : map.entrySet()) {
String str = (String) entry.getKey();
String str2 = (String) entry.getValue();
parcel.writeString(str);
parcel.writeString(str2);
}
}
}