- 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
128 lines
4.8 KiB
Java
128 lines
4.8 KiB
Java
package com.google.protobuf;
|
|
|
|
import androidx.core.internal.view.SupportMenu;
|
|
import com.google.protobuf.GeneratedMessageLite;
|
|
import java.util.Collections;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class ExtensionRegistryLite {
|
|
static final ExtensionRegistryLite EMPTY_REGISTRY_LITE = new ExtensionRegistryLite(true);
|
|
static final String EXTENSION_CLASS_NAME = "com.google.protobuf.Extension";
|
|
private static boolean doFullRuntimeInheritanceCheck = true;
|
|
private static volatile boolean eagerlyParseMessageSets;
|
|
private static volatile ExtensionRegistryLite emptyRegistry;
|
|
private final Map<ObjectIntPair, GeneratedMessageLite.GeneratedExtension<?, ?>> extensionsByNumber;
|
|
|
|
public static boolean isEagerlyParseMessageSets() {
|
|
return eagerlyParseMessageSets;
|
|
}
|
|
|
|
public static void setEagerlyParseMessageSets(boolean z) {
|
|
eagerlyParseMessageSets = z;
|
|
}
|
|
|
|
public static class ExtensionClassHolder {
|
|
static final Class<?> INSTANCE = resolveExtensionClass();
|
|
|
|
private ExtensionClassHolder() {
|
|
}
|
|
|
|
public static Class<?> resolveExtensionClass() {
|
|
try {
|
|
return Class.forName(ExtensionRegistryLite.EXTENSION_CLASS_NAME);
|
|
} catch (ClassNotFoundException unused) {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static ExtensionRegistryLite newInstance() {
|
|
if (doFullRuntimeInheritanceCheck) {
|
|
return ExtensionRegistryFactory.create();
|
|
}
|
|
return new ExtensionRegistryLite();
|
|
}
|
|
|
|
public static ExtensionRegistryLite getEmptyRegistry() {
|
|
ExtensionRegistryLite extensionRegistryLite = emptyRegistry;
|
|
if (extensionRegistryLite == null) {
|
|
synchronized (ExtensionRegistryLite.class) {
|
|
try {
|
|
extensionRegistryLite = emptyRegistry;
|
|
if (extensionRegistryLite == null) {
|
|
extensionRegistryLite = doFullRuntimeInheritanceCheck ? ExtensionRegistryFactory.createEmpty() : EMPTY_REGISTRY_LITE;
|
|
emptyRegistry = extensionRegistryLite;
|
|
}
|
|
} finally {
|
|
}
|
|
}
|
|
}
|
|
return extensionRegistryLite;
|
|
}
|
|
|
|
public ExtensionRegistryLite getUnmodifiable() {
|
|
return new ExtensionRegistryLite(this);
|
|
}
|
|
|
|
public <ContainingType extends MessageLite> GeneratedMessageLite.GeneratedExtension<ContainingType, ?> findLiteExtensionByNumber(ContainingType containingtype, int i) {
|
|
return (GeneratedMessageLite.GeneratedExtension) this.extensionsByNumber.get(new ObjectIntPair(containingtype, i));
|
|
}
|
|
|
|
public final void add(GeneratedMessageLite.GeneratedExtension<?, ?> generatedExtension) {
|
|
this.extensionsByNumber.put(new ObjectIntPair(generatedExtension.getContainingTypeDefaultInstance(), generatedExtension.getNumber()), generatedExtension);
|
|
}
|
|
|
|
public final void add(ExtensionLite<?, ?> extensionLite) {
|
|
if (GeneratedMessageLite.GeneratedExtension.class.isAssignableFrom(extensionLite.getClass())) {
|
|
add((GeneratedMessageLite.GeneratedExtension<?, ?>) extensionLite);
|
|
}
|
|
if (doFullRuntimeInheritanceCheck && ExtensionRegistryFactory.isFullRegistry(this)) {
|
|
try {
|
|
getClass().getMethod("add", ExtensionClassHolder.INSTANCE).invoke(this, extensionLite);
|
|
} catch (Exception e) {
|
|
throw new IllegalArgumentException(String.format("Could not invoke ExtensionRegistry#add for %s", extensionLite), e);
|
|
}
|
|
}
|
|
}
|
|
|
|
public ExtensionRegistryLite() {
|
|
this.extensionsByNumber = new HashMap();
|
|
}
|
|
|
|
public ExtensionRegistryLite(ExtensionRegistryLite extensionRegistryLite) {
|
|
if (extensionRegistryLite == EMPTY_REGISTRY_LITE) {
|
|
this.extensionsByNumber = Collections.emptyMap();
|
|
} else {
|
|
this.extensionsByNumber = Collections.unmodifiableMap(extensionRegistryLite.extensionsByNumber);
|
|
}
|
|
}
|
|
|
|
public ExtensionRegistryLite(boolean z) {
|
|
this.extensionsByNumber = Collections.emptyMap();
|
|
}
|
|
|
|
public static final class ObjectIntPair {
|
|
private final int number;
|
|
private final Object object;
|
|
|
|
public ObjectIntPair(Object obj, int i) {
|
|
this.object = obj;
|
|
this.number = i;
|
|
}
|
|
|
|
public int hashCode() {
|
|
return (System.identityHashCode(this.object) * SupportMenu.USER_MASK) + this.number;
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (!(obj instanceof ObjectIntPair)) {
|
|
return false;
|
|
}
|
|
ObjectIntPair objectIntPair = (ObjectIntPair) obj;
|
|
return this.object == objectIntPair.object && this.number == objectIntPair.number;
|
|
}
|
|
}
|
|
}
|