Free Fire v1.103.1版本的 MD5 值为:f6c45f9f1485263aa5af0fb400f973fc
以下内容为反编译后的 c1.java 源代码,内容仅作参考
package h2;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONException;
import org.json.JSONObject;
public final class c1 {
public static final c1 f8390a = new c1();
private static final String f8391b = c1.class.getName();
private static final AtomicBoolean f8392c = new AtomicBoolean(false);
private static final AtomicBoolean f8393d = new AtomicBoolean(false);
private static final a f8394e = new a(true, "com.facebook.sdk.AutoInitEnabled");
private static final a f8395f = new a(true, "com.facebook.sdk.AutoLogAppEventsEnabled");
private static final a f8396g = new a(true, "com.facebook.sdk.AdvertiserIDCollectionEnabled");
private static final a f8397h = new a(false, "auto_event_setup_enabled");
private static final a f8398i = new a(true, "com.facebook.sdk.MonitorEnabled");
private static SharedPreferences f8399j;
public static final class a {
private boolean f8400a;
private String f8401b;
private Boolean f8402c;
private long f8403d;
public a(boolean z10, String str) {
ia.i.e(str, "key");
this.f8400a = z10;
this.f8401b = str;
}
public final boolean a() {
return this.f8400a;
}
public final String b() {
return this.f8401b;
}
public final long c() {
return this.f8403d;
}
public final Boolean d() {
return this.f8402c;
}
public final boolean e() {
Boolean bool = this.f8402c;
return bool == null ? this.f8400a : bool.booleanValue();
}
public final void f(long j10) {
this.f8403d = j10;
}
public final void g(Boolean bool) {
this.f8402c = bool;
}
}
private c1() {
}
public static final boolean b() {
f8390a.h();
return f8396g.e();
}
public static final boolean c() {
f8390a.h();
return f8394e.e();
}
public static final boolean d() {
f8390a.h();
return f8395f.e();
}
public static final boolean e() {
f8390a.h();
return f8397h.e();
}
private final void f() {
a aVar = f8397h;
n(aVar);
final long currentTimeMillis = System.currentTimeMillis();
if (aVar.d() == null || currentTimeMillis - aVar.c() >= 604800000) {
aVar.g(null);
aVar.f(0L);
if (f8393d.compareAndSet(false, true)) {
f0.t().execute(new Runnable() {
@Override
public final void run() {
c1.g(currentTimeMillis);
}
});
}
}
}
public static final void g(long j10) {
if (f8396g.e()) {
x2.a0 a0Var = x2.a0.f14169a;
x2.w o10 = x2.a0.o(f0.m(), false);
if (o10 != null && o10.b()) {
x2.b e10 = x2.b.f14182f.e(f0.l());
String h10 = (e10 == null || e10.h() == null) ? null : e10.h();
if (h10 != null) {
Bundle bundle = new Bundle();
bundle.putString("advertiser_id", h10);
bundle.putString("fields", "auto_event_setup_enabled");
j0 x10 = j0.f8485n.x(null, "app", null);
x10.H(bundle);
JSONObject c10 = x10.k().c();
if (c10 != null) {
a aVar = f8397h;
aVar.g(Boolean.valueOf(c10.optBoolean("auto_event_setup_enabled", false)));
aVar.f(j10);
f8390a.p(aVar);
}
}
}
}
f8393d.set(false);
}
private final void h() {
if (f0.F() && f8392c.compareAndSet(false, true)) {
SharedPreferences sharedPreferences = f0.l().getSharedPreferences("com.facebook.sdk.USER_SETTINGS", 0);
ia.i.d(sharedPreferences, "FacebookSdk.getApplicationContext()\n .getSharedPreferences(USER_SETTINGS, Context.MODE_PRIVATE)");
f8399j = sharedPreferences;
i(f8395f, f8396g, f8394e);
f();
m();
l();
}
}
private final void i(a... aVarArr) {
int length = aVarArr.length;
int i10 = 0;
while (i10 < length) {
a aVar = aVarArr[i10];
i10++;
if (aVar == f8397h) {
f();
} else if (aVar.d() == null) {
n(aVar);
if (aVar.d() == null) {
j(aVar);
}
} else {
p(aVar);
}
}
}
private final void j(a aVar) {
o();
try {
Context l10 = f0.l();
ApplicationInfo applicationInfo = l10.getPackageManager().getApplicationInfo(l10.getPackageName(), 128);
ia.i.d(applicationInfo, "ctx.packageManager.getApplicationInfo(ctx.packageName, PackageManager.GET_META_DATA)");
Bundle bundle = applicationInfo.metaData;
if (bundle == null || !bundle.containsKey(aVar.b())) {
return;
}
aVar.g(Boolean.valueOf(applicationInfo.metaData.getBoolean(aVar.b(), aVar.a())));
} catch (PackageManager.NameNotFoundException e10) {
x2.t0 t0Var = x2.t0.f14355a;
x2.t0.j0(f8391b, e10);
}
}
public static final void k() {
try {
Context l10 = f0.l();
ApplicationInfo applicationInfo = l10.getPackageManager().getApplicationInfo(l10.getPackageName(), 128);
ia.i.d(applicationInfo, "ctx.packageManager.getApplicationInfo(ctx.packageName, PackageManager.GET_META_DATA)");
Bundle bundle = applicationInfo.metaData;
if (bundle == null || !bundle.getBoolean("com.facebook.sdk.AutoAppLinkEnabled", false)) {
return;
}
i2.e0 e0Var = new i2.e0(l10);
Bundle bundle2 = new Bundle();
if (!x2.t0.V()) {
bundle2.putString("SchemeWarning", "You haven't set the Auto App Link URL scheme: fb<YOUR APP ID> in AndroidManifest");
Log.w(f8391b, "You haven't set the Auto App Link URL scheme: fb<YOUR APP ID> in AndroidManifest");
}
e0Var.d("fb_auto_applink", bundle2);
} catch (PackageManager.NameNotFoundException unused) {
}
}
private final void l() {
int i10;
int i11;
ApplicationInfo applicationInfo;
if (f8392c.get() && f0.F()) {
Context l10 = f0.l();
int i12 = 0;
int i13 = ((f8394e.e() ? 1 : 0) << 0) | 0 | ((f8395f.e() ? 1 : 0) << 1) | ((f8396g.e() ? 1 : 0) << 2) | ((f8398i.e() ? 1 : 0) << 3);
SharedPreferences sharedPreferences = f8399j;
if (sharedPreferences == null) {
ia.i.r("userSettingPref");
throw null;
}
int i14 = sharedPreferences.getInt("com.facebook.sdk.USER_SETTINGS_BITMASK", 0);
if (i14 != i13) {
SharedPreferences sharedPreferences2 = f8399j;
if (sharedPreferences2 == null) {
ia.i.r("userSettingPref");
throw null;
}
sharedPreferences2.edit().putInt("com.facebook.sdk.USER_SETTINGS_BITMASK", i13).apply();
try {
applicationInfo = l10.getPackageManager().getApplicationInfo(l10.getPackageName(), 128);
ia.i.d(applicationInfo, "ctx.packageManager.getApplicationInfo(ctx.packageName, PackageManager.GET_META_DATA)");
} catch (PackageManager.NameNotFoundException unused) {
i10 = 0;
}
if (applicationInfo.metaData == null) {
i11 = 0;
i2.e0 e0Var = new i2.e0(l10);
Bundle bundle = new Bundle();
bundle.putInt("usage", i12);
bundle.putInt("initial", i11);
bundle.putInt("previous", i14);
bundle.putInt("current", i13);
e0Var.b(bundle);
}
String[] strArr = {"com.facebook.sdk.AutoInitEnabled", "com.facebook.sdk.AutoLogAppEventsEnabled", "com.facebook.sdk.AdvertiserIDCollectionEnabled", "com.facebook.sdk.MonitorEnabled"};
boolean[] zArr = {true, true, true, true};
int i15 = 0;
i10 = 0;
i11 = 0;
while (true) {
int i16 = i15 + 1;
try {
i10 |= (applicationInfo.metaData.containsKey(strArr[i15]) ? 1 : 0) << i15;
i11 |= (applicationInfo.metaData.getBoolean(strArr[i15], zArr[i15]) ? 1 : 0) << i15;
if (i16 > 3) {
break;
}
i15 = i16;
} catch (PackageManager.NameNotFoundException unused2) {
i12 = i11;
i11 = i12;
i12 = i10;
i2.e0 e0Var2 = new i2.e0(l10);
Bundle bundle2 = new Bundle();
bundle2.putInt("usage", i12);
bundle2.putInt("initial", i11);
bundle2.putInt("previous", i14);
bundle2.putInt("current", i13);
e0Var2.b(bundle2);
}
}
i12 = i10;
i2.e0 e0Var22 = new i2.e0(l10);
Bundle bundle22 = new Bundle();
bundle22.putInt("usage", i12);
bundle22.putInt("initial", i11);
bundle22.putInt("previous", i14);
bundle22.putInt("current", i13);
e0Var22.b(bundle22);
}
}
}
private final void m() {
try {
Context l10 = f0.l();
ApplicationInfo applicationInfo = l10.getPackageManager().getApplicationInfo(l10.getPackageName(), 128);
ia.i.d(applicationInfo, "ctx.packageManager.getApplicationInfo(ctx.packageName, PackageManager.GET_META_DATA)");
Bundle bundle = applicationInfo.metaData;
if (bundle != null) {
if (!bundle.containsKey("com.facebook.sdk.AutoLogAppEventsEnabled")) {
Log.w(f8391b, "Please set a value for AutoLogAppEventsEnabled. Set the flag to TRUE if you want to collect app install, app launch and in-app purchase events automatically. To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-android#disable-auto-events.");
}
if (!applicationInfo.metaData.containsKey("com.facebook.sdk.AdvertiserIDCollectionEnabled")) {
Log.w(f8391b, "You haven't set a value for AdvertiserIDCollectionEnabled. Set the flag to TRUE if you want to collect Advertiser ID for better advertising and analytics results. To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-android#disable-auto-events.");
}
if (b()) {
return;
}
Log.w(f8391b, "The value for AdvertiserIDCollectionEnabled is currently set to FALSE so you're sending app events without collecting Advertiser ID. This can affect the quality of your advertising and analytics results.");
}
} catch (PackageManager.NameNotFoundException unused) {
}
}
private final void n(a aVar) {
String str = "";
o();
try {
SharedPreferences sharedPreferences = f8399j;
if (sharedPreferences == null) {
ia.i.r("userSettingPref");
throw null;
}
String string = sharedPreferences.getString(aVar.b(), "");
if (string != null) {
str = string;
}
if (str.length() > 0) {
JSONObject jSONObject = new JSONObject(str);
aVar.g(Boolean.valueOf(jSONObject.getBoolean("value")));
aVar.f(jSONObject.getLong("last_timestamp"));
}
} catch (JSONException e10) {
x2.t0 t0Var = x2.t0.f14355a;
x2.t0.j0(f8391b, e10);
}
}
private final void o() {
if (!f8392c.get()) {
throw new g0("The UserSettingManager has not been initialized successfully");
}
}
private final void p(a aVar) {
o();
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("value", aVar.d());
jSONObject.put("last_timestamp", aVar.c());
SharedPreferences sharedPreferences = f8399j;
if (sharedPreferences == null) {
ia.i.r("userSettingPref");
throw null;
}
sharedPreferences.edit().putString(aVar.b(), jSONObject.toString()).apply();
l();
} catch (Exception e10) {
x2.t0 t0Var = x2.t0.f14355a;
x2.t0.j0(f8391b, e10);
}
}
}