正在查看: FileWipe Pro v3.0.0 应用的 f0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FileWipe Pro v3.0.0 应用的 f0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package z4;
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.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import com.applovin.sdk.AppLovinMediationProvider;
import com.facebook.AccessToken;
import com.facebook.FacebookRequestError;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.mbridge.msdk.playercommon.exoplayer2.C;
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 kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
public abstract class f0 {
public static int f20693a = 0;
public static long f20694b = -1;
public static long f20695c = -1;
public static long f20696d = -1;
public static String f20697e = "";
public static String f20698f = "";
public static String f20699g = "NoCarrier";
public static String f20700h = "";
public static Locale f20701i;
public static final boolean A(androidx.fragment.app.g0 g0Var) {
Intrinsics.checkNotNullParameter(g0Var, "context");
if (Build.VERSION.SDK_INT >= 27) {
return g0Var.getPackageManager().hasSystemFeature("android.hardware.type.pc");
}
String str = Build.DEVICE;
if (str == null) {
return false;
}
Intrinsics.checkNotNullExpressionValue(str, "DEVICE");
return new Regex(".+_cheets|cheets_.+").b(str);
}
public static final boolean B() {
if (!e5.a.b(f0.class)) {
try {
JSONObject o6 = o();
if (o6 != null) {
try {
JSONArray jSONArray = o6.getJSONArray("data_processing_options");
int length = jSONArray.length();
for (int i10 = 0; i10 < length; i10++) {
String string = jSONArray.getString(i10);
Intrinsics.checkNotNullExpressionValue(string, "options.getString(i)");
String lowerCase = string.toLowerCase();
Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase()");
if (Intrinsics.a(lowerCase, "ldu")) {
return true;
}
}
} catch (Exception unused) {
}
}
} catch (Throwable th) {
e5.a.a(f0.class, th);
return false;
}
}
return false;
}
public static boolean C(Context context) {
Method v10 = v("com.google.android.gms.common.GooglePlayServicesUtil", "isGooglePlayServicesAvailable", Context.class);
if (v10 != null) {
Object y10 = y(null, v10, context);
if ((y10 instanceof Integer) && Intrinsics.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()) || "https".equalsIgnoreCase(uri.getScheme()) || "fbstaging".equalsIgnoreCase(uri.getScheme());
}
return false;
}
public static final ArrayList F(JSONArray jSONArray) {
Intrinsics.checkNotNullParameter(jSONArray, "jsonArray");
ArrayList arrayList = new ArrayList();
int length = jSONArray.length();
for (int i10 = 0; i10 < length; i10++) {
arrayList.add(jSONArray.getString(i10));
}
return arrayList;
}
public static final HashMap G(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 next = keys.next();
Intrinsics.checkNotNullExpressionValue(next, "key");
String string = jSONObject.getString(next);
Intrinsics.checkNotNullExpressionValue(string, "jsonObject.getString(key)");
hashMap.put(next, string);
}
return hashMap;
} catch (JSONException unused) {
return new HashMap();
}
}
public static final String H(Map map) {
Intrinsics.checkNotNullParameter(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) {
}
Intrinsics.checkNotNullExpressionValue(str, "{\n try {\n va…\n \"\"\n }\n }");
return str;
}
public static final Bundle I(String str) {
Bundle bundle = new Bundle();
if (!D(str)) {
if (str == null) {
throw new IllegalStateException("Required value was null.");
}
for (String str2 : (String[]) StringsKt.G(str, new String[]{"&"}, 0, 6).toArray(new String[0])) {
String[] strArr = (String[]) StringsKt.G(str2, new String[]{"="}, 0, 6).toArray(new String[0]);
try {
if (strArr.length == 2) {
bundle.putString(URLDecoder.decode(strArr[0], C.UTF8_NAME), URLDecoder.decode(strArr[1], C.UTF8_NAME));
} else if (strArr.length == 1) {
bundle.putString(URLDecoder.decode(strArr[0], C.UTF8_NAME), "");
}
} catch (UnsupportedEncodingException unused) {
f4.n nVar = f4.n.f15278a;
}
}
}
return bundle;
}
public static final void J(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 final HashMap K(Parcel parcel) {
Intrinsics.checkNotNullParameter(parcel, "parcel");
int readInt = parcel.readInt();
if (readInt < 0) {
return null;
}
HashMap hashMap = new HashMap();
for (int i10 = 0; i10 < readInt; i10++) {
String readString = parcel.readString();
String readString2 = parcel.readString();
if (readString != null && readString2 != null) {
hashMap.put(readString, readString2);
}
}
return hashMap;
}
public static final String L(InputStream inputStream) {
BufferedInputStream bufferedInputStream;
Throwable th;
InputStreamReader inputStreamReader;
try {
bufferedInputStream = new BufferedInputStream(inputStream);
try {
inputStreamReader = new InputStreamReader(bufferedInputStream);
try {
StringBuilder sb2 = new StringBuilder();
char[] cArr = new char[2048];
while (true) {
int read = inputStreamReader.read(cArr);
if (read == -1) {
String sb3 = sb2.toString();
Intrinsics.checkNotNullExpressionValue(sb3, "{\n bufferedInputStr…gBuilder.toString()\n }");
d(bufferedInputStream);
d(inputStreamReader);
return sb3;
}
sb2.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 M(Runnable runnable) {
try {
f4.n.c().execute(runnable);
} catch (Exception unused) {
}
}
public static final void N(org.json.JSONObject r11, android.content.Context r12) {
throw new UnsupportedOperationException("Method not decompiled: z4.f0.N(org.json.JSONObject, android.content.Context):void");
}
public static final String O(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 x("SHA-256", bytes);
}
public static final void P(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);
}
}
public static final Uri a(String str, String str2, Bundle bundle) {
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 void b(Context context, String str) {
CookieSyncManager.createInstance(context).sync();
CookieManager cookieManager = CookieManager.getInstance();
String cookie = cookieManager.getCookie(str);
if (cookie == null) {
return;
}
for (String str2 : (String[]) StringsKt.G(cookie, new String[]{";"}, 0, 6).toArray(new String[0])) {
String[] strArr = (String[]) StringsKt.G(str2, new String[]{"="}, 0, 6).toArray(new String[0]);
if (strArr.length > 0) {
StringBuilder sb2 = new StringBuilder();
String str3 = strArr[0];
int length = str3.length() - 1;
int i10 = 0;
boolean z3 = false;
while (i10 <= length) {
boolean z8 = Intrinsics.e(str3.charAt(!z3 ? i10 : length), 32) <= 0;
if (z3) {
if (!z8) {
break;
} else {
length--;
}
} else if (z8) {
i10++;
} else {
z3 = true;
}
}
sb2.append(str3.subSequence(i10, length + 1).toString());
sb2.append("=;expires=Sat, 1 Jan 2000 00:00:01 UTC;");
cookieManager.setCookie(str, sb2.toString());
}
}
cookieManager.removeExpiredCookie();
}
public static final void c(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
try {
b(context, "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) {
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();
for (int i10 = 0; i10 < length; i10++) {
String string = jSONArray.getString(i10);
Intrinsics.checkNotNullExpressionValue(string, "jsonArray.getString(i)");
hashSet.add(string);
}
return hashSet;
}
public static final ArrayList g(JSONArray jSONArray) {
Intrinsics.checkNotNullParameter(jSONArray, "jsonArray");
try {
ArrayList arrayList = new ArrayList();
int length = jSONArray.length();
for (int i10 = 0; i10 < length; i10++) {
String string = jSONArray.getString(i10);
Intrinsics.checkNotNullExpressionValue(string, "jsonArray.getString(i)");
arrayList.add(string);
}
return arrayList;
} catch (JSONException unused) {
return new ArrayList();
}
}
public static final HashMap h(JSONObject jSONObject) {
Intrinsics.checkNotNullParameter(jSONObject, "jsonObject");
HashMap hashMap = new HashMap();
JSONArray names = jSONObject.names();
if (names != null) {
int length = names.length();
for (int i10 = 0; i10 < length; i10++) {
try {
String string = names.getString(i10);
Intrinsics.checkNotNullExpressionValue(string, "keys.getString(i)");
Object obj = jSONObject.get(string);
if (obj instanceof JSONObject) {
obj = h((JSONObject) obj);
}
Intrinsics.checkNotNullExpressionValue(obj, AppMeasurementSdk.ConditionalUserProperty.VALUE);
hashMap.put(string, obj);
} catch (JSONException unused) {
}
}
}
return hashMap;
}
public static final HashMap i(JSONObject jSONObject) {
Intrinsics.checkNotNullParameter(jSONObject, "jsonObject");
HashMap hashMap = new HashMap();
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String next = keys.next();
String optString = jSONObject.optString(next);
if (optString != null) {
Intrinsics.checkNotNullExpressionValue(next, "key");
hashMap.put(next, optString);
}
}
return hashMap;
}
public static final int j(InputStream inputStream, FilterOutputStream filterOutputStream) {
BufferedInputStream bufferedInputStream;
Intrinsics.checkNotNullParameter(filterOutputStream, "outputStream");
BufferedInputStream bufferedInputStream2 = null;
try {
bufferedInputStream = new BufferedInputStream(inputStream);
} catch (Throwable th) {
th = th;
}
try {
byte[] bArr = new byte[8192];
int i10 = 0;
while (true) {
int read = bufferedInputStream.read(bArr);
if (read == -1) {
break;
}
filterOutputStream.write(bArr, 0, read);
i10 += read;
}
bufferedInputStream.close();
if (inputStream != null) {
inputStream.close();
}
return i10;
} 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) {
if (context == null) {
return "null";
}
if (context == context.getApplicationContext()) {
return AppLovinMediationProvider.UNKNOWN;
}
String simpleName = context.getClass().getSimpleName();
Intrinsics.checkNotNullExpressionValue(simpleName, "{\n context.javaClass.simpleName\n }");
return simpleName;
}
public static final String m(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
try {
f4.n nVar = f4.n.f15278a;
f.k();
String str = f4.n.f15282e;
if (str != null) {
return str;
}
ApplicationInfo applicationInfo = context.getApplicationInfo();
int i10 = applicationInfo.labelRes;
if (i10 == 0) {
return applicationInfo.nonLocalizedLabel.toString();
}
String string = context.getString(i10);
Intrinsics.checkNotNullExpressionValue(string, "context.getString(stringId)");
return string;
} catch (Exception unused) {
return "";
}
}
public static final Date n(Bundle bundle, String str, Date date) {
long parseLong;
Intrinsics.checkNotNullParameter(date, "dateBase");
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 (e5.a.b(f0.class)) {
return null;
}
try {
String string = f4.n.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 th) {
e5.a.a(f0.class, th);
return null;
}
}
public static final String p() {
return s1.a.s(new Object[]{f4.n.f15292q}, 1, "m.%s", "format(format, *args)");
}
public static final void q(final String str, final e0 e0Var) {
String str2;
Intrinsics.checkNotNullParameter(str, "accessToken");
Intrinsics.checkNotNullParameter(e0Var, "callback");
ConcurrentHashMap concurrentHashMap = b0.f20678a;
Intrinsics.checkNotNullParameter(str, "accessToken");
JSONObject jSONObject = (JSONObject) b0.f20678a.get(str);
if (jSONObject != null) {
e0Var.a(jSONObject);
return;
}
f4.r rVar = new f4.r() {
@Override
public final void a(f4.y yVar) {
e0 e0Var2 = e0Var;
Intrinsics.checkNotNullParameter(e0Var2, "$callback");
String str3 = str;
Intrinsics.checkNotNullParameter(str3, "$accessToken");
Intrinsics.checkNotNullParameter(yVar, "response");
FacebookRequestError facebookRequestError = yVar.f15324c;
if (facebookRequestError != null) {
e0Var2.d(facebookRequestError.f5043i);
return;
}
JSONObject jSONObject2 = yVar.f15325d;
if (jSONObject2 == null) {
throw new IllegalStateException("Required value was null.");
}
ConcurrentHashMap concurrentHashMap2 = b0.f20678a;
Intrinsics.checkNotNullParameter(str3, "key");
Intrinsics.checkNotNullParameter(jSONObject2, AppMeasurementSdk.ConditionalUserProperty.VALUE);
b0.f20678a.put(str3, jSONObject2);
e0Var2.a(jSONObject2);
}
};
f4.z zVar = f4.z.f15326a;
Bundle bundle = new Bundle();
Date date = AccessToken.l;
AccessToken e4 = ye.d.e();
if (e4 == null || (str2 = e4.f5002k) == null) {
str2 = "facebook";
}
bundle.putString("fields", str2.equals("instagram") ? "id,name,profile_picture" : "id,name,first_name,middle_name,last_name");
bundle.putString("access_token", str);
f4.v vVar = new f4.v(null, "me", null, null, new f4.s(0));
Intrinsics.checkNotNullParameter(bundle, "<set-?>");
vVar.f15308d = bundle;
vVar.f15312h = zVar;
vVar.j(rVar);
vVar.d();
}
public static final String r() {
return s1.a.s(new Object[]{f4.n.f15291p}, 1, "m.%s", "format(format, *args)");
}
public static void s(Context context) {
Intrinsics.checkNotNullParameter(context, "context");
if (c.a() != null) {
c.a();
return;
}
c cVar = new c(context);
if (!e5.a.b(c.class)) {
try {
if (!e5.a.b(cVar)) {
try {
q1.b a10 = q1.b.a((Context) cVar.f20681b);
Intrinsics.checkNotNullExpressionValue(a10, "getInstance(applicationContext)");
a10.b(cVar, new IntentFilter("com.parse.bolts.measurement_event"));
} catch (Throwable th) {
e5.a.a(cVar, th);
}
}
} catch (Throwable th2) {
e5.a.a(c.class, th2);
}
}
if (!e5.a.b(c.class)) {
try {
c.f20679c = cVar;
} catch (Throwable th3) {
e5.a.a(c.class, th3);
}
}
c.a();
}
public static final String t(Context context) {
Intrinsics.checkNotNullParameter("context", "name");
return f4.n.b();
}
public static final Method u(Class cls, String str, Class... clsArr) {
Intrinsics.checkNotNullParameter(cls, "clazz");
Intrinsics.checkNotNullParameter(str, "methodName");
Intrinsics.checkNotNullParameter(clsArr, "parameterTypes");
try {
return cls.getMethod(str, (Class[]) Arrays.copyOf(clsArr, clsArr.length));
} catch (NoSuchMethodException unused) {
return null;
}
}
public static final Method v(String str, String str2, Class... clsArr) {
Intrinsics.checkNotNullParameter(str, "className");
Intrinsics.checkNotNullParameter(str2, "methodName");
Intrinsics.checkNotNullParameter(clsArr, "parameterTypes");
try {
Class<?> cls = Class.forName(str);
Intrinsics.checkNotNullExpressionValue(cls, "clazz");
return u(cls, str2, (Class[]) Arrays.copyOf(clsArr, clsArr.length));
} catch (ClassNotFoundException unused) {
return null;
}
}
public static final Object w(JSONObject jSONObject, String str, String str2) {
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 f4.h("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 messageDigest = MessageDigest.getInstance(str);
Intrinsics.checkNotNullExpressionValue(messageDigest, "hash");
messageDigest.update(bArr);
byte[] digest = messageDigest.digest();
StringBuilder sb2 = new StringBuilder();
Intrinsics.checkNotNullExpressionValue(digest, "digest");
for (byte b10 : digest) {
sb2.append(Integer.toHexString((b10 >> 4) & 15));
sb2.append(Integer.toHexString(b10 & 15));
}
String sb3 = sb2.toString();
Intrinsics.checkNotNullExpressionValue(sb3, "builder.toString()");
return sb3;
} catch (NoSuchAlgorithmException unused) {
return null;
}
}
public static final Object y(Object obj, Method method, Object... objArr) {
Intrinsics.checkNotNullParameter(method, "method");
Intrinsics.checkNotNullParameter(objArr, "args");
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");
String format = String.format("fb%s://applinks", Arrays.copyOf(new Object[]{f4.n.b()}, 1));
Intrinsics.checkNotNullExpressionValue(format, "format(format, *args)");
intent.setData(Uri.parse(format));
Context a10 = f4.n.a();
PackageManager packageManager = a10.getPackageManager();
String packageName = a10.getPackageName();
List<ResolveInfo> queryIntentActivities = packageManager.queryIntentActivities(intent, C.DEFAULT_BUFFER_SEGMENT_SIZE);
Intrinsics.checkNotNullExpressionValue(queryIntentActivities, "packageManager.queryInte…nager.MATCH_DEFAULT_ONLY)");
Iterator<ResolveInfo> it = queryIntentActivities.iterator();
while (it.hasNext()) {
if (Intrinsics.a(packageName, it.next().activityInfo.packageName)) {
return true;
}
}
return false;
} catch (Exception unused) {
return false;
}
}
}