- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
174 lines
5.8 KiB
Java
174 lines
5.8 KiB
Java
package com.facebook.appevents.aam;
|
|
|
|
import androidx.annotation.RestrictTo;
|
|
import com.facebook.internal.instrument.crashshield.CrashShieldHandler;
|
|
import java.util.ArrayList;
|
|
import java.util.HashSet;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
import java.util.concurrent.CopyOnWriteArraySet;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.text.StringsKt__StringsKt;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
|
|
/* loaded from: classes2.dex */
|
|
public final class MetadataRule {
|
|
private static final String FIELD_K = "k";
|
|
private static final String FIELD_K_DELIMITER = ",";
|
|
private static final String FIELD_V = "v";
|
|
private final List<String> keyRules;
|
|
private final String name;
|
|
private final String valRule;
|
|
public static final Companion Companion = new Companion(null);
|
|
private static final Set<MetadataRule> rules = new CopyOnWriteArraySet();
|
|
|
|
public /* synthetic */ MetadataRule(String str, List list, String str2, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(str, list, str2);
|
|
}
|
|
|
|
public static final Set<String> getEnabledRuleNames() {
|
|
if (CrashShieldHandler.isObjectCrashing(MetadataRule.class)) {
|
|
return null;
|
|
}
|
|
try {
|
|
return Companion.getEnabledRuleNames();
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, MetadataRule.class);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static final Set<MetadataRule> getRules() {
|
|
if (CrashShieldHandler.isObjectCrashing(MetadataRule.class)) {
|
|
return null;
|
|
}
|
|
try {
|
|
return Companion.getRules();
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, MetadataRule.class);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static final void updateRules(String str) {
|
|
if (CrashShieldHandler.isObjectCrashing(MetadataRule.class)) {
|
|
return;
|
|
}
|
|
try {
|
|
Companion.updateRules(str);
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, MetadataRule.class);
|
|
}
|
|
}
|
|
|
|
private MetadataRule(String str, List<String> list, String str2) {
|
|
this.name = str;
|
|
this.valRule = str2;
|
|
this.keyRules = list;
|
|
}
|
|
|
|
public static final /* synthetic */ Set access$getRules$cp() {
|
|
if (CrashShieldHandler.isObjectCrashing(MetadataRule.class)) {
|
|
return null;
|
|
}
|
|
try {
|
|
return rules;
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, MetadataRule.class);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public final String getName() {
|
|
if (CrashShieldHandler.isObjectCrashing(this)) {
|
|
return null;
|
|
}
|
|
try {
|
|
return this.name;
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, this);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public final String getValRule() {
|
|
if (CrashShieldHandler.isObjectCrashing(this)) {
|
|
return null;
|
|
}
|
|
try {
|
|
return this.valRule;
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, this);
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
|
|
public final Set<MetadataRule> getRules() {
|
|
return new HashSet(MetadataRule.access$getRules$cp());
|
|
}
|
|
|
|
public final void updateRules(String rulesFromServer) {
|
|
Intrinsics.checkNotNullParameter(rulesFromServer, "rulesFromServer");
|
|
try {
|
|
MetadataRule.access$getRules$cp().clear();
|
|
constructRules(new JSONObject(rulesFromServer));
|
|
} catch (JSONException unused) {
|
|
}
|
|
}
|
|
|
|
public final Set<String> getEnabledRuleNames() {
|
|
HashSet hashSet = new HashSet();
|
|
Iterator it = MetadataRule.access$getRules$cp().iterator();
|
|
while (it.hasNext()) {
|
|
hashSet.add(((MetadataRule) it.next()).getName());
|
|
}
|
|
return hashSet;
|
|
}
|
|
|
|
private final void constructRules(JSONObject jSONObject) {
|
|
List split$default;
|
|
Iterator<String> keys = jSONObject.keys();
|
|
while (keys.hasNext()) {
|
|
String key = keys.next();
|
|
JSONObject optJSONObject = jSONObject.optJSONObject(key);
|
|
if (optJSONObject != null) {
|
|
String k = optJSONObject.optString("k");
|
|
String v = optJSONObject.optString("v");
|
|
Intrinsics.checkNotNullExpressionValue(k, "k");
|
|
if (k.length() != 0) {
|
|
Set access$getRules$cp = MetadataRule.access$getRules$cp();
|
|
Intrinsics.checkNotNullExpressionValue(key, "key");
|
|
split$default = StringsKt__StringsKt.split$default((CharSequence) k, new String[]{MetadataRule.FIELD_K_DELIMITER}, false, 0, 6, (Object) null);
|
|
Intrinsics.checkNotNullExpressionValue(v, "v");
|
|
access$getRules$cp.add(new MetadataRule(key, split$default, v, null));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public final List<String> getKeyRules() {
|
|
if (CrashShieldHandler.isObjectCrashing(this)) {
|
|
return null;
|
|
}
|
|
try {
|
|
return new ArrayList(this.keyRules);
|
|
} catch (Throwable th) {
|
|
CrashShieldHandler.handleThrowable(th, this);
|
|
return null;
|
|
}
|
|
}
|
|
}
|