Free Fire v1.103.1版本的 MD5 值为:f6c45f9f1485263aa5af0fb400f973fc
以下内容为反编译后的 f0.java 源代码,内容仅作参考
package h2;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.AsyncTask;
import h2.j0;
import h2.s0;
import i2.o;
import java.io.File;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Locale;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
import java.util.concurrent.FutureTask;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.ReentrantLock;
import org.json.JSONException;
import org.json.JSONObject;
import q2.h;
import x2.c;
import x2.s;
public final class f0 {
public static final f0 f8419a = new f0();
private static final String f8420b = f0.class.getCanonicalName();
private static final HashSet<r0> f8421c;
private static Executor f8422d;
private static volatile String f8423e;
private static volatile String f8424f;
private static volatile String f8425g;
private static volatile Boolean f8426h;
private static AtomicLong f8427i;
private static volatile boolean f8428j;
private static boolean f8429k;
private static x2.g0<File> f8430l;
private static Context f8431m;
private static int f8432n;
private static final ReentrantLock f8433o;
private static String f8434p;
public static boolean f8435q;
public static boolean f8436r;
public static boolean f8437s;
private static final AtomicBoolean f8438t;
private static volatile String f8439u;
private static volatile String f8440v;
private static a f8441w;
private static boolean f8442x;
public interface a {
j0 a(h2.a aVar, String str, JSONObject jSONObject, j0.b bVar);
}
public interface b {
void a();
}
static {
HashSet<r0> c10;
c10 = y9.g0.c(r0.DEVELOPER_ERRORS);
f8421c = c10;
f8427i = new AtomicLong(65536L);
f8432n = 64206;
f8433o = new ReentrantLock();
f8434p = x2.n0.a();
f8438t = new AtomicBoolean(false);
f8439u = "instagram.com";
f8440v = "facebook.com";
f8441w = new a() {
@Override
public final j0 a(a aVar, String str, JSONObject jSONObject, j0.b bVar) {
j0 C;
C = f0.C(aVar, str, jSONObject, bVar);
return C;
}
};
}
private f0() {
}
public static final long A() {
x2.u0.o();
return f8427i.get();
}
public static final String B() {
return "16.2.0";
}
public static final j0 C(h2.a aVar, String str, JSONObject jSONObject, j0.b bVar) {
return j0.f8485n.A(aVar, str, jSONObject, bVar);
}
public static final boolean D() {
return f8428j;
}
public static final synchronized boolean E() {
boolean z10;
synchronized (f0.class) {
z10 = f8442x;
}
return z10;
}
public static final boolean F() {
return f8438t.get();
}
public static final boolean G() {
return f8429k;
}
public static final boolean H(r0 r0Var) {
boolean z10;
ia.i.e(r0Var, "behavior");
HashSet<r0> hashSet = f8421c;
synchronized (hashSet) {
if (D()) {
z10 = hashSet.contains(r0Var);
}
}
return z10;
}
public static final void I(Context context) {
if (context == null) {
return;
}
try {
ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(), 128);
ia.i.d(applicationInfo, "try {\n context.packageManager.getApplicationInfo(\n context.packageName, PackageManager.GET_META_DATA)\n } catch (e: PackageManager.NameNotFoundException) {\n return\n }");
if (applicationInfo.metaData == null) {
return;
}
if (f8423e == null) {
Object obj = applicationInfo.metaData.get("com.facebook.sdk.ApplicationId");
if (obj instanceof String) {
String str = (String) obj;
Locale locale = Locale.ROOT;
ia.i.d(locale, "ROOT");
String lowerCase = str.toLowerCase(locale);
ia.i.d(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
if (pa.g.n(lowerCase, "fb", false, 2, null)) {
str = str.substring(2);
ia.i.d(str, "(this as java.lang.String).substring(startIndex)");
}
f8423e = str;
} else if (obj instanceof Number) {
throw new s("App Ids cannot be directly placed in the manifest.They must be prefixed by 'fb' or be placed in the string resource file.");
}
}
if (f8424f == null) {
f8424f = applicationInfo.metaData.getString("com.facebook.sdk.ApplicationName");
}
if (f8425g == null) {
f8425g = applicationInfo.metaData.getString("com.facebook.sdk.ClientToken");
}
if (f8432n == 64206) {
f8432n = applicationInfo.metaData.getInt("com.facebook.sdk.CallbackOffset", 64206);
}
if (f8426h == null) {
f8426h = Boolean.valueOf(applicationInfo.metaData.getBoolean("com.facebook.sdk.CodelessDebugLogEnabled", false));
}
} catch (PackageManager.NameNotFoundException unused) {
}
}
private final void J(Context context, String str) {
try {
x2.b e10 = x2.b.f14182f.e(context);
SharedPreferences sharedPreferences = context.getSharedPreferences("com.facebook.sdk.attributionTracking", 0);
String l10 = ia.i.l(str, "ping");
long j10 = sharedPreferences.getLong(l10, 0L);
try {
q2.h hVar = q2.h.f12016a;
JSONObject a10 = q2.h.a(h.a.MOBILE_INSTALL_EVENT, e10, i2.o.f9055b.b(context), z(context), context);
ia.n nVar = ia.n.f9196a;
String format = String.format("%s/activities", Arrays.copyOf(new Object[]{str}, 1));
ia.i.d(format, "java.lang.String.format(format, *args)");
j0 a11 = f8441w.a(null, format, a10, null);
if (j10 == 0 && a11.k().b() == null) {
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.putLong(l10, System.currentTimeMillis());
edit.apply();
}
} catch (JSONException e11) {
throw new s("An error occurred while publishing install.", e11);
}
} catch (Exception e12) {
x2.t0.j0("Facebook-publish", e12);
}
}
public static final void K(Context context, final String str) {
ia.i.e(context, "context");
ia.i.e(str, "applicationId");
final Context applicationContext = context.getApplicationContext();
if (applicationContext == null) {
return;
}
t().execute(new Runnable() {
@Override
public final void run() {
f0.L(applicationContext, str);
}
});
x2.s sVar = x2.s.f14320a;
if (x2.s.g(s.b.OnDeviceEventProcessing) && s2.c.d()) {
s2.c.g(str, "com.facebook.sdk.attributionTracking");
}
}
public static final void L(Context context, String str) {
ia.i.e(context, "$applicationContext");
ia.i.e(str, "$applicationId");
f8419a.J(context, str);
}
public static final synchronized void M(Context context) {
synchronized (f0.class) {
ia.i.e(context, "applicationContext");
N(context, null);
}
}
public static final synchronized void N(Context context, final b bVar) {
boolean z10;
synchronized (f0.class) {
ia.i.e(context, "applicationContext");
AtomicBoolean atomicBoolean = f8438t;
if (atomicBoolean.get()) {
if (bVar != null) {
bVar.a();
}
return;
}
boolean z11 = false;
x2.u0.g(context, false);
x2.u0.i(context, false);
Context applicationContext = context.getApplicationContext();
ia.i.d(applicationContext, "applicationContext.applicationContext");
f8431m = applicationContext;
i2.o.f9055b.b(context);
Context context2 = f8431m;
if (context2 == null) {
ia.i.r("applicationContext");
throw null;
}
I(context2);
String str = f8423e;
if (str != null && str.length() != 0) {
z10 = false;
if (!z10) {
throw new s("A valid Facebook app id must be set in the AndroidManifest.xml or set by calling FacebookSdk.setApplicationId before initializing the sdk.");
}
String str2 = f8425g;
if ((str2 == null || str2.length() == 0) ? true : true) {
throw new s("A valid Facebook app client token must be set in the AndroidManifest.xml or set by calling FacebookSdk.setClientToken before initializing the sdk.");
}
atomicBoolean.set(true);
if (o()) {
j();
}
Context context3 = f8431m;
if (context3 == null) {
ia.i.r("applicationContext");
throw null;
}
if ((context3 instanceof Application) && c1.d()) {
q2.f fVar = q2.f.f12003a;
Context context4 = f8431m;
if (context4 == null) {
ia.i.r("applicationContext");
throw null;
}
q2.f.x((Application) context4, f8423e);
}
x2.a0.g();
x2.k0.E();
c.a aVar = x2.c.f14198b;
Context context5 = f8431m;
if (context5 == null) {
ia.i.r("applicationContext");
throw null;
}
aVar.a(context5);
f8430l = new x2.g0<>(new Callable() {
@Override
public final Object call() {
File O;
O = f0.O();
return O;
}
});
x2.s sVar = x2.s.f14320a;
x2.s.a(s.b.Instrument, new s.a() {
@Override
public final void a(boolean z12) {
f0.P(z12);
}
});
x2.s.a(s.b.AppEvents, new s.a() {
@Override
public final void a(boolean z12) {
f0.Q(z12);
}
});
x2.s.a(s.b.ChromeCustomTabsPrefetching, new s.a() {
@Override
public final void a(boolean z12) {
f0.R(z12);
}
});
x2.s.a(s.b.IgnoreAppSwitchToLoggedOut, new s.a() {
@Override
public final void a(boolean z12) {
f0.S(z12);
}
});
x2.s.a(s.b.BypassAppSwitch, new s.a() {
@Override
public final void a(boolean z12) {
f0.T(z12);
}
});
t().execute(new FutureTask(new Callable(bVar) {
@Override
public final Object call() {
Void U;
U = f0.U(null);
return U;
}
}));
return;
}
z10 = true;
if (!z10) {
}
}
}
public static final File O() {
Context context = f8431m;
if (context != null) {
return context.getCacheDir();
}
ia.i.r("applicationContext");
throw null;
}
public static final void P(boolean z10) {
if (z10) {
z2.g.d();
}
}
public static final void Q(boolean z10) {
if (z10) {
i2.a0.a();
}
}
public static final void R(boolean z10) {
if (z10) {
f8435q = true;
}
}
public static final void S(boolean z10) {
if (z10) {
f8436r = true;
}
}
public static final void T(boolean z10) {
if (z10) {
f8437s = true;
}
}
public static final Void U(b bVar) {
g.f8443f.e().j();
u0.f8602d.a().d();
if (h2.a.f8360l.g()) {
s0.b bVar2 = s0.f8589h;
if (bVar2.b() == null) {
bVar2.a();
}
}
if (bVar != null) {
bVar.a();
}
o.a aVar = i2.o.f9055b;
aVar.e(l(), f8423e);
c1.k();
Context applicationContext = l().getApplicationContext();
ia.i.d(applicationContext, "getApplicationContext().applicationContext");
aVar.f(applicationContext).a();
return null;
}
public static final void j() {
f8442x = true;
}
public static final boolean k() {
return c1.b();
}
public static final Context l() {
x2.u0.o();
Context context = f8431m;
if (context != null) {
return context;
}
ia.i.r("applicationContext");
throw null;
}
public static final String m() {
x2.u0.o();
String str = f8423e;
if (str != null) {
return str;
}
throw new s("A valid Facebook app id must be set in the AndroidManifest.xml or set by calling FacebookSdk.setApplicationId before initializing the sdk.");
}
public static final String n() {
x2.u0.o();
return f8424f;
}
public static final boolean o() {
return c1.c();
}
public static final boolean p() {
return c1.d();
}
public static final int q() {
x2.u0.o();
return f8432n;
}
public static final String r() {
x2.u0.o();
String str = f8425g;
if (str != null) {
return str;
}
throw new s("A valid Facebook client token must be set in the AndroidManifest.xml or set by calling FacebookSdk.setClientToken before initializing the sdk. Visit https://developers.facebook.com/docs/android/getting-started#add-app_id for more information.");
}
public static final boolean s() {
return c1.e();
}
public static final Executor t() {
ReentrantLock reentrantLock = f8433o;
reentrantLock.lock();
try {
if (f8422d == null) {
f8422d = AsyncTask.THREAD_POOL_EXECUTOR;
}
x9.s sVar = x9.s.f14559a;
reentrantLock.unlock();
Executor executor = f8422d;
if (executor != null) {
return executor;
}
throw new IllegalStateException("Required value was null.".toString());
} catch (Throwable th) {
reentrantLock.unlock();
throw th;
}
}
public static final String u() {
return f8440v;
}
public static final String v() {
return "fb.gg";
}
public static final String w() {
x2.t0 t0Var = x2.t0.f14355a;
String str = f8420b;
ia.n nVar = ia.n.f9196a;
String format = String.format("getGraphApiVersion: %s", Arrays.copyOf(new Object[]{f8434p}, 1));
ia.i.d(format, "java.lang.String.format(format, *args)");
x2.t0.k0(str, format);
return f8434p;
}
public static final String x() {
h2.a e10 = h2.a.f8360l.e();
return x2.t0.E(e10 != null ? e10.r() : null);
}
public static final String y() {
return f8439u;
}
public static final boolean z(Context context) {
ia.i.e(context, "context");
x2.u0.o();
return context.getSharedPreferences("com.facebook.sdk.appEventPreferences", 0).getBoolean("limitEventUsage", false);
}
}