- 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
333 lines
14 KiB
Java
333 lines
14 KiB
Java
package androidx.datastore.preferences.protobuf;
|
|
|
|
import androidx.datastore.preferences.protobuf.AbstractMessageLite;
|
|
import androidx.datastore.preferences.protobuf.AbstractMessageLite.Builder;
|
|
import androidx.datastore.preferences.protobuf.ByteString;
|
|
import androidx.datastore.preferences.protobuf.MessageLite;
|
|
import java.io.FilterInputStream;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.OutputStream;
|
|
import java.util.ArrayList;
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class AbstractMessageLite<MessageType extends AbstractMessageLite<MessageType, BuilderType>, BuilderType extends Builder<MessageType, BuilderType>> implements MessageLite {
|
|
protected int memoizedHashCode = 0;
|
|
|
|
public interface InternalOneOfEnum {
|
|
int getNumber();
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite
|
|
public ByteString toByteString() {
|
|
try {
|
|
ByteString.CodedBuilder newCodedBuilder = ByteString.newCodedBuilder(getSerializedSize());
|
|
writeTo(newCodedBuilder.getCodedOutput());
|
|
return newCodedBuilder.build();
|
|
} catch (IOException e) {
|
|
throw new RuntimeException(getSerializingExceptionMessage("ByteString"), e);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite
|
|
public byte[] toByteArray() {
|
|
try {
|
|
byte[] bArr = new byte[getSerializedSize()];
|
|
CodedOutputStream newInstance = CodedOutputStream.newInstance(bArr);
|
|
writeTo(newInstance);
|
|
newInstance.checkNoSpaceLeft();
|
|
return bArr;
|
|
} catch (IOException e) {
|
|
throw new RuntimeException(getSerializingExceptionMessage("byte array"), e);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite
|
|
public void writeTo(OutputStream outputStream) throws IOException {
|
|
CodedOutputStream newInstance = CodedOutputStream.newInstance(outputStream, CodedOutputStream.computePreferredBufferSize(getSerializedSize()));
|
|
writeTo(newInstance);
|
|
newInstance.flush();
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite
|
|
public void writeDelimitedTo(OutputStream outputStream) throws IOException {
|
|
int serializedSize = getSerializedSize();
|
|
CodedOutputStream newInstance = CodedOutputStream.newInstance(outputStream, CodedOutputStream.computePreferredBufferSize(CodedOutputStream.computeRawVarint32Size(serializedSize) + serializedSize));
|
|
newInstance.writeRawVarint32(serializedSize);
|
|
writeTo(newInstance);
|
|
newInstance.flush();
|
|
}
|
|
|
|
public int getMemoizedSerializedSize() {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public void setMemoizedSerializedSize(int i) {
|
|
throw new UnsupportedOperationException();
|
|
}
|
|
|
|
public int getSerializedSize(Schema schema) {
|
|
int memoizedSerializedSize = getMemoizedSerializedSize();
|
|
if (memoizedSerializedSize != -1) {
|
|
return memoizedSerializedSize;
|
|
}
|
|
int serializedSize = schema.getSerializedSize(this);
|
|
setMemoizedSerializedSize(serializedSize);
|
|
return serializedSize;
|
|
}
|
|
|
|
public UninitializedMessageException newUninitializedMessageException() {
|
|
return new UninitializedMessageException(this);
|
|
}
|
|
|
|
private String getSerializingExceptionMessage(String str) {
|
|
return "Serializing " + getClass().getName() + " to a " + str + " threw an IOException (should never happen).";
|
|
}
|
|
|
|
public static void checkByteStringIsUtf8(ByteString byteString) throws IllegalArgumentException {
|
|
if (!byteString.isValidUtf8()) {
|
|
throw new IllegalArgumentException("Byte string is not UTF-8.");
|
|
}
|
|
}
|
|
|
|
@Deprecated
|
|
public static <T> void addAll(Iterable<T> iterable, Collection<? super T> collection) {
|
|
Builder.addAll((Iterable) iterable, (List) collection);
|
|
}
|
|
|
|
public static <T> void addAll(Iterable<T> iterable, List<? super T> list) {
|
|
Builder.addAll((Iterable) iterable, (List) list);
|
|
}
|
|
|
|
public static abstract class Builder<MessageType extends AbstractMessageLite<MessageType, BuilderType>, BuilderType extends Builder<MessageType, BuilderType>> implements MessageLite.Builder {
|
|
@Override //
|
|
/* renamed from: clone */
|
|
public abstract BuilderType mo146clone();
|
|
|
|
public abstract BuilderType internalMergeFrom(MessageType messagetype);
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public abstract BuilderType mergeFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException;
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(CodedInputStream codedInputStream) throws IOException {
|
|
return mergeFrom(codedInputStream, ExtensionRegistryLite.getEmptyRegistry());
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(ByteString byteString) throws InvalidProtocolBufferException {
|
|
try {
|
|
CodedInputStream newCodedInput = byteString.newCodedInput();
|
|
mergeFrom(newCodedInput);
|
|
newCodedInput.checkLastTagWas(0);
|
|
return this;
|
|
} catch (InvalidProtocolBufferException e) {
|
|
throw e;
|
|
} catch (IOException e2) {
|
|
throw new RuntimeException(getReadingExceptionMessage("ByteString"), e2);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
|
try {
|
|
CodedInputStream newCodedInput = byteString.newCodedInput();
|
|
mergeFrom(newCodedInput, extensionRegistryLite);
|
|
newCodedInput.checkLastTagWas(0);
|
|
return this;
|
|
} catch (InvalidProtocolBufferException e) {
|
|
throw e;
|
|
} catch (IOException e2) {
|
|
throw new RuntimeException(getReadingExceptionMessage("ByteString"), e2);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(byte[] bArr) throws InvalidProtocolBufferException {
|
|
return mergeFrom(bArr, 0, bArr.length);
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(byte[] bArr, int i, int i2) throws InvalidProtocolBufferException {
|
|
try {
|
|
CodedInputStream newInstance = CodedInputStream.newInstance(bArr, i, i2);
|
|
mergeFrom(newInstance);
|
|
newInstance.checkLastTagWas(0);
|
|
return this;
|
|
} catch (InvalidProtocolBufferException e) {
|
|
throw e;
|
|
} catch (IOException e2) {
|
|
throw new RuntimeException(getReadingExceptionMessage("byte array"), e2);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
|
return mergeFrom(bArr, 0, bArr.length, extensionRegistryLite);
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(byte[] bArr, int i, int i2, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
|
try {
|
|
CodedInputStream newInstance = CodedInputStream.newInstance(bArr, i, i2);
|
|
mergeFrom(newInstance, extensionRegistryLite);
|
|
newInstance.checkLastTagWas(0);
|
|
return this;
|
|
} catch (InvalidProtocolBufferException e) {
|
|
throw e;
|
|
} catch (IOException e2) {
|
|
throw new RuntimeException(getReadingExceptionMessage("byte array"), e2);
|
|
}
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(InputStream inputStream) throws IOException {
|
|
CodedInputStream newInstance = CodedInputStream.newInstance(inputStream);
|
|
mergeFrom(newInstance);
|
|
newInstance.checkLastTagWas(0);
|
|
return this;
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
|
|
CodedInputStream newInstance = CodedInputStream.newInstance(inputStream);
|
|
mergeFrom(newInstance, extensionRegistryLite);
|
|
newInstance.checkLastTagWas(0);
|
|
return this;
|
|
}
|
|
|
|
public static final class LimitedInputStream extends FilterInputStream {
|
|
private int limit;
|
|
|
|
public LimitedInputStream(InputStream inputStream, int i) {
|
|
super(inputStream);
|
|
this.limit = i;
|
|
}
|
|
|
|
@Override // java.io.FilterInputStream, java.io.InputStream
|
|
public int available() throws IOException {
|
|
return Math.min(super.available(), this.limit);
|
|
}
|
|
|
|
@Override // java.io.FilterInputStream, java.io.InputStream
|
|
public int read() throws IOException {
|
|
if (this.limit <= 0) {
|
|
return -1;
|
|
}
|
|
int read = super.read();
|
|
if (read >= 0) {
|
|
this.limit--;
|
|
}
|
|
return read;
|
|
}
|
|
|
|
@Override // java.io.FilterInputStream, java.io.InputStream
|
|
public int read(byte[] bArr, int i, int i2) throws IOException {
|
|
int i3 = this.limit;
|
|
if (i3 <= 0) {
|
|
return -1;
|
|
}
|
|
int read = super.read(bArr, i, Math.min(i2, i3));
|
|
if (read >= 0) {
|
|
this.limit -= read;
|
|
}
|
|
return read;
|
|
}
|
|
|
|
@Override // java.io.FilterInputStream, java.io.InputStream
|
|
public long skip(long j) throws IOException {
|
|
long skip = super.skip(Math.min(j, this.limit));
|
|
if (skip >= 0) {
|
|
this.limit = (int) (this.limit - skip);
|
|
}
|
|
return skip;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public boolean mergeDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
|
|
int read = inputStream.read();
|
|
if (read == -1) {
|
|
return false;
|
|
}
|
|
mergeFrom((InputStream) new LimitedInputStream(inputStream, CodedInputStream.readRawVarint32(read, inputStream)), extensionRegistryLite);
|
|
return true;
|
|
}
|
|
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public boolean mergeDelimitedFrom(InputStream inputStream) throws IOException {
|
|
return mergeDelimitedFrom(inputStream, ExtensionRegistryLite.getEmptyRegistry());
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // androidx.datastore.preferences.protobuf.MessageLite.Builder
|
|
public BuilderType mergeFrom(MessageLite messageLite) {
|
|
if (!getDefaultInstanceForType().getClass().isInstance(messageLite)) {
|
|
throw new IllegalArgumentException("mergeFrom(MessageLite) can only merge messages of the same type.");
|
|
}
|
|
return (BuilderType) internalMergeFrom((AbstractMessageLite) messageLite);
|
|
}
|
|
|
|
private String getReadingExceptionMessage(String str) {
|
|
return "Reading " + getClass().getName() + " from a " + str + " threw an IOException (should never happen).";
|
|
}
|
|
|
|
private static <T> void addAllCheckingNulls(Iterable<T> iterable, List<? super T> list) {
|
|
if ((list instanceof ArrayList) && (iterable instanceof Collection)) {
|
|
((ArrayList) list).ensureCapacity(list.size() + ((Collection) iterable).size());
|
|
}
|
|
int size = list.size();
|
|
for (T t : iterable) {
|
|
if (t == null) {
|
|
String str = "Element at index " + (list.size() - size) + " is null.";
|
|
for (int size2 = list.size() - 1; size2 >= size; size2--) {
|
|
list.remove(size2);
|
|
}
|
|
throw new NullPointerException(str);
|
|
}
|
|
list.add(t);
|
|
}
|
|
}
|
|
|
|
public static UninitializedMessageException newUninitializedMessageException(MessageLite messageLite) {
|
|
return new UninitializedMessageException(messageLite);
|
|
}
|
|
|
|
@Deprecated
|
|
public static <T> void addAll(Iterable<T> iterable, Collection<? super T> collection) {
|
|
addAll((Iterable) iterable, (List) collection);
|
|
}
|
|
|
|
public static <T> void addAll(Iterable<T> iterable, List<? super T> list) {
|
|
Internal.checkNotNull(iterable);
|
|
if (iterable instanceof LazyStringList) {
|
|
List<?> underlyingElements = ((LazyStringList) iterable).getUnderlyingElements();
|
|
LazyStringList lazyStringList = (LazyStringList) list;
|
|
int size = list.size();
|
|
for (Object obj : underlyingElements) {
|
|
if (obj == null) {
|
|
String str = "Element at index " + (lazyStringList.size() - size) + " is null.";
|
|
for (int size2 = lazyStringList.size() - 1; size2 >= size; size2--) {
|
|
lazyStringList.remove(size2);
|
|
}
|
|
throw new NullPointerException(str);
|
|
}
|
|
if (obj instanceof ByteString) {
|
|
lazyStringList.add((ByteString) obj);
|
|
} else {
|
|
lazyStringList.add((LazyStringList) obj);
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
if (iterable instanceof PrimitiveNonBoxingCollection) {
|
|
list.addAll((Collection) iterable);
|
|
} else {
|
|
addAllCheckingNulls(iterable, list);
|
|
}
|
|
}
|
|
}
|
|
}
|