- 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
399 lines
14 KiB
Java
399 lines
14 KiB
Java
package com.google.protobuf;
|
|
|
|
import java.util.AbstractList;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.Collection;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
import java.util.RandomAccess;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class LazyStringArrayList extends AbstractProtobufList implements LazyStringList, RandomAccess {
|
|
public static final LazyStringList EMPTY;
|
|
private static final LazyStringArrayList EMPTY_LIST;
|
|
private final List<Object> list;
|
|
|
|
public static LazyStringArrayList emptyList() {
|
|
return EMPTY_LIST;
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public /* bridge */ /* synthetic */ boolean add(Object obj) {
|
|
return super.add(obj);
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
|
|
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
|
|
return super.equals(obj);
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
|
|
public /* bridge */ /* synthetic */ int hashCode() {
|
|
return super.hashCode();
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, com.google.protobuf.Internal.ProtobufList
|
|
public /* bridge */ /* synthetic */ boolean isModifiable() {
|
|
return super.isModifiable();
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public /* bridge */ /* synthetic */ boolean remove(Object obj) {
|
|
return super.remove(obj);
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public /* bridge */ /* synthetic */ boolean removeAll(Collection collection) {
|
|
return super.removeAll(collection);
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public /* bridge */ /* synthetic */ boolean retainAll(Collection collection) {
|
|
return super.retainAll(collection);
|
|
}
|
|
|
|
static {
|
|
LazyStringArrayList lazyStringArrayList = new LazyStringArrayList();
|
|
EMPTY_LIST = lazyStringArrayList;
|
|
lazyStringArrayList.makeImmutable();
|
|
EMPTY = lazyStringArrayList;
|
|
}
|
|
|
|
public LazyStringArrayList() {
|
|
this(10);
|
|
}
|
|
|
|
public LazyStringArrayList(int i) {
|
|
this((ArrayList<Object>) new ArrayList(i));
|
|
}
|
|
|
|
public LazyStringArrayList(LazyStringList lazyStringList) {
|
|
this.list = new ArrayList(lazyStringList.size());
|
|
addAll(lazyStringList);
|
|
}
|
|
|
|
public LazyStringArrayList(List<String> list) {
|
|
this((ArrayList<Object>) new ArrayList(list));
|
|
}
|
|
|
|
private LazyStringArrayList(ArrayList<Object> arrayList) {
|
|
this.list = arrayList;
|
|
}
|
|
|
|
@Override // com.google.protobuf.Internal.ProtobufList, com.google.protobuf.Internal.BooleanList
|
|
/* renamed from: mutableCopyWithCapacity */
|
|
public LazyStringArrayList mutableCopyWithCapacity2(int i) {
|
|
if (i < size()) {
|
|
throw new IllegalArgumentException();
|
|
}
|
|
ArrayList arrayList = new ArrayList(i);
|
|
arrayList.addAll(this.list);
|
|
return new LazyStringArrayList((ArrayList<Object>) arrayList);
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public String get(int i) {
|
|
Object obj = this.list.get(i);
|
|
if (obj instanceof String) {
|
|
return (String) obj;
|
|
}
|
|
if (obj instanceof ByteString) {
|
|
ByteString byteString = (ByteString) obj;
|
|
String stringUtf8 = byteString.toStringUtf8();
|
|
if (byteString.isValidUtf8()) {
|
|
this.list.set(i, stringUtf8);
|
|
}
|
|
return stringUtf8;
|
|
}
|
|
byte[] bArr = (byte[]) obj;
|
|
String stringUtf82 = Internal.toStringUtf8(bArr);
|
|
if (Internal.isValidUtf8(bArr)) {
|
|
this.list.set(i, stringUtf82);
|
|
}
|
|
return stringUtf82;
|
|
}
|
|
|
|
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public int size() {
|
|
return this.list.size();
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
|
|
public String set(int i, String str) {
|
|
ensureIsMutable();
|
|
return asString(this.list.set(i, str));
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
|
|
public void add(int i, String str) {
|
|
ensureIsMutable();
|
|
this.list.add(i, str);
|
|
((AbstractList) this).modCount++;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void add(int i, ByteString byteString) {
|
|
ensureIsMutable();
|
|
this.list.add(i, byteString);
|
|
((AbstractList) this).modCount++;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public void add(int i, byte[] bArr) {
|
|
ensureIsMutable();
|
|
this.list.add(i, bArr);
|
|
((AbstractList) this).modCount++;
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public boolean addAll(Collection<? extends String> collection) {
|
|
return addAll(size(), collection);
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
|
|
public boolean addAll(int i, Collection<? extends String> collection) {
|
|
ensureIsMutable();
|
|
if (collection instanceof LazyStringList) {
|
|
collection = ((LazyStringList) collection).getUnderlyingElements();
|
|
}
|
|
boolean addAll = this.list.addAll(i, collection);
|
|
((AbstractList) this).modCount++;
|
|
return addAll;
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public boolean addAllByteString(Collection<? extends ByteString> collection) {
|
|
ensureIsMutable();
|
|
boolean addAll = this.list.addAll(collection);
|
|
((AbstractList) this).modCount++;
|
|
return addAll;
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public boolean addAllByteArray(Collection<byte[]> collection) {
|
|
ensureIsMutable();
|
|
boolean addAll = this.list.addAll(collection);
|
|
((AbstractList) this).modCount++;
|
|
return addAll;
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
|
|
public String remove(int i) {
|
|
ensureIsMutable();
|
|
Object remove = this.list.remove(i);
|
|
((AbstractList) this).modCount++;
|
|
return asString(remove);
|
|
}
|
|
|
|
@Override // com.google.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public void clear() {
|
|
ensureIsMutable();
|
|
this.list.clear();
|
|
((AbstractList) this).modCount++;
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public void add(ByteString byteString) {
|
|
ensureIsMutable();
|
|
this.list.add(byteString);
|
|
((AbstractList) this).modCount++;
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public void add(byte[] bArr) {
|
|
ensureIsMutable();
|
|
this.list.add(bArr);
|
|
((AbstractList) this).modCount++;
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public Object getRaw(int i) {
|
|
return this.list.get(i);
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public ByteString getByteString(int i) {
|
|
Object obj = this.list.get(i);
|
|
ByteString asByteString = asByteString(obj);
|
|
if (asByteString != obj) {
|
|
this.list.set(i, asByteString);
|
|
}
|
|
return asByteString;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public byte[] getByteArray(int i) {
|
|
Object obj = this.list.get(i);
|
|
byte[] asByteArray = asByteArray(obj);
|
|
if (asByteArray != obj) {
|
|
this.list.set(i, asByteArray);
|
|
}
|
|
return asByteArray;
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public void set(int i, ByteString byteString) {
|
|
setAndReturn(i, byteString);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public Object setAndReturn(int i, ByteString byteString) {
|
|
ensureIsMutable();
|
|
return this.list.set(i, byteString);
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public void set(int i, byte[] bArr) {
|
|
setAndReturn(i, bArr);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public Object setAndReturn(int i, byte[] bArr) {
|
|
ensureIsMutable();
|
|
return this.list.set(i, bArr);
|
|
}
|
|
|
|
private static String asString(Object obj) {
|
|
if (obj instanceof String) {
|
|
return (String) obj;
|
|
}
|
|
if (obj instanceof ByteString) {
|
|
return ((ByteString) obj).toStringUtf8();
|
|
}
|
|
return Internal.toStringUtf8((byte[]) obj);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static ByteString asByteString(Object obj) {
|
|
if (obj instanceof ByteString) {
|
|
return (ByteString) obj;
|
|
}
|
|
if (obj instanceof String) {
|
|
return ByteString.copyFromUtf8((String) obj);
|
|
}
|
|
return ByteString.copyFrom((byte[]) obj);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static byte[] asByteArray(Object obj) {
|
|
if (obj instanceof byte[]) {
|
|
return (byte[]) obj;
|
|
}
|
|
if (obj instanceof String) {
|
|
return Internal.toByteArray((String) obj);
|
|
}
|
|
return ((ByteString) obj).toByteArray();
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public List<?> getUnderlyingElements() {
|
|
return Collections.unmodifiableList(this.list);
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public void mergeFrom(LazyStringList lazyStringList) {
|
|
ensureIsMutable();
|
|
for (Object obj : lazyStringList.getUnderlyingElements()) {
|
|
if (obj instanceof byte[]) {
|
|
byte[] bArr = (byte[]) obj;
|
|
this.list.add(Arrays.copyOf(bArr, bArr.length));
|
|
} else {
|
|
this.list.add(obj);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static class ByteArrayListView extends AbstractList implements RandomAccess {
|
|
private final LazyStringArrayList list;
|
|
|
|
public ByteArrayListView(LazyStringArrayList lazyStringArrayList) {
|
|
this.list = lazyStringArrayList;
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public byte[] get(int i) {
|
|
return this.list.getByteArray(i);
|
|
}
|
|
|
|
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public int size() {
|
|
return this.list.size();
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public byte[] set(int i, byte[] bArr) {
|
|
Object andReturn = this.list.setAndReturn(i, bArr);
|
|
((AbstractList) this).modCount++;
|
|
return LazyStringArrayList.asByteArray(andReturn);
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public void add(int i, byte[] bArr) {
|
|
this.list.add(i, bArr);
|
|
((AbstractList) this).modCount++;
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public byte[] remove(int i) {
|
|
String remove = this.list.remove(i);
|
|
((AbstractList) this).modCount++;
|
|
return LazyStringArrayList.asByteArray(remove);
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public List<byte[]> asByteArrayList() {
|
|
return new ByteArrayListView(this);
|
|
}
|
|
|
|
public static class ByteStringListView extends AbstractList implements RandomAccess {
|
|
private final LazyStringArrayList list;
|
|
|
|
public ByteStringListView(LazyStringArrayList lazyStringArrayList) {
|
|
this.list = lazyStringArrayList;
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public ByteString get(int i) {
|
|
return this.list.getByteString(i);
|
|
}
|
|
|
|
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
|
|
public int size() {
|
|
return this.list.size();
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public ByteString set(int i, ByteString byteString) {
|
|
Object andReturn = this.list.setAndReturn(i, byteString);
|
|
((AbstractList) this).modCount++;
|
|
return LazyStringArrayList.asByteString(andReturn);
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public void add(int i, ByteString byteString) {
|
|
this.list.add(i, byteString);
|
|
((AbstractList) this).modCount++;
|
|
}
|
|
|
|
@Override // java.util.AbstractList, java.util.List
|
|
public ByteString remove(int i) {
|
|
String remove = this.list.remove(i);
|
|
((AbstractList) this).modCount++;
|
|
return LazyStringArrayList.asByteString(remove);
|
|
}
|
|
}
|
|
|
|
@Override // com.google.protobuf.ProtocolStringList
|
|
public List<ByteString> asByteStringList() {
|
|
return new ByteStringListView(this);
|
|
}
|
|
|
|
@Override // com.google.protobuf.LazyStringList
|
|
public LazyStringList getUnmodifiableView() {
|
|
return isModifiable() ? new UnmodifiableLazyStringList(this) : this;
|
|
}
|
|
}
|