Files
rr3-apk/decompiled-community/sources/androidx/datastore/preferences/protobuf/GeneratedMessageLite.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

1113 lines
54 KiB
Java

package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.AbstractMessageLite;
import androidx.datastore.preferences.protobuf.ArrayDecoders;
import androidx.datastore.preferences.protobuf.FieldSet;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite.Builder;
import androidx.datastore.preferences.protobuf.Internal;
import androidx.datastore.preferences.protobuf.MessageLite;
import androidx.datastore.preferences.protobuf.WireFormat;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/* loaded from: classes.dex */
public abstract class GeneratedMessageLite<MessageType extends GeneratedMessageLite<MessageType, BuilderType>, BuilderType extends Builder<MessageType, BuilderType>> extends AbstractMessageLite<MessageType, BuilderType> {
private static Map<Object, GeneratedMessageLite<?, ?>> defaultInstanceMap = new ConcurrentHashMap();
protected UnknownFieldSetLite unknownFields = UnknownFieldSetLite.getDefaultInstance();
protected int memoizedSerializedSize = -1;
public interface ExtendableMessageOrBuilder<MessageType extends ExtendableMessage<MessageType, BuilderType>, BuilderType extends ExtendableBuilder<MessageType, BuilderType>> extends MessageLiteOrBuilder {
<Type> Type getExtension(ExtensionLite<MessageType, Type> extensionLite);
<Type> Type getExtension(ExtensionLite<MessageType, List<Type>> extensionLite, int i);
<Type> int getExtensionCount(ExtensionLite<MessageType, List<Type>> extensionLite);
<Type> boolean hasExtension(ExtensionLite<MessageType, Type> extensionLite);
}
public enum MethodToInvoke {
GET_MEMOIZED_IS_INITIALIZED,
SET_MEMOIZED_IS_INITIALIZED,
BUILD_MESSAGE_INFO,
NEW_MUTABLE_INSTANCE,
NEW_BUILDER,
GET_DEFAULT_INSTANCE,
GET_PARSER
}
public abstract Object dynamicMethod(MethodToInvoke methodToInvoke, Object obj, Object obj2);
@Override // androidx.datastore.preferences.protobuf.AbstractMessageLite
public int getMemoizedSerializedSize() {
return this.memoizedSerializedSize;
}
@Override // androidx.datastore.preferences.protobuf.AbstractMessageLite
public void setMemoizedSerializedSize(int i) {
this.memoizedSerializedSize = i;
}
@Override // androidx.datastore.preferences.protobuf.MessageLite
public final Parser<MessageType> getParserForType() {
return (Parser) dynamicMethod(MethodToInvoke.GET_PARSER);
}
@Override // androidx.datastore.preferences.protobuf.MessageLiteOrBuilder
public final MessageType getDefaultInstanceForType() {
return (MessageType) dynamicMethod(MethodToInvoke.GET_DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.MessageLite
public final BuilderType newBuilderForType() {
return (BuilderType) dynamicMethod(MethodToInvoke.NEW_BUILDER);
}
public String toString() {
return MessageLiteToString.toString(this, super.toString());
}
public int hashCode() {
int i = this.memoizedHashCode;
if (i != 0) {
return i;
}
int hashCode = Protobuf.getInstance().schemaFor((Protobuf) this).hashCode(this);
this.memoizedHashCode = hashCode;
return hashCode;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (getDefaultInstanceForType().getClass().isInstance(obj)) {
return Protobuf.getInstance().schemaFor((Protobuf) this).equals(this, (GeneratedMessageLite) obj);
}
return false;
}
private final void ensureUnknownFieldsInitialized() {
if (this.unknownFields == UnknownFieldSetLite.getDefaultInstance()) {
this.unknownFields = UnknownFieldSetLite.newInstance();
}
}
public boolean parseUnknownField(int i, CodedInputStream codedInputStream) throws IOException {
if (WireFormat.getTagWireType(i) == 4) {
return false;
}
ensureUnknownFieldsInitialized();
return this.unknownFields.mergeFieldFrom(i, codedInputStream);
}
public void mergeVarintField(int i, int i2) {
ensureUnknownFieldsInitialized();
this.unknownFields.mergeVarintField(i, i2);
}
public void mergeLengthDelimitedField(int i, ByteString byteString) {
ensureUnknownFieldsInitialized();
this.unknownFields.mergeLengthDelimitedField(i, byteString);
}
public void makeImmutable() {
Protobuf.getInstance().schemaFor((Protobuf) this).makeImmutable(this);
}
public final <MessageType extends GeneratedMessageLite<MessageType, BuilderType>, BuilderType extends Builder<MessageType, BuilderType>> BuilderType createBuilder() {
return (BuilderType) dynamicMethod(MethodToInvoke.NEW_BUILDER);
}
public final <MessageType extends GeneratedMessageLite<MessageType, BuilderType>, BuilderType extends Builder<MessageType, BuilderType>> BuilderType createBuilder(MessageType messagetype) {
return (BuilderType) createBuilder().mergeFrom(messagetype);
}
@Override // androidx.datastore.preferences.protobuf.MessageLiteOrBuilder
public final boolean isInitialized() {
return isInitialized(this, true);
}
@Override // androidx.datastore.preferences.protobuf.MessageLite
public final BuilderType toBuilder() {
BuilderType buildertype = (BuilderType) dynamicMethod(MethodToInvoke.NEW_BUILDER);
buildertype.mergeFrom(this);
return buildertype;
}
public Object dynamicMethod(MethodToInvoke methodToInvoke, Object obj) {
return dynamicMethod(methodToInvoke, obj, null);
}
public Object dynamicMethod(MethodToInvoke methodToInvoke) {
return dynamicMethod(methodToInvoke, null, null);
}
@Override // androidx.datastore.preferences.protobuf.MessageLite
public void writeTo(CodedOutputStream codedOutputStream) throws IOException {
Protobuf.getInstance().schemaFor((Protobuf) this).writeTo(this, CodedOutputStreamWriter.forCodedOutput(codedOutputStream));
}
@Override // androidx.datastore.preferences.protobuf.MessageLite
public int getSerializedSize() {
if (this.memoizedSerializedSize == -1) {
this.memoizedSerializedSize = Protobuf.getInstance().schemaFor((Protobuf) this).getSerializedSize(this);
}
return this.memoizedSerializedSize;
}
public Object buildMessageInfo() throws Exception {
return dynamicMethod(MethodToInvoke.BUILD_MESSAGE_INFO);
}
public static <T extends GeneratedMessageLite<?, ?>> T getDefaultInstance(Class<T> cls) {
GeneratedMessageLite<?, ?> generatedMessageLite = defaultInstanceMap.get(cls);
if (generatedMessageLite == null) {
try {
Class.forName(cls.getName(), true, cls.getClassLoader());
generatedMessageLite = defaultInstanceMap.get(cls);
} catch (ClassNotFoundException e) {
throw new IllegalStateException("Class initialization cannot fail.", e);
}
}
if (generatedMessageLite == null) {
generatedMessageLite = (T) ((GeneratedMessageLite) UnsafeUtil.allocateInstance(cls)).getDefaultInstanceForType();
if (generatedMessageLite == null) {
throw new IllegalStateException();
}
defaultInstanceMap.put(cls, generatedMessageLite);
}
return (T) generatedMessageLite;
}
public static <T extends GeneratedMessageLite<?, ?>> void registerDefaultInstance(Class<T> cls, T t) {
defaultInstanceMap.put(cls, t);
}
public static Object newMessageInfo(MessageLite messageLite, String str, Object[] objArr) {
return new RawMessageInfo(messageLite, str, objArr);
}
public final void mergeUnknownFields(UnknownFieldSetLite unknownFieldSetLite) {
this.unknownFields = UnknownFieldSetLite.mutableCopyOf(this.unknownFields, unknownFieldSetLite);
}
public static abstract class Builder<MessageType extends GeneratedMessageLite<MessageType, BuilderType>, BuilderType extends Builder<MessageType, BuilderType>> extends AbstractMessageLite.Builder<MessageType, BuilderType> {
private final MessageType defaultInstance;
protected MessageType instance;
protected boolean isBuilt = false;
@Override // androidx.datastore.preferences.protobuf.MessageLiteOrBuilder
public MessageType getDefaultInstanceForType() {
return this.defaultInstance;
}
public Builder(MessageType messagetype) {
this.defaultInstance = messagetype;
this.instance = (MessageType) messagetype.dynamicMethod(MethodToInvoke.NEW_MUTABLE_INSTANCE);
}
public void copyOnWrite() {
if (this.isBuilt) {
MessageType messagetype = (MessageType) this.instance.dynamicMethod(MethodToInvoke.NEW_MUTABLE_INSTANCE);
mergeFromInstance(messagetype, this.instance);
this.instance = messagetype;
this.isBuilt = false;
}
}
@Override // androidx.datastore.preferences.protobuf.MessageLiteOrBuilder
public final boolean isInitialized() {
return GeneratedMessageLite.isInitialized(this.instance, false);
}
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
public final BuilderType clear() {
this.instance = (MessageType) this.instance.dynamicMethod(MethodToInvoke.NEW_MUTABLE_INSTANCE);
return this;
}
@Override // androidx.datastore.preferences.protobuf.AbstractMessageLite.Builder
/* renamed from: clone, reason: merged with bridge method [inline-methods] */
public BuilderType mo146clone() {
BuilderType buildertype = (BuilderType) getDefaultInstanceForType().newBuilderForType();
buildertype.mergeFrom(buildPartial());
return buildertype;
}
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
public MessageType buildPartial() {
if (this.isBuilt) {
return this.instance;
}
this.instance.makeImmutable();
this.isBuilt = true;
return this.instance;
}
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
public final MessageType build() {
MessageType buildPartial = buildPartial();
if (buildPartial.isInitialized()) {
return buildPartial;
}
throw AbstractMessageLite.Builder.newUninitializedMessageException(buildPartial);
}
@Override // androidx.datastore.preferences.protobuf.AbstractMessageLite.Builder
public BuilderType internalMergeFrom(MessageType messagetype) {
return mergeFrom((Builder<MessageType, BuilderType>) messagetype);
}
public BuilderType mergeFrom(MessageType messagetype) {
copyOnWrite();
mergeFromInstance(this.instance, messagetype);
return this;
}
private void mergeFromInstance(MessageType messagetype, MessageType messagetype2) {
Protobuf.getInstance().schemaFor((Protobuf) messagetype).mergeFrom(messagetype, messagetype2);
}
@Override // androidx.datastore.preferences.protobuf.AbstractMessageLite.Builder, androidx.datastore.preferences.protobuf.MessageLite.Builder
public BuilderType mergeFrom(byte[] bArr, int i, int i2, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
copyOnWrite();
try {
Protobuf.getInstance().schemaFor((Protobuf) this.instance).mergeFrom(this.instance, bArr, i, i + i2, new ArrayDecoders.Registers(extensionRegistryLite));
return this;
} catch (InvalidProtocolBufferException e) {
throw e;
} catch (IOException e2) {
throw new RuntimeException("Reading from byte array should not throw IOException.", e2);
} catch (IndexOutOfBoundsException unused) {
throw InvalidProtocolBufferException.truncatedMessage();
}
}
@Override // androidx.datastore.preferences.protobuf.AbstractMessageLite.Builder, androidx.datastore.preferences.protobuf.MessageLite.Builder
public BuilderType mergeFrom(byte[] bArr, int i, int i2) throws InvalidProtocolBufferException {
return mergeFrom(bArr, i, i2, ExtensionRegistryLite.getEmptyRegistry());
}
@Override // androidx.datastore.preferences.protobuf.AbstractMessageLite.Builder, androidx.datastore.preferences.protobuf.MessageLite.Builder
public BuilderType mergeFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
copyOnWrite();
try {
Protobuf.getInstance().schemaFor((Protobuf) this.instance).mergeFrom(this.instance, CodedInputStreamReader.forCodedInput(codedInputStream), extensionRegistryLite);
return this;
} catch (RuntimeException e) {
if (e.getCause() instanceof IOException) {
throw ((IOException) e.getCause());
}
throw e;
}
}
}
public static abstract class ExtendableMessage<MessageType extends ExtendableMessage<MessageType, BuilderType>, BuilderType extends ExtendableBuilder<MessageType, BuilderType>> extends GeneratedMessageLite<MessageType, BuilderType> implements ExtendableMessageOrBuilder<MessageType, BuilderType> {
protected FieldSet<ExtensionDescriptor> extensions = FieldSet.emptySet();
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite, androidx.datastore.preferences.protobuf.MessageLiteOrBuilder
public /* bridge */ /* synthetic */ MessageLite getDefaultInstanceForType() {
return super.getDefaultInstanceForType();
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite, androidx.datastore.preferences.protobuf.MessageLite
public /* bridge */ /* synthetic */ MessageLite.Builder newBuilderForType() {
return super.newBuilderForType();
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite, androidx.datastore.preferences.protobuf.MessageLite
public /* bridge */ /* synthetic */ MessageLite.Builder toBuilder() {
return super.toBuilder();
}
public final void mergeExtensionFields(MessageType messagetype) {
if (this.extensions.isImmutable()) {
this.extensions = this.extensions.m147clone();
}
this.extensions.mergeFrom(messagetype.extensions);
}
public <MessageType extends MessageLite> boolean parseUnknownField(MessageType messagetype, CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite, int i) throws IOException {
int tagFieldNumber = WireFormat.getTagFieldNumber(i);
return parseExtension(codedInputStream, extensionRegistryLite, extensionRegistryLite.findLiteExtensionByNumber(messagetype, tagFieldNumber), i, tagFieldNumber);
}
/* JADX WARN: Removed duplicated region for block: B:5:0x0038 */
/* JADX WARN: Removed duplicated region for block: B:8:0x003d */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private boolean parseExtension(androidx.datastore.preferences.protobuf.CodedInputStream r6, androidx.datastore.preferences.protobuf.ExtensionRegistryLite r7, androidx.datastore.preferences.protobuf.GeneratedMessageLite.GeneratedExtension<?, ?> r8, int r9, int r10) throws java.io.IOException {
/*
Method dump skipped, instructions count: 293
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessage.parseExtension(androidx.datastore.preferences.protobuf.CodedInputStream, androidx.datastore.preferences.protobuf.ExtensionRegistryLite, androidx.datastore.preferences.protobuf.GeneratedMessageLite$GeneratedExtension, int, int):boolean");
}
public <MessageType extends MessageLite> boolean parseUnknownFieldAsMessageSet(MessageType messagetype, CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite, int i) throws IOException {
if (i == WireFormat.MESSAGE_SET_ITEM_TAG) {
mergeMessageSetExtensionFromCodedStream(messagetype, codedInputStream, extensionRegistryLite);
return true;
}
if (WireFormat.getTagWireType(i) == 2) {
return parseUnknownField(messagetype, codedInputStream, extensionRegistryLite, i);
}
return codedInputStream.skipField(i);
}
private <MessageType extends MessageLite> void mergeMessageSetExtensionFromCodedStream(MessageType messagetype, CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
int i = 0;
ByteString byteString = null;
GeneratedExtension<?, ?> generatedExtension = null;
while (true) {
int readTag = codedInputStream.readTag();
if (readTag == 0) {
break;
}
if (readTag == WireFormat.MESSAGE_SET_TYPE_ID_TAG) {
i = codedInputStream.readUInt32();
if (i != 0) {
generatedExtension = extensionRegistryLite.findLiteExtensionByNumber(messagetype, i);
}
} else if (readTag == WireFormat.MESSAGE_SET_MESSAGE_TAG) {
if (i != 0 && generatedExtension != null) {
eagerlyMergeMessageSetExtension(codedInputStream, generatedExtension, extensionRegistryLite, i);
byteString = null;
} else {
byteString = codedInputStream.readBytes();
}
} else if (!codedInputStream.skipField(readTag)) {
break;
}
}
codedInputStream.checkLastTagWas(WireFormat.MESSAGE_SET_ITEM_END_TAG);
if (byteString == null || i == 0) {
return;
}
if (generatedExtension != null) {
mergeMessageSetExtensionFromBytes(byteString, extensionRegistryLite, generatedExtension);
} else {
mergeLengthDelimitedField(i, byteString);
}
}
private void eagerlyMergeMessageSetExtension(CodedInputStream codedInputStream, GeneratedExtension<?, ?> generatedExtension, ExtensionRegistryLite extensionRegistryLite, int i) throws IOException {
parseExtension(codedInputStream, extensionRegistryLite, generatedExtension, WireFormat.makeTag(i, 2), i);
}
private void mergeMessageSetExtensionFromBytes(ByteString byteString, ExtensionRegistryLite extensionRegistryLite, GeneratedExtension<?, ?> generatedExtension) throws IOException {
MessageLite messageLite = (MessageLite) this.extensions.getField(generatedExtension.descriptor);
MessageLite.Builder builder = messageLite != null ? messageLite.toBuilder() : null;
if (builder == null) {
builder = generatedExtension.getMessageDefaultInstance().newBuilderForType();
}
builder.mergeFrom(byteString, extensionRegistryLite);
ensureExtensionsAreMutable().setField(generatedExtension.descriptor, generatedExtension.singularToFieldSetType(builder.build()));
}
public FieldSet<ExtensionDescriptor> ensureExtensionsAreMutable() {
if (this.extensions.isImmutable()) {
this.extensions = this.extensions.m147clone();
}
return this.extensions;
}
private void verifyExtensionContainingType(GeneratedExtension<MessageType, ?> generatedExtension) {
if (generatedExtension.getContainingTypeDefaultInstance() != getDefaultInstanceForType()) {
throw new IllegalArgumentException("This extension is for a different message type. Please make sure that you are not suppressing any generics type warnings.");
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
public final <Type> boolean hasExtension(ExtensionLite<MessageType, Type> extensionLite) {
GeneratedExtension<MessageType, ?> checkIsLite = GeneratedMessageLite.checkIsLite(extensionLite);
verifyExtensionContainingType(checkIsLite);
return this.extensions.hasField(checkIsLite.descriptor);
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
public final <Type> int getExtensionCount(ExtensionLite<MessageType, List<Type>> extensionLite) {
GeneratedExtension<MessageType, ?> checkIsLite = GeneratedMessageLite.checkIsLite(extensionLite);
verifyExtensionContainingType(checkIsLite);
return this.extensions.getRepeatedFieldCount(checkIsLite.descriptor);
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
public final <Type> Type getExtension(ExtensionLite<MessageType, Type> extensionLite) {
GeneratedExtension<MessageType, ?> checkIsLite = GeneratedMessageLite.checkIsLite(extensionLite);
verifyExtensionContainingType(checkIsLite);
Object field = this.extensions.getField(checkIsLite.descriptor);
if (field == null) {
return checkIsLite.defaultValue;
}
return (Type) checkIsLite.fromFieldSetType(field);
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
public final <Type> Type getExtension(ExtensionLite<MessageType, List<Type>> extensionLite, int i) {
GeneratedExtension<MessageType, ?> checkIsLite = GeneratedMessageLite.checkIsLite(extensionLite);
verifyExtensionContainingType(checkIsLite);
return (Type) checkIsLite.singularFromFieldSetType(this.extensions.getRepeatedField(checkIsLite.descriptor, i));
}
public boolean extensionsAreInitialized() {
return this.extensions.isInitialized();
}
public class ExtensionWriter {
private final Iterator<Map.Entry<ExtensionDescriptor, Object>> iter;
private final boolean messageSetWireFormat;
private Map.Entry<ExtensionDescriptor, Object> next;
public /* synthetic */ ExtensionWriter(ExtendableMessage extendableMessage, boolean z, AnonymousClass1 anonymousClass1) {
this(z);
}
private ExtensionWriter(boolean z) {
Iterator<Map.Entry<ExtensionDescriptor, Object>> it = ExtendableMessage.this.extensions.iterator();
this.iter = it;
if (it.hasNext()) {
this.next = it.next();
}
this.messageSetWireFormat = z;
}
public void writeUntil(int i, CodedOutputStream codedOutputStream) throws IOException {
while (true) {
Map.Entry<ExtensionDescriptor, Object> entry = this.next;
if (entry == null || entry.getKey().getNumber() >= i) {
return;
}
ExtensionDescriptor key = this.next.getKey();
if (this.messageSetWireFormat && key.getLiteJavaType() == WireFormat.JavaType.MESSAGE && !key.isRepeated()) {
codedOutputStream.writeMessageSetExtension(key.getNumber(), (MessageLite) this.next.getValue());
} else {
FieldSet.writeField(key, this.next.getValue(), codedOutputStream);
}
if (this.iter.hasNext()) {
this.next = this.iter.next();
} else {
this.next = null;
}
}
}
}
public ExtendableMessage<MessageType, BuilderType>.ExtensionWriter newExtensionWriter() {
return new ExtensionWriter(this, false, null);
}
public ExtendableMessage<MessageType, BuilderType>.ExtensionWriter newMessageSetExtensionWriter() {
return new ExtensionWriter(this, true, null);
}
public int extensionsSerializedSize() {
return this.extensions.getSerializedSize();
}
public int extensionsSerializedSizeAsMessageSet() {
return this.extensions.getMessageSetSerializedSize();
}
}
/* renamed from: androidx.datastore.preferences.protobuf.GeneratedMessageLite$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$JavaType;
static {
int[] iArr = new int[WireFormat.JavaType.values().length];
$SwitchMap$com$google$protobuf$WireFormat$JavaType = iArr;
try {
iArr[WireFormat.JavaType.MESSAGE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.ENUM.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
public static abstract class ExtendableBuilder<MessageType extends ExtendableMessage<MessageType, BuilderType>, BuilderType extends ExtendableBuilder<MessageType, BuilderType>> extends Builder<MessageType, BuilderType> implements ExtendableMessageOrBuilder<MessageType, BuilderType> {
public ExtendableBuilder(MessageType messagetype) {
super(messagetype);
}
public void internalSetExtensionSet(FieldSet<ExtensionDescriptor> fieldSet) {
copyOnWrite();
((ExtendableMessage) this.instance).extensions = fieldSet;
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.Builder
public void copyOnWrite() {
if (this.isBuilt) {
super.copyOnWrite();
MessageType messagetype = this.instance;
((ExtendableMessage) messagetype).extensions = ((ExtendableMessage) messagetype).extensions.m147clone();
}
}
private FieldSet<ExtensionDescriptor> ensureExtensionsAreMutable() {
FieldSet<ExtensionDescriptor> fieldSet = ((ExtendableMessage) this.instance).extensions;
if (!fieldSet.isImmutable()) {
return fieldSet;
}
FieldSet<ExtensionDescriptor> m147clone = fieldSet.m147clone();
((ExtendableMessage) this.instance).extensions = m147clone;
return m147clone;
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.Builder, androidx.datastore.preferences.protobuf.MessageLite.Builder
public final MessageType buildPartial() {
if (this.isBuilt) {
return (MessageType) this.instance;
}
((ExtendableMessage) this.instance).extensions.makeImmutable();
return (MessageType) super.buildPartial();
}
private void verifyExtensionContainingType(GeneratedExtension<MessageType, ?> generatedExtension) {
if (generatedExtension.getContainingTypeDefaultInstance() != getDefaultInstanceForType()) {
throw new IllegalArgumentException("This extension is for a different message type. Please make sure that you are not suppressing any generics type warnings.");
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
public final <Type> boolean hasExtension(ExtensionLite<MessageType, Type> extensionLite) {
return ((ExtendableMessage) this.instance).hasExtension(extensionLite);
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
public final <Type> int getExtensionCount(ExtensionLite<MessageType, List<Type>> extensionLite) {
return ((ExtendableMessage) this.instance).getExtensionCount(extensionLite);
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
public final <Type> Type getExtension(ExtensionLite<MessageType, Type> extensionLite) {
return (Type) ((ExtendableMessage) this.instance).getExtension(extensionLite);
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder
public final <Type> Type getExtension(ExtensionLite<MessageType, List<Type>> extensionLite, int i) {
return (Type) ((ExtendableMessage) this.instance).getExtension(extensionLite, i);
}
public final <Type> BuilderType setExtension(ExtensionLite<MessageType, Type> extensionLite, Type type) {
GeneratedExtension<MessageType, ?> checkIsLite = GeneratedMessageLite.checkIsLite(extensionLite);
verifyExtensionContainingType(checkIsLite);
copyOnWrite();
ensureExtensionsAreMutable().setField(checkIsLite.descriptor, checkIsLite.toFieldSetType(type));
return this;
}
public final <Type> BuilderType setExtension(ExtensionLite<MessageType, List<Type>> extensionLite, int i, Type type) {
GeneratedExtension<MessageType, ?> checkIsLite = GeneratedMessageLite.checkIsLite(extensionLite);
verifyExtensionContainingType(checkIsLite);
copyOnWrite();
ensureExtensionsAreMutable().setRepeatedField(checkIsLite.descriptor, i, checkIsLite.singularToFieldSetType(type));
return this;
}
public final <Type> BuilderType addExtension(ExtensionLite<MessageType, List<Type>> extensionLite, Type type) {
GeneratedExtension<MessageType, ?> checkIsLite = GeneratedMessageLite.checkIsLite(extensionLite);
verifyExtensionContainingType(checkIsLite);
copyOnWrite();
ensureExtensionsAreMutable().addRepeatedField(checkIsLite.descriptor, checkIsLite.singularToFieldSetType(type));
return this;
}
public final <Type> BuilderType clearExtension(ExtensionLite<MessageType, ?> extensionLite) {
GeneratedExtension<MessageType, ?> checkIsLite = GeneratedMessageLite.checkIsLite(extensionLite);
verifyExtensionContainingType(checkIsLite);
copyOnWrite();
ensureExtensionsAreMutable().clearField(checkIsLite.descriptor);
return this;
}
}
public static <ContainingType extends MessageLite, Type> GeneratedExtension<ContainingType, Type> newSingularGeneratedExtension(ContainingType containingtype, Type type, MessageLite messageLite, Internal.EnumLiteMap<?> enumLiteMap, int i, WireFormat.FieldType fieldType, Class cls) {
return new GeneratedExtension<>(containingtype, type, messageLite, new ExtensionDescriptor(enumLiteMap, i, fieldType, false, false), cls);
}
public static <ContainingType extends MessageLite, Type> GeneratedExtension<ContainingType, Type> newRepeatedGeneratedExtension(ContainingType containingtype, MessageLite messageLite, Internal.EnumLiteMap<?> enumLiteMap, int i, WireFormat.FieldType fieldType, boolean z, Class cls) {
return new GeneratedExtension<>(containingtype, Collections.emptyList(), messageLite, new ExtensionDescriptor(enumLiteMap, i, fieldType, true, z), cls);
}
public static final class ExtensionDescriptor implements FieldSet.FieldDescriptorLite<ExtensionDescriptor> {
final Internal.EnumLiteMap<?> enumTypeMap;
final boolean isPacked;
final boolean isRepeated;
final int number;
final WireFormat.FieldType type;
@Override // androidx.datastore.preferences.protobuf.FieldSet.FieldDescriptorLite
public Internal.EnumLiteMap<?> getEnumType() {
return this.enumTypeMap;
}
@Override // androidx.datastore.preferences.protobuf.FieldSet.FieldDescriptorLite
public WireFormat.FieldType getLiteType() {
return this.type;
}
@Override // androidx.datastore.preferences.protobuf.FieldSet.FieldDescriptorLite
public int getNumber() {
return this.number;
}
@Override // androidx.datastore.preferences.protobuf.FieldSet.FieldDescriptorLite
public boolean isPacked() {
return this.isPacked;
}
@Override // androidx.datastore.preferences.protobuf.FieldSet.FieldDescriptorLite
public boolean isRepeated() {
return this.isRepeated;
}
public ExtensionDescriptor(Internal.EnumLiteMap<?> enumLiteMap, int i, WireFormat.FieldType fieldType, boolean z, boolean z2) {
this.enumTypeMap = enumLiteMap;
this.number = i;
this.type = fieldType;
this.isRepeated = z;
this.isPacked = z2;
}
@Override // androidx.datastore.preferences.protobuf.FieldSet.FieldDescriptorLite
public WireFormat.JavaType getLiteJavaType() {
return this.type.getJavaType();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.datastore.preferences.protobuf.FieldSet.FieldDescriptorLite
public MessageLite.Builder internalMergeFrom(MessageLite.Builder builder, MessageLite messageLite) {
return ((Builder) builder).mergeFrom((Builder) messageLite);
}
@Override // java.lang.Comparable
public int compareTo(ExtensionDescriptor extensionDescriptor) {
return this.number - extensionDescriptor.number;
}
}
public static java.lang.reflect.Method getMethodOrDie(Class cls, String str, Class... clsArr) {
try {
return cls.getMethod(str, clsArr);
} catch (NoSuchMethodException e) {
throw new RuntimeException("Generated message class \"" + cls.getName() + "\" missing method \"" + str + "\".", e);
}
}
public static Object invokeOrDie(java.lang.reflect.Method method, Object obj, Object... objArr) {
try {
return method.invoke(obj, objArr);
} catch (IllegalAccessException e) {
throw new RuntimeException("Couldn't use Java reflection to implement protocol message reflection.", e);
} catch (InvocationTargetException e2) {
Throwable cause = e2.getCause();
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
if (cause instanceof Error) {
throw ((Error) cause);
}
throw new RuntimeException("Unexpected exception thrown by generated accessor method.", cause);
}
}
public static class GeneratedExtension<ContainingType extends MessageLite, Type> extends ExtensionLite<ContainingType, Type> {
final ContainingType containingTypeDefaultInstance;
final Type defaultValue;
final ExtensionDescriptor descriptor;
final MessageLite messageDefaultInstance;
public ContainingType getContainingTypeDefaultInstance() {
return this.containingTypeDefaultInstance;
}
@Override // androidx.datastore.preferences.protobuf.ExtensionLite
public Type getDefaultValue() {
return this.defaultValue;
}
@Override // androidx.datastore.preferences.protobuf.ExtensionLite
public MessageLite getMessageDefaultInstance() {
return this.messageDefaultInstance;
}
public GeneratedExtension(ContainingType containingtype, Type type, MessageLite messageLite, ExtensionDescriptor extensionDescriptor, Class cls) {
if (containingtype == null) {
throw new IllegalArgumentException("Null containingTypeDefaultInstance");
}
if (extensionDescriptor.getLiteType() == WireFormat.FieldType.MESSAGE && messageLite == null) {
throw new IllegalArgumentException("Null messageDefaultInstance");
}
this.containingTypeDefaultInstance = containingtype;
this.defaultValue = type;
this.messageDefaultInstance = messageLite;
this.descriptor = extensionDescriptor;
}
@Override // androidx.datastore.preferences.protobuf.ExtensionLite
public int getNumber() {
return this.descriptor.getNumber();
}
public Object fromFieldSetType(Object obj) {
if (this.descriptor.isRepeated()) {
if (this.descriptor.getLiteJavaType() != WireFormat.JavaType.ENUM) {
return obj;
}
ArrayList arrayList = new ArrayList();
Iterator it = ((List) obj).iterator();
while (it.hasNext()) {
arrayList.add(singularFromFieldSetType(it.next()));
}
return arrayList;
}
return singularFromFieldSetType(obj);
}
public Object singularFromFieldSetType(Object obj) {
return this.descriptor.getLiteJavaType() == WireFormat.JavaType.ENUM ? this.descriptor.enumTypeMap.findValueByNumber(((Integer) obj).intValue()) : obj;
}
public Object toFieldSetType(Object obj) {
if (this.descriptor.isRepeated()) {
if (this.descriptor.getLiteJavaType() != WireFormat.JavaType.ENUM) {
return obj;
}
ArrayList arrayList = new ArrayList();
Iterator it = ((List) obj).iterator();
while (it.hasNext()) {
arrayList.add(singularToFieldSetType(it.next()));
}
return arrayList;
}
return singularToFieldSetType(obj);
}
public Object singularToFieldSetType(Object obj) {
return this.descriptor.getLiteJavaType() == WireFormat.JavaType.ENUM ? Integer.valueOf(((Internal.EnumLite) obj).getNumber()) : obj;
}
@Override // androidx.datastore.preferences.protobuf.ExtensionLite
public WireFormat.FieldType getLiteType() {
return this.descriptor.getLiteType();
}
@Override // androidx.datastore.preferences.protobuf.ExtensionLite
public boolean isRepeated() {
return this.descriptor.isRepeated;
}
}
public static final class SerializedForm implements Serializable {
private static final long serialVersionUID = 0;
private final byte[] asBytes;
private final Class<?> messageClass;
private final String messageClassName;
public static SerializedForm of(MessageLite messageLite) {
return new SerializedForm(messageLite);
}
public SerializedForm(MessageLite messageLite) {
Class<?> cls = messageLite.getClass();
this.messageClass = cls;
this.messageClassName = cls.getName();
this.asBytes = messageLite.toByteArray();
}
public Object readResolve() throws ObjectStreamException {
try {
java.lang.reflect.Field declaredField = resolveMessageClass().getDeclaredField("DEFAULT_INSTANCE");
declaredField.setAccessible(true);
return ((MessageLite) declaredField.get(null)).newBuilderForType().mergeFrom(this.asBytes).buildPartial();
} catch (InvalidProtocolBufferException e) {
throw new RuntimeException("Unable to understand proto buffer", e);
} catch (ClassNotFoundException e2) {
throw new RuntimeException("Unable to find proto buffer class: " + this.messageClassName, e2);
} catch (IllegalAccessException e3) {
throw new RuntimeException("Unable to call parsePartialFrom", e3);
} catch (NoSuchFieldException unused) {
return readResolveFallback();
} catch (SecurityException e4) {
throw new RuntimeException("Unable to call DEFAULT_INSTANCE in " + this.messageClassName, e4);
}
}
@Deprecated
private Object readResolveFallback() throws ObjectStreamException {
try {
java.lang.reflect.Field declaredField = resolveMessageClass().getDeclaredField("defaultInstance");
declaredField.setAccessible(true);
return ((MessageLite) declaredField.get(null)).newBuilderForType().mergeFrom(this.asBytes).buildPartial();
} catch (InvalidProtocolBufferException e) {
throw new RuntimeException("Unable to understand proto buffer", e);
} catch (ClassNotFoundException e2) {
throw new RuntimeException("Unable to find proto buffer class: " + this.messageClassName, e2);
} catch (IllegalAccessException e3) {
throw new RuntimeException("Unable to call parsePartialFrom", e3);
} catch (NoSuchFieldException e4) {
throw new RuntimeException("Unable to find defaultInstance in " + this.messageClassName, e4);
} catch (SecurityException e5) {
throw new RuntimeException("Unable to call defaultInstance in " + this.messageClassName, e5);
}
}
private Class<?> resolveMessageClass() throws ClassNotFoundException {
Class<?> cls = this.messageClass;
return cls != null ? cls : Class.forName(this.messageClassName);
}
}
/* JADX INFO: Access modifiers changed from: private */
public static <MessageType extends ExtendableMessage<MessageType, BuilderType>, BuilderType extends ExtendableBuilder<MessageType, BuilderType>, T> GeneratedExtension<MessageType, T> checkIsLite(ExtensionLite<MessageType, T> extensionLite) {
if (!extensionLite.isLite()) {
throw new IllegalArgumentException("Expected a lite extension.");
}
return (GeneratedExtension) extensionLite;
}
public static final <T extends GeneratedMessageLite<T, ?>> boolean isInitialized(T t, boolean z) {
byte byteValue = ((Byte) t.dynamicMethod(MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED)).byteValue();
if (byteValue == 1) {
return true;
}
if (byteValue == 0) {
return false;
}
boolean isInitialized = Protobuf.getInstance().schemaFor((Protobuf) t).isInitialized(t);
if (z) {
t.dynamicMethod(MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED, isInitialized ? t : null);
}
return isInitialized;
}
public static Internal.IntList emptyIntList() {
return IntArrayList.emptyList();
}
/* JADX WARN: Type inference failed for: r1v1, types: [androidx.datastore.preferences.protobuf.Internal$IntList] */
public static Internal.IntList mutableCopy(Internal.IntList intList) {
int size = intList.size();
return intList.mutableCopyWithCapacity2(size == 0 ? 10 : size * 2);
}
public static Internal.LongList emptyLongList() {
return LongArrayList.emptyList();
}
/* JADX WARN: Type inference failed for: r1v1, types: [androidx.datastore.preferences.protobuf.Internal$LongList] */
public static Internal.LongList mutableCopy(Internal.LongList longList) {
int size = longList.size();
return longList.mutableCopyWithCapacity2(size == 0 ? 10 : size * 2);
}
public static Internal.FloatList emptyFloatList() {
return FloatArrayList.emptyList();
}
/* JADX WARN: Type inference failed for: r1v1, types: [androidx.datastore.preferences.protobuf.Internal$FloatList] */
public static Internal.FloatList mutableCopy(Internal.FloatList floatList) {
int size = floatList.size();
return floatList.mutableCopyWithCapacity2(size == 0 ? 10 : size * 2);
}
public static Internal.DoubleList emptyDoubleList() {
return DoubleArrayList.emptyList();
}
/* JADX WARN: Type inference failed for: r1v1, types: [androidx.datastore.preferences.protobuf.Internal$DoubleList] */
public static Internal.DoubleList mutableCopy(Internal.DoubleList doubleList) {
int size = doubleList.size();
return doubleList.mutableCopyWithCapacity2(size == 0 ? 10 : size * 2);
}
public static Internal.BooleanList emptyBooleanList() {
return BooleanArrayList.emptyList();
}
/* JADX WARN: Type inference failed for: r1v1, types: [androidx.datastore.preferences.protobuf.Internal$BooleanList] */
public static Internal.BooleanList mutableCopy(Internal.BooleanList booleanList) {
int size = booleanList.size();
return booleanList.mutableCopyWithCapacity2(size == 0 ? 10 : size * 2);
}
public static <E> Internal.ProtobufList<E> emptyProtobufList() {
return ProtobufArrayList.emptyList();
}
public static <E> Internal.ProtobufList<E> mutableCopy(Internal.ProtobufList<E> protobufList) {
int size = protobufList.size();
return protobufList.mutableCopyWithCapacity2(size == 0 ? 10 : size * 2);
}
public static class DefaultInstanceBasedParser<T extends GeneratedMessageLite<T, ?>> extends AbstractParser<T> {
private final T defaultInstance;
public DefaultInstanceBasedParser(T t) {
this.defaultInstance = t;
}
@Override // androidx.datastore.preferences.protobuf.Parser
public T parsePartialFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) GeneratedMessageLite.parsePartialFrom(this.defaultInstance, codedInputStream, extensionRegistryLite);
}
@Override // androidx.datastore.preferences.protobuf.AbstractParser, androidx.datastore.preferences.protobuf.Parser
public T parsePartialFrom(byte[] bArr, int i, int i2, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) GeneratedMessageLite.parsePartialFrom(this.defaultInstance, bArr, i, i2, extensionRegistryLite);
}
}
public static <T extends GeneratedMessageLite<T, ?>> T parsePartialFrom(T t, CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
T t2 = (T) t.dynamicMethod(MethodToInvoke.NEW_MUTABLE_INSTANCE);
try {
Schema schemaFor = Protobuf.getInstance().schemaFor((Protobuf) t2);
schemaFor.mergeFrom(t2, CodedInputStreamReader.forCodedInput(codedInputStream), extensionRegistryLite);
schemaFor.makeImmutable(t2);
return t2;
} catch (IOException e) {
if (e.getCause() instanceof InvalidProtocolBufferException) {
throw ((InvalidProtocolBufferException) e.getCause());
}
throw new InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(t2);
} catch (RuntimeException e2) {
if (e2.getCause() instanceof InvalidProtocolBufferException) {
throw ((InvalidProtocolBufferException) e2.getCause());
}
throw e2;
}
}
public static <T extends GeneratedMessageLite<T, ?>> T parsePartialFrom(T t, byte[] bArr, int i, int i2, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
T t2 = (T) t.dynamicMethod(MethodToInvoke.NEW_MUTABLE_INSTANCE);
try {
Schema schemaFor = Protobuf.getInstance().schemaFor((Protobuf) t2);
schemaFor.mergeFrom(t2, bArr, i, i + i2, new ArrayDecoders.Registers(extensionRegistryLite));
schemaFor.makeImmutable(t2);
if (t2.memoizedHashCode == 0) {
return t2;
}
throw new RuntimeException();
} catch (IOException e) {
if (e.getCause() instanceof InvalidProtocolBufferException) {
throw ((InvalidProtocolBufferException) e.getCause());
}
throw new InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(t2);
} catch (IndexOutOfBoundsException unused) {
throw InvalidProtocolBufferException.truncatedMessage().setUnfinishedMessage(t2);
}
}
public static <T extends GeneratedMessageLite<T, ?>> T parsePartialFrom(T t, CodedInputStream codedInputStream) throws InvalidProtocolBufferException {
return (T) parsePartialFrom(t, codedInputStream, ExtensionRegistryLite.getEmptyRegistry());
}
private static <T extends GeneratedMessageLite<T, ?>> T checkMessageInitialized(T t) throws InvalidProtocolBufferException {
if (t == null || t.isInitialized()) {
return t;
}
throw t.newUninitializedMessageException().asInvalidProtocolBufferException().setUnfinishedMessage(t);
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parseFrom(t, CodedInputStream.newInstance(byteBuffer), extensionRegistryLite));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (T) parseFrom(t, byteBuffer, ExtensionRegistryLite.getEmptyRegistry());
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, ByteString byteString) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parseFrom(t, byteString, ExtensionRegistryLite.getEmptyRegistry()));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialFrom(t, byteString, extensionRegistryLite));
}
private static <T extends GeneratedMessageLite<T, ?>> T parsePartialFrom(T t, ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
CodedInputStream newCodedInput = byteString.newCodedInput();
T t2 = (T) parsePartialFrom(t, newCodedInput, extensionRegistryLite);
try {
newCodedInput.checkLastTagWas(0);
return t2;
} catch (InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(t2);
}
}
private static <T extends GeneratedMessageLite<T, ?>> T parsePartialFrom(T t, byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialFrom(t, bArr, 0, bArr.length, extensionRegistryLite));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, byte[] bArr) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialFrom(t, bArr, 0, bArr.length, ExtensionRegistryLite.getEmptyRegistry()));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialFrom(t, bArr, 0, bArr.length, extensionRegistryLite));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, InputStream inputStream) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialFrom(t, CodedInputStream.newInstance(inputStream), ExtensionRegistryLite.getEmptyRegistry()));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialFrom(t, CodedInputStream.newInstance(inputStream), extensionRegistryLite));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, CodedInputStream codedInputStream) throws InvalidProtocolBufferException {
return (T) parseFrom(t, codedInputStream, ExtensionRegistryLite.getEmptyRegistry());
}
public static <T extends GeneratedMessageLite<T, ?>> T parseFrom(T t, CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialFrom(t, codedInputStream, extensionRegistryLite));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseDelimitedFrom(T t, InputStream inputStream) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialDelimitedFrom(t, inputStream, ExtensionRegistryLite.getEmptyRegistry()));
}
public static <T extends GeneratedMessageLite<T, ?>> T parseDelimitedFrom(T t, InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (T) checkMessageInitialized(parsePartialDelimitedFrom(t, inputStream, extensionRegistryLite));
}
private static <T extends GeneratedMessageLite<T, ?>> T parsePartialDelimitedFrom(T t, InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
try {
int read = inputStream.read();
if (read == -1) {
return null;
}
CodedInputStream newInstance = CodedInputStream.newInstance(new AbstractMessageLite.Builder.LimitedInputStream(inputStream, CodedInputStream.readRawVarint32(read, inputStream)));
T t2 = (T) parsePartialFrom(t, newInstance, extensionRegistryLite);
try {
newInstance.checkLastTagWas(0);
return t2;
} catch (InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(t2);
}
} catch (IOException e2) {
throw new InvalidProtocolBufferException(e2.getMessage());
}
}
}