正在查看: Kredinesia v8.3.1 应用的 G.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kredinesia v8.3.1 应用的 G.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package z2;
import N3.H2;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.util.Log;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import androidx.fragment.app.AbstractActivityC0562x;
import com.adjust.sdk.Constants;
import com.facebook.FacebookException;
import com.facebook.FacebookSdk;
import j2.C1407a;
import java.io.BufferedInputStream;
import java.io.Closeable;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.HttpURLConnection;
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.concurrent.ConcurrentHashMap;
import java.util.regex.Pattern;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
public abstract class G {
public static int a = 0;
public static long f15310b = -1;
public static long f15311c = -1;
public static long f15312d = -1;
public static String f15313e = "";
public static String f15314f = "";
public static String f15315g = "NoCarrier";
public static String h = "";
public static Locale f15316i;
public static final boolean A(AbstractActivityC0562x context) {
kotlin.jvm.internal.i.f(context, "context");
if (Build.VERSION.SDK_INT >= 27) {
return context.getPackageManager().hasSystemFeature("android.hardware.type.pc");
}
String str = Build.DEVICE;
if (str == null) {
return false;
}
Pattern compile = Pattern.compile(".+_cheets|cheets_.+");
kotlin.jvm.internal.i.e(compile, "compile(pattern)");
return compile.matcher(str).matches();
}
public static final boolean B() {
if (!E2.a.b(G.class)) {
try {
JSONObject o10 = o();
if (o10 != null) {
try {
JSONArray jSONArray = o10.getJSONArray(FacebookSdk.DATA_PROCESSION_OPTIONS);
int length = jSONArray.length();
if (length > 0) {
int i4 = 0;
while (true) {
int i10 = i4 + 1;
String string = jSONArray.getString(i4);
kotlin.jvm.internal.i.e(string, "options.getString(i)");
String lowerCase = string.toLowerCase();
kotlin.jvm.internal.i.e(lowerCase, "(this as java.lang.String).toLowerCase()");
if (lowerCase.equals("ldu")) {
return true;
}
if (i10 >= length) {
break;
}
i4 = i10;
}
}
} catch (Exception unused) {
}
}
} catch (Throwable th) {
E2.a.a(th, G.class);
return false;
}
}
return false;
}
public static boolean C(Context context) {
Method v5 = v("com.google.android.gms.common.GooglePlayServicesUtil", "isGooglePlayServicesAvailable", Context.class);
if (v5 != null) {
Object y10 = y(null, v5, context);
if ((y10 instanceof Integer) && kotlin.jvm.internal.i.a(y10, 0)) {
return true;
}
}
return false;
}
public static final boolean D(String str) {
return str == null || str.length() == 0;
}
public static final boolean E(Uri uri) {
if (uri != null) {
return "http".equalsIgnoreCase(uri.getScheme()) || Constants.SCHEME.equalsIgnoreCase(uri.getScheme()) || "fbstaging".equalsIgnoreCase(uri.getScheme());
}
return false;
}
public static final ArrayList F(JSONArray jSONArray) {
ArrayList arrayList = new ArrayList();
int length = jSONArray.length();
if (length > 0) {
int i4 = 0;
while (true) {
int i10 = i4 + 1;
arrayList.add(jSONArray.getString(i4));
if (i10 >= length) {
break;
}
i4 = i10;
}
}
return arrayList;
}
public static final HashMap G(String 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();
kotlin.jvm.internal.i.e(key, "key");
String string = jSONObject.getString(key);
kotlin.jvm.internal.i.e(string, "jsonObject.getString(key)");
hashMap.put(key, string);
}
return hashMap;
} catch (JSONException unused) {
return new HashMap();
}
}
public static final void H(Exception exc, String str) {
if (!FacebookSdk.isDebugEnabled() || str == null) {
return;
}
Log.d(str, exc.getClass().getSimpleName() + ": " + ((Object) exc.getMessage()));
}
public static final void I(Exception exc, String str, String str2) {
if (!FacebookSdk.isDebugEnabled() || D(str)) {
return;
}
Log.d(str, str2, exc);
}
public static final void J(String str, String str2) {
if (!FacebookSdk.isDebugEnabled() || str == null || str2 == null) {
return;
}
Log.d(str, str2);
}
public static final String K(Map map) {
kotlin.jvm.internal.i.f(map, "map");
String str = "";
if (map.isEmpty()) {
return "";
}
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) {
}
kotlin.jvm.internal.i.e(str, "{\n try {\n val jsonObject = JSONObject()\n for ((key, value) in map) {\n jsonObject.put(key, value)\n }\n jsonObject.toString()\n } catch (_e: JSONException) {\n \"\"\n }\n }");
return str;
}
public static final Bundle L(String str) {
Bundle bundle = new Bundle();
if (!D(str)) {
if (str == null) {
throw new IllegalStateException("Required value was null.");
}
Object[] array = Z8.f.y(str, new String[]{"&"}, 0, 6).toArray(new String[0]);
if (array == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
}
String[] strArr = (String[]) array;
int length = strArr.length;
int i4 = 0;
while (i4 < length) {
String str2 = strArr[i4];
i4++;
Object[] array2 = Z8.f.y(str2, new String[]{"="}, 0, 6).toArray(new String[0]);
if (array2 == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
}
String[] strArr2 = (String[]) array2;
try {
if (strArr2.length == 2) {
bundle.putString(URLDecoder.decode(strArr2[0], Constants.ENCODING), URLDecoder.decode(strArr2[1], Constants.ENCODING));
} else if (strArr2.length == 1) {
bundle.putString(URLDecoder.decode(strArr2[0], Constants.ENCODING), "");
}
} catch (UnsupportedEncodingException e10) {
H(e10, "FacebookSDK");
}
}
}
return bundle;
}
public static final void M(Bundle bundle, JSONArray jSONArray) {
kotlin.jvm.internal.i.f(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 final HashMap N(Parcel parcel) {
int readInt = parcel.readInt();
if (readInt < 0) {
return null;
}
HashMap hashMap = new HashMap();
if (readInt > 0) {
int i4 = 0;
do {
i4++;
String readString = parcel.readString();
String readString2 = parcel.readString();
if (readString != null && readString2 != null) {
hashMap.put(readString, readString2);
}
} while (i4 < readInt);
}
return hashMap;
}
public static final String O(InputStream inputStream) {
BufferedInputStream bufferedInputStream;
Throwable th;
InputStreamReader inputStreamReader;
try {
bufferedInputStream = new BufferedInputStream(inputStream);
try {
inputStreamReader = new InputStreamReader(bufferedInputStream);
try {
StringBuilder sb = new StringBuilder();
char[] cArr = new char[com.onecard.utils.Constants.COMPRESS_IMAGE_LIMIT];
while (true) {
int read = inputStreamReader.read(cArr);
if (read == -1) {
String sb2 = sb.toString();
kotlin.jvm.internal.i.e(sb2, "{\n bufferedInputStream = BufferedInputStream(inputStream)\n reader = InputStreamReader(bufferedInputStream)\n val stringBuilder = StringBuilder()\n val bufferSize = 1024 * 2\n val buffer = CharArray(bufferSize)\n var n = 0\n while (reader.read(buffer).also { n = it } != -1) {\n stringBuilder.append(buffer, 0, n)\n }\n stringBuilder.toString()\n }");
d(bufferedInputStream);
d(inputStreamReader);
return sb2;
}
sb.append(cArr, 0, read);
}
} catch (Throwable th2) {
th = th2;
d(bufferedInputStream);
d(inputStreamReader);
throw th;
}
} catch (Throwable th3) {
th = th3;
inputStreamReader = null;
}
} catch (Throwable th4) {
bufferedInputStream = null;
th = th4;
inputStreamReader = null;
}
}
public static final void P(Runnable runnable) {
try {
FacebookSdk.getExecutor().execute(runnable);
} catch (Exception unused) {
}
}
public static final void Q(JSONObject jSONObject, C2109b c2109b, String str, boolean z9, Context context) {
kotlin.jvm.internal.i.f(context, "context");
C2123p c2123p = C2123p.a;
EnumC2121n enumC2121n = EnumC2121n.ServiceUpdateCompliance;
if (!C2123p.b(enumC2121n)) {
jSONObject.put("anon_id", str);
}
jSONObject.put("application_tracking_enabled", !z9);
jSONObject.put("advertiser_id_collection_enabled", FacebookSdk.getAdvertiserIDCollectionEnabled());
if (c2109b != null) {
if (C2123p.b(enumC2121n)) {
if (Build.VERSION.SDK_INT < 31 || !C(context)) {
jSONObject.put("anon_id", str);
} else if (!c2109b.f15339e) {
jSONObject.put("anon_id", str);
}
}
if (c2109b.f15337c != null) {
if (!C2123p.b(enumC2121n)) {
jSONObject.put("attribution", c2109b.f15337c);
} else if (Build.VERSION.SDK_INT < 31 || !C(context)) {
jSONObject.put("attribution", c2109b.f15337c);
} else if (!c2109b.f15339e) {
jSONObject.put("attribution", c2109b.f15337c);
}
}
if (c2109b.a() != null) {
jSONObject.put("advertiser_id", c2109b.a());
jSONObject.put("advertiser_tracking_enabled", !c2109b.f15339e);
}
if (!c2109b.f15339e) {
k2.u uVar = k2.u.a;
String str2 = null;
if (!E2.a.b(k2.u.class)) {
try {
boolean z10 = k2.u.f11748c.get();
k2.u uVar2 = k2.u.a;
if (!z10) {
uVar2.b();
}
HashMap hashMap = new HashMap();
hashMap.putAll(k2.u.f11749d);
hashMap.putAll(uVar2.a());
str2 = K(hashMap);
} catch (Throwable th) {
E2.a.a(th, k2.u.class);
}
}
if (str2.length() != 0) {
jSONObject.put("ud", str2);
}
}
Object obj = c2109b.f15338d;
if (obj != null) {
jSONObject.put("installer_package", obj);
}
}
}
public static final void R(org.json.JSONObject r11, android.content.Context r12) {
throw new UnsupportedOperationException("Method not decompiled: z2.G.R(org.json.JSONObject, android.content.Context):void");
}
public static final String S(String str) {
if (str == null) {
return null;
}
byte[] bytes = str.getBytes(Z8.a.a);
kotlin.jvm.internal.i.e(bytes, "(this as java.lang.String).getBytes(charset)");
return x("SHA-256", bytes);
}
public static final void T(Parcel parcel, Map map) {
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);
}
}
public static final Uri a(String str, String str2, Bundle bundle) {
Uri.Builder builder = new Uri.Builder();
builder.scheme(Constants.SCHEME);
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();
kotlin.jvm.internal.i.e(build, "builder.build()");
return build;
}
public static void b(Context context, String str) {
CookieSyncManager.createInstance(context).sync();
CookieManager cookieManager = CookieManager.getInstance();
String cookie = cookieManager.getCookie(str);
if (cookie == null) {
return;
}
Object[] array = Z8.f.y(cookie, new String[]{";"}, 0, 6).toArray(new String[0]);
if (array == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
}
String[] strArr = (String[]) array;
int length = strArr.length;
int i4 = 0;
while (i4 < length) {
String str2 = strArr[i4];
i4++;
Object[] array2 = Z8.f.y(str2, new String[]{"="}, 0, 6).toArray(new String[0]);
if (array2 == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Array<T>");
}
String[] strArr2 = (String[]) array2;
if (strArr2.length > 0) {
String str3 = strArr2[0];
int length2 = str3.length() - 1;
int i10 = 0;
boolean z9 = false;
while (i10 <= length2) {
boolean z10 = kotlin.jvm.internal.i.h(str3.charAt(!z9 ? i10 : length2), 32) <= 0;
if (z9) {
if (!z10) {
break;
} else {
length2--;
}
} else if (z10) {
i10++;
} else {
z9 = true;
}
}
cookieManager.setCookie(str, kotlin.jvm.internal.i.k("=;expires=Sat, 1 Jan 2000 00:00:01 UTC;", str3.subSequence(i10, length2 + 1).toString()));
}
}
cookieManager.removeExpiredCookie();
}
public static final void c(Context context) {
kotlin.jvm.internal.i.f(context, "context");
try {
b(context, FacebookSdk.FACEBOOK_COM);
b(context, ".facebook.com");
b(context, "https://facebook.com");
b(context, "https://.facebook.com");
} catch (Exception unused) {
}
}
public static final void d(Closeable closeable) {
if (closeable == null) {
return;
}
try {
closeable.close();
} catch (IOException unused) {
}
}
public static final String e(String str) {
return D(str) ? "" : str;
}
public static final HashSet f(JSONArray jSONArray) {
if (jSONArray == null || jSONArray.length() == 0) {
return null;
}
HashSet hashSet = new HashSet();
int length = jSONArray.length();
if (length > 0) {
int i4 = 0;
while (true) {
int i10 = i4 + 1;
String string = jSONArray.getString(i4);
kotlin.jvm.internal.i.e(string, "jsonArray.getString(i)");
hashSet.add(string);
if (i10 >= length) {
break;
}
i4 = i10;
}
}
return hashSet;
}
public static final ArrayList g(JSONArray jSONArray) {
try {
ArrayList arrayList = new ArrayList();
int length = jSONArray.length();
if (length > 0) {
int i4 = 0;
while (true) {
int i10 = i4 + 1;
String string = jSONArray.getString(i4);
kotlin.jvm.internal.i.e(string, "jsonArray.getString(i)");
arrayList.add(string);
if (i10 >= length) {
break;
}
i4 = i10;
}
}
return arrayList;
} catch (JSONException unused) {
return new ArrayList();
}
}
public static final HashMap h(JSONObject jsonObject) {
int length;
kotlin.jvm.internal.i.f(jsonObject, "jsonObject");
HashMap hashMap = new HashMap();
JSONArray names = jsonObject.names();
if (names != null && (length = names.length()) > 0) {
int i4 = 0;
while (true) {
int i10 = i4 + 1;
try {
String string = names.getString(i4);
kotlin.jvm.internal.i.e(string, "keys.getString(i)");
Object value = jsonObject.get(string);
if (value instanceof JSONObject) {
value = h((JSONObject) value);
}
kotlin.jvm.internal.i.e(value, "value");
hashMap.put(string, value);
} catch (JSONException unused) {
}
if (i10 >= length) {
break;
}
i4 = i10;
}
}
return hashMap;
}
public static final HashMap i(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) {
kotlin.jvm.internal.i.e(key, "key");
hashMap.put(key, optString);
}
}
return hashMap;
}
public static final int j(InputStream inputStream, FilterOutputStream filterOutputStream) {
BufferedInputStream bufferedInputStream;
BufferedInputStream bufferedInputStream2 = null;
try {
bufferedInputStream = new BufferedInputStream(inputStream);
} catch (Throwable th) {
th = th;
}
try {
byte[] bArr = new byte[8192];
int i4 = 0;
while (true) {
int read = bufferedInputStream.read(bArr);
if (read == -1) {
break;
}
filterOutputStream.write(bArr, 0, read);
i4 += read;
}
bufferedInputStream.close();
if (inputStream == null) {
return i4;
}
inputStream.close();
return i4;
} catch (Throwable th2) {
th = th2;
bufferedInputStream2 = bufferedInputStream;
if (bufferedInputStream2 != null) {
bufferedInputStream2.close();
}
if (inputStream != null) {
inputStream.close();
}
throw th;
}
}
public static final void k(HttpURLConnection httpURLConnection) {
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
}
public static final String l(Context context) {
return context == null ? "null" : context == context.getApplicationContext() ? "unknown" : context.getClass().getSimpleName();
}
public static final String m(Context context) {
kotlin.jvm.internal.i.f(context, "context");
try {
String applicationName = FacebookSdk.getApplicationName();
if (applicationName != null) {
return applicationName;
}
ApplicationInfo applicationInfo = context.getApplicationInfo();
int i4 = applicationInfo.labelRes;
if (i4 == 0) {
return applicationInfo.nonLocalizedLabel.toString();
}
String string = context.getString(i4);
kotlin.jvm.internal.i.e(string, "context.getString(stringId)");
return string;
} catch (Exception unused) {
return "";
}
}
public static final Date n(Bundle bundle, String str, Date date) {
long parseLong;
if (bundle == null) {
return null;
}
Object obj = bundle.get(str);
if (obj instanceof Long) {
parseLong = ((Number) obj).longValue();
} else {
if (!(obj instanceof String)) {
return null;
}
try {
parseLong = Long.parseLong((String) obj);
} catch (NumberFormatException unused) {
return null;
}
}
if (parseLong == 0) {
return new Date(Long.MAX_VALUE);
}
return new Date((parseLong * 1000) + date.getTime());
}
public static final JSONObject o() {
if (E2.a.b(G.class)) {
return null;
}
try {
String string = FacebookSdk.getApplicationContext().getSharedPreferences(FacebookSdk.DATA_PROCESSING_OPTIONS_PREFERENCES, 0).getString(FacebookSdk.DATA_PROCESSION_OPTIONS, null);
if (string != null) {
try {
return new JSONObject(string);
} catch (JSONException unused) {
}
}
return null;
} catch (Throwable th) {
E2.a.a(th, G.class);
return null;
}
}
public static final String p() {
return String.format("m.%s", Arrays.copyOf(new Object[]{FacebookSdk.getFacebookDomain()}, 1));
}
public static j2.u q(String str) {
String str2;
j2.y yVar = j2.y.a;
Bundle bundle = new Bundle();
Date date = C1407a.f11404W;
C1407a b10 = H2.b();
if (b10 == null || (str2 = b10.f11413V) == null) {
str2 = "facebook";
}
bundle.putString("fields", str2.equals(FacebookSdk.INSTAGRAM) ? "id,name,profile_picture" : "id,name,first_name,middle_name,last_name");
bundle.putString("access_token", str);
j2.u uVar = new j2.u(null, "me", null, null, new j2.r(0));
uVar.f11484d = bundle;
uVar.h = yVar;
return uVar;
}
public static final void r(final String accessToken, final F f10) {
kotlin.jvm.internal.i.f(accessToken, "accessToken");
ConcurrentHashMap concurrentHashMap = C.a;
JSONObject jSONObject = (JSONObject) C.a.get(accessToken);
if (jSONObject != null) {
f10.f(jSONObject);
return;
}
j2.q qVar = new j2.q() {
@Override
public final void onCompleted(j2.x xVar) {
F f11 = f10;
String accessToken2 = accessToken;
kotlin.jvm.internal.i.f(accessToken2, "$accessToken");
j2.k kVar = xVar.f11496c;
if (kVar != null) {
f11.e(kVar.f11471T);
return;
}
ConcurrentHashMap concurrentHashMap2 = C.a;
JSONObject jSONObject2 = xVar.f11497d;
if (jSONObject2 == null) {
throw new IllegalStateException("Required value was null.");
}
C.a.put(accessToken2, jSONObject2);
f11.f(jSONObject2);
}
};
j2.u q5 = q(accessToken);
q5.j(qVar);
q5.d();
}
public static final String s() {
return String.format("m.%s", Arrays.copyOf(new Object[]{FacebookSdk.getInstagramDomain()}, 1));
}
public static void t(Context context) {
if (C2110c.a() != null) {
C2110c.a();
return;
}
C2110c c2110c = new C2110c(context);
if (!E2.a.b(C2110c.class)) {
try {
if (!E2.a.b(c2110c)) {
try {
I0.b a10 = I0.b.a((Context) c2110c.f15341b);
kotlin.jvm.internal.i.e(a10, "getInstance(applicationContext)");
a10.b(c2110c, new IntentFilter("com.parse.bolts.measurement_event"));
} catch (Throwable th) {
E2.a.a(th, c2110c);
}
}
} catch (Throwable th2) {
E2.a.a(th2, C2110c.class);
}
}
if (!E2.a.b(C2110c.class)) {
try {
C2110c.f15340c = c2110c;
} catch (Throwable th3) {
E2.a.a(th3, C2110c.class);
}
}
C2110c.a();
}
public static final Method u(Class cls, String str, Class... parameterTypes) {
kotlin.jvm.internal.i.f(parameterTypes, "parameterTypes");
try {
return cls.getMethod(str, (Class[]) Arrays.copyOf(parameterTypes, parameterTypes.length));
} catch (NoSuchMethodException unused) {
return null;
}
}
public static final Method v(String str, String str2, Class... clsArr) {
try {
return u(Class.forName(str), str2, (Class[]) Arrays.copyOf(clsArr, clsArr.length));
} catch (ClassNotFoundException unused) {
return null;
}
}
public static final Object w(JSONObject jSONObject, String str, String str2) {
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 FacebookException("Got an unexpected non-JSON object.");
}
JSONObject jSONObject2 = new JSONObject();
jSONObject2.putOpt(str2, opt);
return jSONObject2;
}
public static String x(String str, byte[] bArr) {
try {
MessageDigest hash = MessageDigest.getInstance(str);
kotlin.jvm.internal.i.e(hash, "hash");
hash.update(bArr);
byte[] digest = hash.digest();
StringBuilder sb = new StringBuilder();
kotlin.jvm.internal.i.e(digest, "digest");
int length = digest.length;
int i4 = 0;
while (i4 < length) {
byte b10 = digest[i4];
i4++;
sb.append(Integer.toHexString((b10 >> 4) & 15));
sb.append(Integer.toHexString(b10 & 15));
}
String sb2 = sb.toString();
kotlin.jvm.internal.i.e(sb2, "builder.toString()");
return sb2;
} catch (NoSuchAlgorithmException unused) {
return null;
}
}
public static final Object y(Object obj, Method method, Object... objArr) {
try {
return method.invoke(obj, Arrays.copyOf(objArr, objArr.length));
} catch (IllegalAccessException | InvocationTargetException unused) {
return null;
}
}
public static final boolean z() {
try {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(String.format("fb%s://applinks", Arrays.copyOf(new Object[]{FacebookSdk.getApplicationId()}, 1))));
Context applicationContext = FacebookSdk.getApplicationContext();
PackageManager packageManager = applicationContext.getPackageManager();
String packageName = applicationContext.getPackageName();
List<ResolveInfo> queryIntentActivities = packageManager.queryIntentActivities(intent, 65536);
kotlin.jvm.internal.i.e(queryIntentActivities, "packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY)");
Iterator<ResolveInfo> it = queryIntentActivities.iterator();
while (it.hasNext()) {
if (kotlin.jvm.internal.i.a(packageName, it.next().activityInfo.packageName)) {
return true;
}
}
} catch (Exception unused) {
}
return false;
}
}