Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
package androidx.datastore.preferences;
import android.content.Context;
import androidx.datastore.core.DataMigration;
import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler;
import androidx.datastore.preferences.core.Preferences;
import java.util.List;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.properties.ReadOnlyProperty;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.Dispatchers;
import kotlinx.coroutines.SupervisorKt;
/* loaded from: classes.dex */
public final class PreferenceDataStoreDelegateKt {
public static /* synthetic */ ReadOnlyProperty preferencesDataStore$default(String str, ReplaceFileCorruptionHandler replaceFileCorruptionHandler, Function1 function1, CoroutineScope coroutineScope, int i, Object obj) {
if ((i & 2) != 0) {
replaceFileCorruptionHandler = null;
}
if ((i & 4) != 0) {
function1 = new Function1() { // from class: androidx.datastore.preferences.PreferenceDataStoreDelegateKt$preferencesDataStore$1
@Override // kotlin.jvm.functions.Function1
public final List<DataMigration<Preferences>> invoke(Context it) {
Intrinsics.checkNotNullParameter(it, "it");
return CollectionsKt__CollectionsKt.emptyList();
}
};
}
if ((i & 8) != 0) {
coroutineScope = CoroutineScopeKt.CoroutineScope(Dispatchers.getIO().plus(SupervisorKt.SupervisorJob$default(null, 1, null)));
}
return preferencesDataStore(str, replaceFileCorruptionHandler, function1, coroutineScope);
}
public static final ReadOnlyProperty preferencesDataStore(String name, ReplaceFileCorruptionHandler<Preferences> replaceFileCorruptionHandler, Function1 produceMigrations, CoroutineScope scope) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(produceMigrations, "produceMigrations");
Intrinsics.checkNotNullParameter(scope, "scope");
return new PreferenceDataStoreSingletonDelegate(name, replaceFileCorruptionHandler, produceMigrations, scope);
}
}

View File

@@ -0,0 +1,15 @@
package androidx.datastore.preferences;
import android.content.Context;
import androidx.datastore.DataStoreFile;
import java.io.File;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class PreferenceDataStoreFile {
public static final File preferencesDataStoreFile(Context context, String name) {
Intrinsics.checkNotNullParameter(context, "<this>");
Intrinsics.checkNotNullParameter(name, "name");
return DataStoreFile.dataStoreFile(context, Intrinsics.stringPlus(name, ".preferences_pb"));
}
}

View File

@@ -0,0 +1,81 @@
package androidx.datastore.preferences;
import android.content.Context;
import androidx.annotation.GuardedBy;
import androidx.datastore.core.DataStore;
import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler;
import androidx.datastore.preferences.core.PreferenceDataStoreFactory;
import androidx.datastore.preferences.core.Preferences;
import java.io.File;
import java.util.List;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.properties.ReadOnlyProperty;
import kotlin.reflect.KProperty;
import kotlinx.coroutines.CoroutineScope;
/* loaded from: classes.dex */
public final class PreferenceDataStoreSingletonDelegate implements ReadOnlyProperty {
@GuardedBy("lock")
private volatile DataStore<Preferences> INSTANCE;
private final ReplaceFileCorruptionHandler<Preferences> corruptionHandler;
private final Object lock;
private final String name;
private final Function1 produceMigrations;
private final CoroutineScope scope;
public PreferenceDataStoreSingletonDelegate(String name, ReplaceFileCorruptionHandler<Preferences> replaceFileCorruptionHandler, Function1 produceMigrations, CoroutineScope scope) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(produceMigrations, "produceMigrations");
Intrinsics.checkNotNullParameter(scope, "scope");
this.name = name;
this.corruptionHandler = replaceFileCorruptionHandler;
this.produceMigrations = produceMigrations;
this.scope = scope;
this.lock = new Object();
}
@Override // kotlin.properties.ReadOnlyProperty
public DataStore<Preferences> getValue(Context thisRef, KProperty property) {
DataStore<Preferences> dataStore;
Intrinsics.checkNotNullParameter(thisRef, "thisRef");
Intrinsics.checkNotNullParameter(property, "property");
DataStore<Preferences> dataStore2 = this.INSTANCE;
if (dataStore2 != null) {
return dataStore2;
}
synchronized (this.lock) {
try {
if (this.INSTANCE == null) {
final Context applicationContext = thisRef.getApplicationContext();
PreferenceDataStoreFactory preferenceDataStoreFactory = PreferenceDataStoreFactory.INSTANCE;
ReplaceFileCorruptionHandler<Preferences> replaceFileCorruptionHandler = this.corruptionHandler;
Function1 function1 = this.produceMigrations;
Intrinsics.checkNotNullExpressionValue(applicationContext, "applicationContext");
this.INSTANCE = preferenceDataStoreFactory.create(replaceFileCorruptionHandler, (List) function1.invoke(applicationContext), this.scope, new Function0() { // from class: androidx.datastore.preferences.PreferenceDataStoreSingletonDelegate$getValue$1$1
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final File invoke() {
String str;
Context applicationContext2 = applicationContext;
Intrinsics.checkNotNullExpressionValue(applicationContext2, "applicationContext");
str = this.name;
return PreferenceDataStoreFile.preferencesDataStoreFile(applicationContext2, str);
}
});
}
dataStore = this.INSTANCE;
Intrinsics.checkNotNull(dataStore);
} catch (Throwable th) {
throw th;
}
}
return dataStore;
}
}

View File

@@ -0,0 +1,33 @@
package androidx.datastore.preferences;
import androidx.datastore.core.CorruptionException;
import androidx.datastore.preferences.PreferencesProto;
import androidx.datastore.preferences.protobuf.InvalidProtocolBufferException;
import java.io.InputStream;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class PreferencesMapCompat {
public static final Companion Companion = new Companion(null);
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final PreferencesProto.PreferenceMap readFrom(InputStream input) {
Intrinsics.checkNotNullParameter(input, "input");
try {
PreferencesProto.PreferenceMap parseFrom = PreferencesProto.PreferenceMap.parseFrom(input);
Intrinsics.checkNotNullExpressionValue(parseFrom, "{\n PreferencesProto.PreferenceMap.parseFrom(input)\n }");
return parseFrom;
} catch (InvalidProtocolBufferException e) {
throw new CorruptionException("Unable to parse preferences proto.", e);
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
package androidx.datastore.preferences;
/* loaded from: classes.dex */
public final class R {
private R() {
}
}

View File

@@ -0,0 +1,90 @@
package androidx.datastore.preferences;
import androidx.datastore.migrations.SharedPreferencesView;
import androidx.datastore.preferences.core.MutablePreferences;
import androidx.datastore.preferences.core.Preferences;
import androidx.datastore.preferences.core.PreferencesKeys;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function3;
@DebugMetadata(c = "androidx.datastore.preferences.SharedPreferencesMigrationKt$getMigrationFunction$1", f = "SharedPreferencesMigration.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes.dex */
public final class SharedPreferencesMigrationKt$getMigrationFunction$1 extends SuspendLambda implements Function3 {
/* synthetic */ Object L$0;
/* synthetic */ Object L$1;
int label;
public SharedPreferencesMigrationKt$getMigrationFunction$1(Continuation continuation) {
super(3, continuation);
}
@Override // kotlin.jvm.functions.Function3
public final Object invoke(SharedPreferencesView sharedPreferencesView, Preferences preferences, Continuation continuation) {
SharedPreferencesMigrationKt$getMigrationFunction$1 sharedPreferencesMigrationKt$getMigrationFunction$1 = new SharedPreferencesMigrationKt$getMigrationFunction$1(continuation);
sharedPreferencesMigrationKt$getMigrationFunction$1.L$0 = sharedPreferencesView;
sharedPreferencesMigrationKt$getMigrationFunction$1.L$1 = preferences;
return sharedPreferencesMigrationKt$getMigrationFunction$1.invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
SharedPreferencesView sharedPreferencesView = (SharedPreferencesView) this.L$0;
Preferences preferences = (Preferences) this.L$1;
Set<Preferences.Key<?>> keySet = preferences.asMap().keySet();
ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(keySet, 10));
Iterator<T> it = keySet.iterator();
while (it.hasNext()) {
arrayList.add(((Preferences.Key) it.next()).getName());
}
Map<String, Object> all = sharedPreferencesView.getAll();
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (Map.Entry<String, Object> entry : all.entrySet()) {
if (Boxing.boxBoolean(!arrayList.contains(entry.getKey())).booleanValue()) {
linkedHashMap.put(entry.getKey(), entry.getValue());
}
}
MutablePreferences mutablePreferences = preferences.toMutablePreferences();
for (Map.Entry entry2 : linkedHashMap.entrySet()) {
String str = (String) entry2.getKey();
Object value = entry2.getValue();
if (value instanceof Boolean) {
mutablePreferences.set(PreferencesKeys.booleanKey(str), value);
} else if (value instanceof Float) {
mutablePreferences.set(PreferencesKeys.floatKey(str), value);
} else if (value instanceof Integer) {
mutablePreferences.set(PreferencesKeys.intKey(str), value);
} else if (value instanceof Long) {
mutablePreferences.set(PreferencesKeys.longKey(str), value);
} else if (value instanceof String) {
mutablePreferences.set(PreferencesKeys.stringKey(str), value);
} else if (value instanceof Set) {
Preferences.Key<Set<String>> stringSetKey = PreferencesKeys.stringSetKey(str);
if (value != null) {
mutablePreferences.set(stringSetKey, (Set) value);
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.collections.Set<kotlin.String>");
}
} else {
continue;
}
}
return mutablePreferences.toPreferences();
}
}

View File

@@ -0,0 +1,71 @@
package androidx.datastore.preferences;
import androidx.datastore.preferences.core.Preferences;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.Boxing;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
@DebugMetadata(c = "androidx.datastore.preferences.SharedPreferencesMigrationKt$getShouldRunMigration$1", f = "SharedPreferencesMigration.kt", l = {}, m = "invokeSuspend")
/* loaded from: classes.dex */
public final class SharedPreferencesMigrationKt$getShouldRunMigration$1 extends SuspendLambda implements Function2 {
final /* synthetic */ Set<String> $keysToMigrate;
/* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public SharedPreferencesMigrationKt$getShouldRunMigration$1(Set<String> set, Continuation continuation) {
super(2, continuation);
this.$keysToMigrate = set;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
SharedPreferencesMigrationKt$getShouldRunMigration$1 sharedPreferencesMigrationKt$getShouldRunMigration$1 = new SharedPreferencesMigrationKt$getShouldRunMigration$1(this.$keysToMigrate, continuation);
sharedPreferencesMigrationKt$getShouldRunMigration$1.L$0 = obj;
return sharedPreferencesMigrationKt$getShouldRunMigration$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Preferences preferences, Continuation continuation) {
return ((SharedPreferencesMigrationKt$getShouldRunMigration$1) create(preferences, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
if (this.label == 0) {
ResultKt.throwOnFailure(obj);
Set<Preferences.Key<?>> keySet = ((Preferences) this.L$0).asMap().keySet();
ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(keySet, 10));
Iterator<T> it = keySet.iterator();
while (it.hasNext()) {
arrayList.add(((Preferences.Key) it.next()).getName());
}
boolean z = true;
if (this.$keysToMigrate != SharedPreferencesMigrationKt.getMIGRATE_ALL_KEYS()) {
Set<String> set = this.$keysToMigrate;
if (!(set instanceof Collection) || !set.isEmpty()) {
Iterator<T> it2 = set.iterator();
while (it2.hasNext()) {
if (Boxing.boxBoolean(!arrayList.contains((String) it2.next())).booleanValue()) {
break;
}
}
}
z = false;
}
return Boxing.boxBoolean(z);
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}

View File

@@ -0,0 +1,73 @@
package androidx.datastore.preferences;
import android.content.Context;
import androidx.datastore.migrations.SharedPreferencesMigration;
import androidx.datastore.preferences.core.Preferences;
import java.util.LinkedHashSet;
import java.util.Set;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class SharedPreferencesMigrationKt {
private static final Set<String> MIGRATE_ALL_KEYS = new LinkedHashSet();
public static final SharedPreferencesMigration<Preferences> SharedPreferencesMigration(Context context, String sharedPreferencesName) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(sharedPreferencesName, "sharedPreferencesName");
return SharedPreferencesMigration$default(context, sharedPreferencesName, null, 4, null);
}
public static final SharedPreferencesMigration<Preferences> SharedPreferencesMigration(Function0 produceSharedPreferences) {
Intrinsics.checkNotNullParameter(produceSharedPreferences, "produceSharedPreferences");
return SharedPreferencesMigration$default(produceSharedPreferences, null, 2, null);
}
public static final Set<String> getMIGRATE_ALL_KEYS() {
return MIGRATE_ALL_KEYS;
}
public static /* synthetic */ SharedPreferencesMigration SharedPreferencesMigration$default(Function0 function0, Set set, int i, Object obj) {
if ((i & 2) != 0) {
set = MIGRATE_ALL_KEYS;
}
return SharedPreferencesMigration(function0, (Set<String>) set);
}
public static final SharedPreferencesMigration<Preferences> SharedPreferencesMigration(Function0 produceSharedPreferences, Set<String> keysToMigrate) {
Intrinsics.checkNotNullParameter(produceSharedPreferences, "produceSharedPreferences");
Intrinsics.checkNotNullParameter(keysToMigrate, "keysToMigrate");
if (keysToMigrate == MIGRATE_ALL_KEYS) {
return new SharedPreferencesMigration<>(produceSharedPreferences, (Set) null, getShouldRunMigration(keysToMigrate), getMigrationFunction(), 2, (DefaultConstructorMarker) null);
}
return new SharedPreferencesMigration<>(produceSharedPreferences, keysToMigrate, getShouldRunMigration(keysToMigrate), getMigrationFunction());
}
public static /* synthetic */ SharedPreferencesMigration SharedPreferencesMigration$default(Context context, String str, Set set, int i, Object obj) {
if ((i & 4) != 0) {
set = MIGRATE_ALL_KEYS;
}
return SharedPreferencesMigration(context, str, set);
}
public static final SharedPreferencesMigration<Preferences> SharedPreferencesMigration(Context context, String sharedPreferencesName, Set<String> keysToMigrate) {
Intrinsics.checkNotNullParameter(context, "context");
Intrinsics.checkNotNullParameter(sharedPreferencesName, "sharedPreferencesName");
Intrinsics.checkNotNullParameter(keysToMigrate, "keysToMigrate");
if (keysToMigrate == MIGRATE_ALL_KEYS) {
return new SharedPreferencesMigration<>(context, sharedPreferencesName, null, getShouldRunMigration(keysToMigrate), getMigrationFunction(), 4, null);
}
return new SharedPreferencesMigration<>(context, sharedPreferencesName, keysToMigrate, getShouldRunMigration(keysToMigrate), getMigrationFunction());
}
private static final Function3 getMigrationFunction() {
return new SharedPreferencesMigrationKt$getMigrationFunction$1(null);
}
private static final Function2 getShouldRunMigration(Set<String> set) {
return new SharedPreferencesMigrationKt$getShouldRunMigration$1(set, null);
}
}

View File

@@ -0,0 +1,150 @@
package androidx.datastore.preferences.core;
import androidx.datastore.preferences.core.Preferences;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class MutablePreferences extends Preferences {
private final AtomicBoolean frozen;
private final Map<Preferences.Key<?>, Object> preferencesMap;
/* JADX WARN: Multi-variable type inference failed */
public MutablePreferences() {
this(null, false, 3, 0 == true ? 1 : 0);
}
public final Map<Preferences.Key<?>, Object> getPreferencesMap$datastore_preferences_core() {
return this.preferencesMap;
}
public /* synthetic */ MutablePreferences(Map map, boolean z, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? new LinkedHashMap() : map, (i & 2) != 0 ? true : z);
}
public MutablePreferences(Map<Preferences.Key<?>, Object> preferencesMap, boolean z) {
Intrinsics.checkNotNullParameter(preferencesMap, "preferencesMap");
this.preferencesMap = preferencesMap;
this.frozen = new AtomicBoolean(z);
}
public final void checkNotFrozen$datastore_preferences_core() {
if (!(!this.frozen.get())) {
throw new IllegalStateException("Do mutate preferences once returned to DataStore.".toString());
}
}
public final void freeze$datastore_preferences_core() {
this.frozen.set(true);
}
@Override // androidx.datastore.preferences.core.Preferences
public <T> boolean contains(Preferences.Key<T> key) {
Intrinsics.checkNotNullParameter(key, "key");
return this.preferencesMap.containsKey(key);
}
@Override // androidx.datastore.preferences.core.Preferences
public <T> T get(Preferences.Key<T> key) {
Intrinsics.checkNotNullParameter(key, "key");
return (T) this.preferencesMap.get(key);
}
@Override // androidx.datastore.preferences.core.Preferences
public Map<Preferences.Key<?>, Object> asMap() {
Map<Preferences.Key<?>, Object> unmodifiableMap = Collections.unmodifiableMap(this.preferencesMap);
Intrinsics.checkNotNullExpressionValue(unmodifiableMap, "unmodifiableMap(preferencesMap)");
return unmodifiableMap;
}
public final <T> void set(Preferences.Key<T> key, T t) {
Intrinsics.checkNotNullParameter(key, "key");
setUnchecked$datastore_preferences_core(key, t);
}
public final void setUnchecked$datastore_preferences_core(Preferences.Key<?> key, Object obj) {
Set set;
Intrinsics.checkNotNullParameter(key, "key");
checkNotFrozen$datastore_preferences_core();
if (obj == null) {
remove(key);
return;
}
if (!(obj instanceof Set)) {
this.preferencesMap.put(key, obj);
return;
}
Map<Preferences.Key<?>, Object> map = this.preferencesMap;
set = CollectionsKt___CollectionsKt.toSet((Iterable) obj);
Set unmodifiableSet = Collections.unmodifiableSet(set);
Intrinsics.checkNotNullExpressionValue(unmodifiableSet, "unmodifiableSet(value.toSet())");
map.put(key, unmodifiableSet);
}
public final void plusAssign(Preferences prefs) {
Intrinsics.checkNotNullParameter(prefs, "prefs");
checkNotFrozen$datastore_preferences_core();
this.preferencesMap.putAll(prefs.asMap());
}
public final void plusAssign(Preferences.Pair<?> pair) {
Intrinsics.checkNotNullParameter(pair, "pair");
checkNotFrozen$datastore_preferences_core();
putAll(pair);
}
public final void minusAssign(Preferences.Key<?> key) {
Intrinsics.checkNotNullParameter(key, "key");
checkNotFrozen$datastore_preferences_core();
remove(key);
}
public final void putAll(Preferences.Pair<?>... pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
checkNotFrozen$datastore_preferences_core();
for (Preferences.Pair<?> pair : pairs) {
setUnchecked$datastore_preferences_core(pair.getKey$datastore_preferences_core(), pair.getValue$datastore_preferences_core());
}
}
public final <T> T remove(Preferences.Key<T> key) {
Intrinsics.checkNotNullParameter(key, "key");
checkNotFrozen$datastore_preferences_core();
return (T) this.preferencesMap.remove(key);
}
public final void clear() {
checkNotFrozen$datastore_preferences_core();
this.preferencesMap.clear();
}
public boolean equals(Object obj) {
if (obj instanceof MutablePreferences) {
return Intrinsics.areEqual(this.preferencesMap, ((MutablePreferences) obj).preferencesMap);
}
return false;
}
public int hashCode() {
return this.preferencesMap.hashCode();
}
public String toString() {
String joinToString$default;
joinToString$default = CollectionsKt___CollectionsKt.joinToString$default(this.preferencesMap.entrySet(), ",\n", "{\n", "\n}", 0, null, new Function1() { // from class: androidx.datastore.preferences.core.MutablePreferences$toString$1
@Override // kotlin.jvm.functions.Function1
public final CharSequence invoke(Map.Entry<Preferences.Key<?>, Object> entry) {
Intrinsics.checkNotNullParameter(entry, "entry");
return " " + entry.getKey().getName() + " = " + entry.getValue();
}
}, 24, null);
return joinToString$default;
}
}

View File

@@ -0,0 +1,59 @@
package androidx.datastore.preferences.core;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
@DebugMetadata(c = "androidx.datastore.preferences.core.PreferenceDataStore$updateData$2", f = "PreferenceDataStoreFactory.kt", l = {85}, m = "invokeSuspend")
/* loaded from: classes.dex */
public final class PreferenceDataStore$updateData$2 extends SuspendLambda implements Function2 {
final /* synthetic */ Function2 $transform;
/* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public PreferenceDataStore$updateData$2(Function2 function2, Continuation continuation) {
super(2, continuation);
this.$transform = function2;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
PreferenceDataStore$updateData$2 preferenceDataStore$updateData$2 = new PreferenceDataStore$updateData$2(this.$transform, continuation);
preferenceDataStore$updateData$2.L$0 = obj;
return preferenceDataStore$updateData$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Preferences preferences, Continuation continuation) {
return ((PreferenceDataStore$updateData$2) create(preferences, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
Preferences preferences = (Preferences) this.L$0;
Function2 function2 = this.$transform;
this.label = 1;
obj = function2.invoke(preferences, this);
if (obj == coroutine_suspended) {
return coroutine_suspended;
}
} else if (i == 1) {
ResultKt.throwOnFailure(obj);
} else {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
Preferences preferences2 = (Preferences) obj;
((MutablePreferences) preferences2).freeze$datastore_preferences_core();
return preferences2;
}
}

View File

@@ -0,0 +1,27 @@
package androidx.datastore.preferences.core;
import androidx.datastore.core.DataStore;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.flow.Flow;
/* loaded from: classes.dex */
public final class PreferenceDataStore implements DataStore<Preferences> {
private final DataStore<Preferences> delegate;
@Override // androidx.datastore.core.DataStore
public Flow getData() {
return this.delegate.getData();
}
public PreferenceDataStore(DataStore<Preferences> delegate) {
Intrinsics.checkNotNullParameter(delegate, "delegate");
this.delegate = delegate;
}
@Override // androidx.datastore.core.DataStore
public Object updateData(Function2 function2, Continuation continuation) {
return this.delegate.updateData(new PreferenceDataStore$updateData$2(function2, null), continuation);
}
}

View File

@@ -0,0 +1,77 @@
package androidx.datastore.preferences.core;
import androidx.datastore.core.DataMigration;
import androidx.datastore.core.DataStore;
import androidx.datastore.core.DataStoreFactory;
import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler;
import java.io.File;
import java.util.List;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.io.FilesKt__UtilsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.CoroutineScopeKt;
import kotlinx.coroutines.Dispatchers;
import kotlinx.coroutines.SupervisorKt;
/* loaded from: classes.dex */
public final class PreferenceDataStoreFactory {
public static final PreferenceDataStoreFactory INSTANCE = new PreferenceDataStoreFactory();
public final DataStore<Preferences> create(ReplaceFileCorruptionHandler<Preferences> replaceFileCorruptionHandler, List<? extends DataMigration<Preferences>> migrations, Function0 produceFile) {
Intrinsics.checkNotNullParameter(migrations, "migrations");
Intrinsics.checkNotNullParameter(produceFile, "produceFile");
return create$default(this, replaceFileCorruptionHandler, migrations, null, produceFile, 4, null);
}
public final DataStore<Preferences> create(ReplaceFileCorruptionHandler<Preferences> replaceFileCorruptionHandler, Function0 produceFile) {
Intrinsics.checkNotNullParameter(produceFile, "produceFile");
return create$default(this, replaceFileCorruptionHandler, null, null, produceFile, 6, null);
}
public final DataStore<Preferences> create(Function0 produceFile) {
Intrinsics.checkNotNullParameter(produceFile, "produceFile");
return create$default(this, null, null, null, produceFile, 7, null);
}
private PreferenceDataStoreFactory() {
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ DataStore create$default(PreferenceDataStoreFactory preferenceDataStoreFactory, ReplaceFileCorruptionHandler replaceFileCorruptionHandler, List list, CoroutineScope coroutineScope, Function0 function0, int i, Object obj) {
if ((i & 1) != 0) {
replaceFileCorruptionHandler = null;
}
if ((i & 2) != 0) {
list = CollectionsKt__CollectionsKt.emptyList();
}
if ((i & 4) != 0) {
coroutineScope = CoroutineScopeKt.CoroutineScope(Dispatchers.getIO().plus(SupervisorKt.SupervisorJob$default(null, 1, null)));
}
return preferenceDataStoreFactory.create(replaceFileCorruptionHandler, list, coroutineScope, function0);
}
public final DataStore<Preferences> create(ReplaceFileCorruptionHandler<Preferences> replaceFileCorruptionHandler, List<? extends DataMigration<Preferences>> migrations, CoroutineScope scope, final Function0 produceFile) {
Intrinsics.checkNotNullParameter(migrations, "migrations");
Intrinsics.checkNotNullParameter(scope, "scope");
Intrinsics.checkNotNullParameter(produceFile, "produceFile");
return new PreferenceDataStore(DataStoreFactory.INSTANCE.create(PreferencesSerializer.INSTANCE, replaceFileCorruptionHandler, migrations, scope, new Function0() { // from class: androidx.datastore.preferences.core.PreferenceDataStoreFactory$create$delegate$1
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final File invoke() {
String extension;
File file = (File) Function0.this.invoke();
extension = FilesKt__UtilsKt.getExtension(file);
PreferencesSerializer preferencesSerializer = PreferencesSerializer.INSTANCE;
if (Intrinsics.areEqual(extension, preferencesSerializer.getFileExtension())) {
return file;
}
throw new IllegalStateException(("File extension for file: " + file + " does not match required extension for Preferences file: " + preferencesSerializer.getFileExtension()).toString());
}
}));
}
}

View File

@@ -0,0 +1,77 @@
package androidx.datastore.preferences.core;
import java.util.Map;
import kotlin.collections.MapsKt__MapsKt;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public abstract class Preferences {
public abstract Map<Key<?>, Object> asMap();
public abstract <T> boolean contains(Key<T> key);
public abstract <T> T get(Key<T> key);
public static final class Key<T> {
private final String name;
public final String getName() {
return this.name;
}
public String toString() {
return this.name;
}
public Key(String name) {
Intrinsics.checkNotNullParameter(name, "name");
this.name = name;
}
public final Pair<T> to(T t) {
return new Pair<>(this, t);
}
public boolean equals(Object obj) {
if (obj instanceof Key) {
return Intrinsics.areEqual(this.name, ((Key) obj).name);
}
return false;
}
public int hashCode() {
return this.name.hashCode();
}
}
public static final class Pair<T> {
private final Key<T> key;
private final T value;
public final Key<T> getKey$datastore_preferences_core() {
return this.key;
}
public final T getValue$datastore_preferences_core() {
return this.value;
}
public Pair(Key<T> key, T t) {
Intrinsics.checkNotNullParameter(key, "key");
this.key = key;
this.value = t;
}
}
public final MutablePreferences toMutablePreferences() {
Map mutableMap;
mutableMap = MapsKt__MapsKt.toMutableMap(asMap());
return new MutablePreferences(mutableMap, false);
}
public final Preferences toPreferences() {
Map mutableMap;
mutableMap = MapsKt__MapsKt.toMutableMap(asMap());
return new MutablePreferences(mutableMap, true);
}
}

View File

@@ -0,0 +1,24 @@
package androidx.datastore.preferences.core;
import androidx.datastore.preferences.core.Preferences;
import java.util.Arrays;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class PreferencesFactory {
public static final Preferences createEmpty() {
return new MutablePreferences(null, true, 1, null);
}
public static final Preferences create(Preferences.Pair<?>... pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
return createMutable((Preferences.Pair[]) Arrays.copyOf(pairs, pairs.length));
}
public static final MutablePreferences createMutable(Preferences.Pair<?>... pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
MutablePreferences mutablePreferences = new MutablePreferences(null, false, 1, null);
mutablePreferences.putAll((Preferences.Pair[]) Arrays.copyOf(pairs, pairs.length));
return mutablePreferences;
}
}

View File

@@ -0,0 +1,43 @@
package androidx.datastore.preferences.core;
import androidx.datastore.preferences.core.Preferences;
import java.util.Set;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class PreferencesKeys {
public static final Preferences.Key<Integer> intKey(String name) {
Intrinsics.checkNotNullParameter(name, "name");
return new Preferences.Key<>(name);
}
public static final Preferences.Key<Double> doubleKey(String name) {
Intrinsics.checkNotNullParameter(name, "name");
return new Preferences.Key<>(name);
}
public static final Preferences.Key<String> stringKey(String name) {
Intrinsics.checkNotNullParameter(name, "name");
return new Preferences.Key<>(name);
}
public static final Preferences.Key<Boolean> booleanKey(String name) {
Intrinsics.checkNotNullParameter(name, "name");
return new Preferences.Key<>(name);
}
public static final Preferences.Key<Float> floatKey(String name) {
Intrinsics.checkNotNullParameter(name, "name");
return new Preferences.Key<>(name);
}
public static final Preferences.Key<Long> longKey(String name) {
Intrinsics.checkNotNullParameter(name, "name");
return new Preferences.Key<>(name);
}
public static final Preferences.Key<Set<String>> stringSetKey(String name) {
Intrinsics.checkNotNullParameter(name, "name");
return new Preferences.Key<>(name);
}
}

View File

@@ -0,0 +1,56 @@
package androidx.datastore.preferences.core;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
@DebugMetadata(c = "androidx.datastore.preferences.core.PreferencesKt$edit$2", f = "Preferences.kt", l = {329}, m = "invokeSuspend")
/* loaded from: classes.dex */
public final class PreferencesKt$edit$2 extends SuspendLambda implements Function2 {
final /* synthetic */ Function2 $transform;
/* synthetic */ Object L$0;
int label;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public PreferencesKt$edit$2(Function2 function2, Continuation continuation) {
super(2, continuation);
this.$transform = function2;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
PreferencesKt$edit$2 preferencesKt$edit$2 = new PreferencesKt$edit$2(this.$transform, continuation);
preferencesKt$edit$2.L$0 = obj;
return preferencesKt$edit$2;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(Preferences preferences, Continuation continuation) {
return ((PreferencesKt$edit$2) create(preferences, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object coroutine_suspended;
coroutine_suspended = IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i != 0) {
if (i == 1) {
MutablePreferences mutablePreferences = (MutablePreferences) this.L$0;
ResultKt.throwOnFailure(obj);
return mutablePreferences;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
MutablePreferences mutablePreferences2 = ((Preferences) this.L$0).toMutablePreferences();
Function2 function2 = this.$transform;
this.L$0 = mutablePreferences2;
this.label = 1;
return function2.invoke(mutablePreferences2, this) == coroutine_suspended ? coroutine_suspended : mutablePreferences2;
}
}

View File

@@ -0,0 +1,12 @@
package androidx.datastore.preferences.core;
import androidx.datastore.core.DataStore;
import kotlin.coroutines.Continuation;
import kotlin.jvm.functions.Function2;
/* loaded from: classes.dex */
public final class PreferencesKt {
public static final Object edit(DataStore<Preferences> dataStore, Function2 function2, Continuation continuation) {
return dataStore.updateData(new PreferencesKt$edit$2(function2, null), continuation);
}
}

View File

@@ -0,0 +1,163 @@
package androidx.datastore.preferences.core;
import androidx.datastore.core.CorruptionException;
import androidx.datastore.core.Serializer;
import androidx.datastore.preferences.PreferencesMapCompat;
import androidx.datastore.preferences.PreferencesProto;
import androidx.datastore.preferences.core.Preferences;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;
import java.util.Set;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Unit;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.coroutines.Continuation;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class PreferencesSerializer implements Serializer<Preferences> {
public static final PreferencesSerializer INSTANCE = new PreferencesSerializer();
private static final String fileExtension = "preferences_pb";
public /* synthetic */ class WhenMappings {
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[PreferencesProto.Value.ValueCase.values().length];
iArr[PreferencesProto.Value.ValueCase.BOOLEAN.ordinal()] = 1;
iArr[PreferencesProto.Value.ValueCase.FLOAT.ordinal()] = 2;
iArr[PreferencesProto.Value.ValueCase.DOUBLE.ordinal()] = 3;
iArr[PreferencesProto.Value.ValueCase.INTEGER.ordinal()] = 4;
iArr[PreferencesProto.Value.ValueCase.LONG.ordinal()] = 5;
iArr[PreferencesProto.Value.ValueCase.STRING.ordinal()] = 6;
iArr[PreferencesProto.Value.ValueCase.STRING_SET.ordinal()] = 7;
iArr[PreferencesProto.Value.ValueCase.VALUE_NOT_SET.ordinal()] = 8;
$EnumSwitchMapping$0 = iArr;
}
}
public final String getFileExtension() {
return fileExtension;
}
private PreferencesSerializer() {
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.datastore.core.Serializer
public Preferences getDefaultValue() {
return PreferencesFactory.createEmpty();
}
@Override // androidx.datastore.core.Serializer
public Object readFrom(InputStream inputStream, Continuation continuation) throws IOException, CorruptionException {
PreferencesProto.PreferenceMap readFrom = PreferencesMapCompat.Companion.readFrom(inputStream);
MutablePreferences createMutable = PreferencesFactory.createMutable(new Preferences.Pair[0]);
Map<String, PreferencesProto.Value> preferencesMap = readFrom.getPreferencesMap();
Intrinsics.checkNotNullExpressionValue(preferencesMap, "preferencesProto.preferencesMap");
for (Map.Entry<String, PreferencesProto.Value> entry : preferencesMap.entrySet()) {
String name = entry.getKey();
PreferencesProto.Value value = entry.getValue();
PreferencesSerializer preferencesSerializer = INSTANCE;
Intrinsics.checkNotNullExpressionValue(name, "name");
Intrinsics.checkNotNullExpressionValue(value, "value");
preferencesSerializer.addProtoEntryToPreferences(name, value, createMutable);
}
return createMutable.toPreferences();
}
@Override // androidx.datastore.core.Serializer
public Object writeTo(Preferences preferences, OutputStream outputStream, Continuation continuation) throws IOException, CorruptionException {
Map<Preferences.Key<?>, Object> asMap = preferences.asMap();
PreferencesProto.PreferenceMap.Builder newBuilder = PreferencesProto.PreferenceMap.newBuilder();
for (Map.Entry<Preferences.Key<?>, Object> entry : asMap.entrySet()) {
newBuilder.putPreferences(entry.getKey().getName(), getValueProto(entry.getValue()));
}
newBuilder.build().writeTo(outputStream);
return Unit.INSTANCE;
}
private final PreferencesProto.Value getValueProto(Object obj) {
if (obj instanceof Boolean) {
PreferencesProto.Value build = PreferencesProto.Value.newBuilder().setBoolean(((Boolean) obj).booleanValue()).build();
Intrinsics.checkNotNullExpressionValue(build, "newBuilder().setBoolean(value).build()");
return build;
}
if (obj instanceof Float) {
PreferencesProto.Value build2 = PreferencesProto.Value.newBuilder().setFloat(((Number) obj).floatValue()).build();
Intrinsics.checkNotNullExpressionValue(build2, "newBuilder().setFloat(value).build()");
return build2;
}
if (obj instanceof Double) {
PreferencesProto.Value build3 = PreferencesProto.Value.newBuilder().setDouble(((Number) obj).doubleValue()).build();
Intrinsics.checkNotNullExpressionValue(build3, "newBuilder().setDouble(value).build()");
return build3;
}
if (obj instanceof Integer) {
PreferencesProto.Value build4 = PreferencesProto.Value.newBuilder().setInteger(((Number) obj).intValue()).build();
Intrinsics.checkNotNullExpressionValue(build4, "newBuilder().setInteger(value).build()");
return build4;
}
if (obj instanceof Long) {
PreferencesProto.Value build5 = PreferencesProto.Value.newBuilder().setLong(((Number) obj).longValue()).build();
Intrinsics.checkNotNullExpressionValue(build5, "newBuilder().setLong(value).build()");
return build5;
}
if (obj instanceof String) {
PreferencesProto.Value build6 = PreferencesProto.Value.newBuilder().setString((String) obj).build();
Intrinsics.checkNotNullExpressionValue(build6, "newBuilder().setString(value).build()");
return build6;
}
if (obj instanceof Set) {
PreferencesProto.Value build7 = PreferencesProto.Value.newBuilder().setStringSet(PreferencesProto.StringSet.newBuilder().addAllStrings((Set) obj)).build();
Intrinsics.checkNotNullExpressionValue(build7, "newBuilder().setStringSet(\n StringSet.newBuilder().addAllStrings(value as Set<String>)\n ).build()");
return build7;
}
throw new IllegalStateException(Intrinsics.stringPlus("PreferencesSerializer does not support type: ", obj.getClass().getName()));
}
private final void addProtoEntryToPreferences(String str, PreferencesProto.Value value, MutablePreferences mutablePreferences) {
Set set;
PreferencesProto.Value.ValueCase valueCase = value.getValueCase();
switch (valueCase == null ? -1 : WhenMappings.$EnumSwitchMapping$0[valueCase.ordinal()]) {
case -1:
throw new CorruptionException("Value case is null.", null, 2, null);
case 0:
default:
throw new NoWhenBranchMatchedException();
case 1:
mutablePreferences.set(PreferencesKeys.booleanKey(str), Boolean.valueOf(value.getBoolean()));
return;
case 2:
mutablePreferences.set(PreferencesKeys.floatKey(str), Float.valueOf(value.getFloat()));
return;
case 3:
mutablePreferences.set(PreferencesKeys.doubleKey(str), Double.valueOf(value.getDouble()));
return;
case 4:
mutablePreferences.set(PreferencesKeys.intKey(str), Integer.valueOf(value.getInteger()));
return;
case 5:
mutablePreferences.set(PreferencesKeys.longKey(str), Long.valueOf(value.getLong()));
return;
case 6:
Preferences.Key<String> stringKey = PreferencesKeys.stringKey(str);
String string = value.getString();
Intrinsics.checkNotNullExpressionValue(string, "value.string");
mutablePreferences.set(stringKey, string);
return;
case 7:
Preferences.Key<Set<String>> stringSetKey = PreferencesKeys.stringSetKey(str);
List<String> stringsList = value.getStringSet().getStringsList();
Intrinsics.checkNotNullExpressionValue(stringsList, "value.stringSet.stringsList");
set = CollectionsKt___CollectionsKt.toSet(stringsList);
mutablePreferences.set(stringSetKey, set);
return;
case 8:
throw new CorruptionException("Value not set.", null, 2, null);
}
}
}

View File

@@ -0,0 +1,332 @@
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);
}
}
}
}

View File

@@ -0,0 +1,189 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.AbstractMessageLite;
import androidx.datastore.preferences.protobuf.MessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public abstract class AbstractParser<MessageType extends MessageLite> implements Parser<MessageType> {
private static final ExtensionRegistryLite EMPTY_REGISTRY = ExtensionRegistryLite.getEmptyRegistry();
private UninitializedMessageException newUninitializedMessageException(MessageType messagetype) {
if (messagetype instanceof AbstractMessageLite) {
return ((AbstractMessageLite) messagetype).newUninitializedMessageException();
}
return new UninitializedMessageException(messagetype);
}
private MessageType checkMessageInitialized(MessageType messagetype) throws InvalidProtocolBufferException {
if (messagetype == null || messagetype.isInitialized()) {
return messagetype;
}
throw newUninitializedMessageException(messagetype).asInvalidProtocolBufferException().setUnfinishedMessage(messagetype);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(CodedInputStream codedInputStream) throws InvalidProtocolBufferException {
return (MessageType) parsePartialFrom(codedInputStream, EMPTY_REGISTRY);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (MessageType) checkMessageInitialized((MessageLite) parsePartialFrom(codedInputStream, extensionRegistryLite));
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(CodedInputStream codedInputStream) throws InvalidProtocolBufferException {
return parseFrom(codedInputStream, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
CodedInputStream newCodedInput = byteString.newCodedInput();
MessageType messagetype = (MessageType) parsePartialFrom(newCodedInput, extensionRegistryLite);
try {
newCodedInput.checkLastTagWas(0);
return messagetype;
} catch (InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(messagetype);
}
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(ByteString byteString) throws InvalidProtocolBufferException {
return parsePartialFrom(byteString, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return checkMessageInitialized(parsePartialFrom(byteString, extensionRegistryLite));
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return parseFrom(byteString, EMPTY_REGISTRY);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
CodedInputStream newInstance = CodedInputStream.newInstance(byteBuffer);
MessageLite messageLite = (MessageLite) parsePartialFrom(newInstance, extensionRegistryLite);
try {
newInstance.checkLastTagWas(0);
return (MessageType) checkMessageInitialized(messageLite);
} catch (InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(messageLite);
}
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return parseFrom(byteBuffer, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(byte[] bArr, int i, int i2, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
CodedInputStream newInstance = CodedInputStream.newInstance(bArr, i, i2);
MessageType messagetype = (MessageType) parsePartialFrom(newInstance, extensionRegistryLite);
try {
newInstance.checkLastTagWas(0);
return messagetype;
} catch (InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(messagetype);
}
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(byte[] bArr, int i, int i2) throws InvalidProtocolBufferException {
return parsePartialFrom(bArr, i, i2, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return parsePartialFrom(bArr, 0, bArr.length, extensionRegistryLite);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(byte[] bArr) throws InvalidProtocolBufferException {
return parsePartialFrom(bArr, 0, bArr.length, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(byte[] bArr, int i, int i2, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return checkMessageInitialized(parsePartialFrom(bArr, i, i2, extensionRegistryLite));
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(byte[] bArr, int i, int i2) throws InvalidProtocolBufferException {
return parseFrom(bArr, i, i2, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return parseFrom(bArr, 0, bArr.length, extensionRegistryLite);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return parseFrom(bArr, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
CodedInputStream newInstance = CodedInputStream.newInstance(inputStream);
MessageType messagetype = (MessageType) parsePartialFrom(newInstance, extensionRegistryLite);
try {
newInstance.checkLastTagWas(0);
return messagetype;
} catch (InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(messagetype);
}
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialFrom(InputStream inputStream) throws InvalidProtocolBufferException {
return parsePartialFrom(inputStream, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return checkMessageInitialized(parsePartialFrom(inputStream, extensionRegistryLite));
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseFrom(InputStream inputStream) throws InvalidProtocolBufferException {
return parseFrom(inputStream, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
try {
int read = inputStream.read();
if (read == -1) {
return null;
}
return parsePartialFrom((InputStream) new AbstractMessageLite.Builder.LimitedInputStream(inputStream, CodedInputStream.readRawVarint32(read, inputStream)), extensionRegistryLite);
} catch (IOException e) {
throw new InvalidProtocolBufferException(e);
}
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parsePartialDelimitedFrom(InputStream inputStream) throws InvalidProtocolBufferException {
return parsePartialDelimitedFrom(inputStream, EMPTY_REGISTRY);
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return checkMessageInitialized(parsePartialDelimitedFrom(inputStream, extensionRegistryLite));
}
@Override // androidx.datastore.preferences.protobuf.Parser
public MessageType parseDelimitedFrom(InputStream inputStream) throws InvalidProtocolBufferException {
return parseDelimitedFrom(inputStream, EMPTY_REGISTRY);
}
}

View File

@@ -0,0 +1,123 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
import java.util.AbstractList;
import java.util.Collection;
import java.util.List;
import java.util.RandomAccess;
/* loaded from: classes.dex */
abstract class AbstractProtobufList<E> extends AbstractList<E> implements Internal.ProtobufList<E> {
protected static final int DEFAULT_CAPACITY = 10;
private boolean isMutable = true;
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList
public boolean isModifiable() {
return this.isMutable;
}
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList
public final void makeImmutable() {
this.isMutable = false;
}
@Override // java.util.AbstractList, java.util.Collection, java.util.List
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof List)) {
return false;
}
if (!(obj instanceof RandomAccess)) {
return super.equals(obj);
}
List list = (List) obj;
int size = size();
if (size != list.size()) {
return false;
}
for (int i = 0; i < size; i++) {
if (!get(i).equals(list.get(i))) {
return false;
}
}
return true;
}
@Override // java.util.AbstractList, java.util.Collection, java.util.List
public int hashCode() {
int size = size();
int i = 1;
for (int i2 = 0; i2 < size; i2++) {
i = (i * 31) + get(i2).hashCode();
}
return i;
}
@Override // java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean add(E e) {
ensureIsMutable();
return super.add(e);
}
@Override // java.util.AbstractList, java.util.List
public void add(int i, E e) {
ensureIsMutable();
super.add(i, e);
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean addAll(Collection<? extends E> collection) {
ensureIsMutable();
return super.addAll(collection);
}
@Override // java.util.AbstractList, java.util.List
public boolean addAll(int i, Collection<? extends E> collection) {
ensureIsMutable();
return super.addAll(i, collection);
}
@Override // java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public void clear() {
ensureIsMutable();
super.clear();
}
@Override // java.util.AbstractList, java.util.List
public E remove(int i) {
ensureIsMutable();
return (E) super.remove(i);
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean remove(Object obj) {
ensureIsMutable();
return super.remove(obj);
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean removeAll(Collection<?> collection) {
ensureIsMutable();
return super.removeAll(collection);
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean retainAll(Collection<?> collection) {
ensureIsMutable();
return super.retainAll(collection);
}
@Override // java.util.AbstractList, java.util.List
public E set(int i, E e) {
ensureIsMutable();
return (E) super.set(i, e);
}
public void ensureIsMutable() {
if (!this.isMutable) {
throw new UnsupportedOperationException();
}
}
}

View File

@@ -0,0 +1,141 @@
package androidx.datastore.preferences.protobuf;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
abstract class AllocatedBuffer {
public abstract byte[] array();
public abstract int arrayOffset();
public abstract boolean hasArray();
public abstract boolean hasNioBuffer();
public abstract int limit();
public abstract ByteBuffer nioBuffer();
public abstract int position();
public abstract AllocatedBuffer position(int i);
public abstract int remaining();
public static AllocatedBuffer wrap(byte[] bArr) {
return wrapNoCheck(bArr, 0, bArr.length);
}
public static AllocatedBuffer wrap(byte[] bArr, int i, int i2) {
if (i < 0 || i2 < 0 || i + i2 > bArr.length) {
throw new IndexOutOfBoundsException(String.format("bytes.length=%d, offset=%d, length=%d", Integer.valueOf(bArr.length), Integer.valueOf(i), Integer.valueOf(i2)));
}
return wrapNoCheck(bArr, i, i2);
}
public static AllocatedBuffer wrap(final ByteBuffer byteBuffer) {
Internal.checkNotNull(byteBuffer, "buffer");
return new AllocatedBuffer() { // from class: androidx.datastore.preferences.protobuf.AllocatedBuffer.1
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public boolean hasNioBuffer() {
return true;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public ByteBuffer nioBuffer() {
return byteBuffer;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public boolean hasArray() {
return byteBuffer.hasArray();
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public byte[] array() {
return byteBuffer.array();
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public int arrayOffset() {
return byteBuffer.arrayOffset();
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public int position() {
return byteBuffer.position();
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public AllocatedBuffer position(int i) {
byteBuffer.position(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public int limit() {
return byteBuffer.limit();
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public int remaining() {
return byteBuffer.remaining();
}
};
}
private static AllocatedBuffer wrapNoCheck(final byte[] bArr, final int i, final int i2) {
return new AllocatedBuffer() { // from class: androidx.datastore.preferences.protobuf.AllocatedBuffer.2
private int position;
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public byte[] array() {
return bArr;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public int arrayOffset() {
return i;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public boolean hasArray() {
return true;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public boolean hasNioBuffer() {
return false;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public int limit() {
return i2;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public int position() {
return this.position;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public int remaining() {
return i2 - this.position;
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public ByteBuffer nioBuffer() {
throw new UnsupportedOperationException();
}
@Override // androidx.datastore.preferences.protobuf.AllocatedBuffer
public AllocatedBuffer position(int i3) {
if (i3 >= 0 && i3 <= i2) {
this.position = i3;
return this;
}
throw new IllegalArgumentException("Invalid position: " + i3);
}
};
}
}

View File

@@ -0,0 +1,27 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
final class Android {
private static final boolean IS_ROBOLECTRIC;
private static final Class<?> MEMORY_CLASS = getClassForName("libcore.io.Memory");
public static Class<?> getMemoryClass() {
return MEMORY_CLASS;
}
public static boolean isOnAndroidDevice() {
return (MEMORY_CLASS == null || IS_ROBOLECTRIC) ? false : true;
}
static {
IS_ROBOLECTRIC = getClassForName("org.robolectric.Robolectric") != null;
}
private static <T> Class<T> getClassForName(String str) {
try {
return (Class<T>) Class.forName(str);
} catch (Throwable unused) {
return null;
}
}
}

View File

@@ -0,0 +1,262 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class Any extends GeneratedMessageLite<Any, Builder> implements AnyOrBuilder {
private static final Any DEFAULT_INSTANCE;
private static volatile Parser<Any> PARSER = null;
public static final int TYPE_URL_FIELD_NUMBER = 1;
public static final int VALUE_FIELD_NUMBER = 2;
private String typeUrl_ = "";
private ByteString value_ = ByteString.EMPTY;
public static Any getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@Override // androidx.datastore.preferences.protobuf.AnyOrBuilder
public String getTypeUrl() {
return this.typeUrl_;
}
@Override // androidx.datastore.preferences.protobuf.AnyOrBuilder
public ByteString getValue() {
return this.value_;
}
private Any() {
}
@Override // androidx.datastore.preferences.protobuf.AnyOrBuilder
public ByteString getTypeUrlBytes() {
return ByteString.copyFromUtf8(this.typeUrl_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setTypeUrl(String str) {
str.getClass();
this.typeUrl_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearTypeUrl() {
this.typeUrl_ = getDefaultInstance().getTypeUrl();
}
/* JADX INFO: Access modifiers changed from: private */
public void setTypeUrlBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.typeUrl_ = byteString.toStringUtf8();
}
/* JADX INFO: Access modifiers changed from: private */
public void setValue(ByteString byteString) {
byteString.getClass();
this.value_ = byteString;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearValue() {
this.value_ = getDefaultInstance().getValue();
}
public static Any parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static Any parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static Any parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static Any parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static Any parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static Any parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static Any parseFrom(InputStream inputStream) throws IOException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static Any parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Any parseDelimitedFrom(InputStream inputStream) throws IOException {
return (Any) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static Any parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Any) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Any parseFrom(CodedInputStream codedInputStream) throws IOException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static Any parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Any) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Any any) {
return DEFAULT_INSTANCE.createBuilder(any);
}
public static final class Builder extends GeneratedMessageLite.Builder<Any, Builder> implements AnyOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(Any.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.AnyOrBuilder
public String getTypeUrl() {
return ((Any) this.instance).getTypeUrl();
}
@Override // androidx.datastore.preferences.protobuf.AnyOrBuilder
public ByteString getTypeUrlBytes() {
return ((Any) this.instance).getTypeUrlBytes();
}
public Builder setTypeUrl(String str) {
copyOnWrite();
((Any) this.instance).setTypeUrl(str);
return this;
}
public Builder clearTypeUrl() {
copyOnWrite();
((Any) this.instance).clearTypeUrl();
return this;
}
public Builder setTypeUrlBytes(ByteString byteString) {
copyOnWrite();
((Any) this.instance).setTypeUrlBytes(byteString);
return this;
}
@Override // androidx.datastore.preferences.protobuf.AnyOrBuilder
public ByteString getValue() {
return ((Any) this.instance).getValue();
}
public Builder setValue(ByteString byteString) {
copyOnWrite();
((Any) this.instance).setValue(byteString);
return this;
}
public Builder clearValue() {
copyOnWrite();
((Any) this.instance).clearValue();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.Any$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new Any();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001Ȉ\u0002\n", new Object[]{"typeUrl_", "value_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<Any> parser = PARSER;
if (parser == null) {
synchronized (Any.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
Any any = new Any();
DEFAULT_INSTANCE = any;
GeneratedMessageLite.registerDefaultInstance(Any.class, any);
}
public static Parser<Any> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,10 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface AnyOrBuilder extends MessageLiteOrBuilder {
String getTypeUrl();
ByteString getTypeUrlBytes();
ByteString getValue();
}

View File

@@ -0,0 +1,10 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public final class AnyProto {
public static void registerAllExtensions(ExtensionRegistryLite extensionRegistryLite) {
}
private AnyProto() {
}
}

View File

@@ -0,0 +1,894 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.Internal;
import androidx.datastore.preferences.protobuf.Method;
import androidx.datastore.preferences.protobuf.Mixin;
import androidx.datastore.preferences.protobuf.Option;
import androidx.datastore.preferences.protobuf.SourceContext;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class Api extends GeneratedMessageLite<Api, Builder> implements ApiOrBuilder {
private static final Api DEFAULT_INSTANCE;
public static final int METHODS_FIELD_NUMBER = 2;
public static final int MIXINS_FIELD_NUMBER = 6;
public static final int NAME_FIELD_NUMBER = 1;
public static final int OPTIONS_FIELD_NUMBER = 3;
private static volatile Parser<Api> PARSER = null;
public static final int SOURCE_CONTEXT_FIELD_NUMBER = 5;
public static final int SYNTAX_FIELD_NUMBER = 7;
public static final int VERSION_FIELD_NUMBER = 4;
private SourceContext sourceContext_;
private int syntax_;
private String name_ = "";
private Internal.ProtobufList<Method> methods_ = GeneratedMessageLite.emptyProtobufList();
private Internal.ProtobufList<Option> options_ = GeneratedMessageLite.emptyProtobufList();
private String version_ = "";
private Internal.ProtobufList<Mixin> mixins_ = GeneratedMessageLite.emptyProtobufList();
/* JADX INFO: Access modifiers changed from: private */
public void clearSourceContext() {
this.sourceContext_ = null;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearSyntax() {
this.syntax_ = 0;
}
public static Api getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSyntaxValue(int i) {
this.syntax_ = i;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public List<Method> getMethodsList() {
return this.methods_;
}
public List<? extends MethodOrBuilder> getMethodsOrBuilderList() {
return this.methods_;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public List<Mixin> getMixinsList() {
return this.mixins_;
}
public List<? extends MixinOrBuilder> getMixinsOrBuilderList() {
return this.mixins_;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public String getName() {
return this.name_;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public List<Option> getOptionsList() {
return this.options_;
}
public List<? extends OptionOrBuilder> getOptionsOrBuilderList() {
return this.options_;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public int getSyntaxValue() {
return this.syntax_;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public String getVersion() {
return this.version_;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public boolean hasSourceContext() {
return this.sourceContext_ != null;
}
private Api() {
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public ByteString getNameBytes() {
return ByteString.copyFromUtf8(this.name_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setName(String str) {
str.getClass();
this.name_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearName() {
this.name_ = getDefaultInstance().getName();
}
/* JADX INFO: Access modifiers changed from: private */
public void setNameBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.name_ = byteString.toStringUtf8();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public int getMethodsCount() {
return this.methods_.size();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public Method getMethods(int i) {
return this.methods_.get(i);
}
public MethodOrBuilder getMethodsOrBuilder(int i) {
return this.methods_.get(i);
}
private void ensureMethodsIsMutable() {
if (this.methods_.isModifiable()) {
return;
}
this.methods_ = GeneratedMessageLite.mutableCopy(this.methods_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setMethods(int i, Method method) {
method.getClass();
ensureMethodsIsMutable();
this.methods_.set(i, method);
}
/* JADX INFO: Access modifiers changed from: private */
public void setMethods(int i, Method.Builder builder) {
ensureMethodsIsMutable();
this.methods_.set(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addMethods(Method method) {
method.getClass();
ensureMethodsIsMutable();
this.methods_.add(method);
}
/* JADX INFO: Access modifiers changed from: private */
public void addMethods(int i, Method method) {
method.getClass();
ensureMethodsIsMutable();
this.methods_.add(i, method);
}
/* JADX INFO: Access modifiers changed from: private */
public void addMethods(Method.Builder builder) {
ensureMethodsIsMutable();
this.methods_.add(builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addMethods(int i, Method.Builder builder) {
ensureMethodsIsMutable();
this.methods_.add(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllMethods(Iterable<? extends Method> iterable) {
ensureMethodsIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.methods_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearMethods() {
this.methods_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void removeMethods(int i) {
ensureMethodsIsMutable();
this.methods_.remove(i);
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public int getOptionsCount() {
return this.options_.size();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public Option getOptions(int i) {
return this.options_.get(i);
}
public OptionOrBuilder getOptionsOrBuilder(int i) {
return this.options_.get(i);
}
private void ensureOptionsIsMutable() {
if (this.options_.isModifiable()) {
return;
}
this.options_ = GeneratedMessageLite.mutableCopy(this.options_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setOptions(int i, Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.set(i, option);
}
/* JADX INFO: Access modifiers changed from: private */
public void setOptions(int i, Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.set(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.add(option);
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(int i, Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.add(i, option);
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.add(builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(int i, Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.add(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllOptions(Iterable<? extends Option> iterable) {
ensureOptionsIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.options_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearOptions() {
this.options_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void removeOptions(int i) {
ensureOptionsIsMutable();
this.options_.remove(i);
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public ByteString getVersionBytes() {
return ByteString.copyFromUtf8(this.version_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setVersion(String str) {
str.getClass();
this.version_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearVersion() {
this.version_ = getDefaultInstance().getVersion();
}
/* JADX INFO: Access modifiers changed from: private */
public void setVersionBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.version_ = byteString.toStringUtf8();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public SourceContext getSourceContext() {
SourceContext sourceContext = this.sourceContext_;
return sourceContext == null ? SourceContext.getDefaultInstance() : sourceContext;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSourceContext(SourceContext sourceContext) {
sourceContext.getClass();
this.sourceContext_ = sourceContext;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSourceContext(SourceContext.Builder builder) {
this.sourceContext_ = builder.build();
}
/* JADX INFO: Access modifiers changed from: private */
public void mergeSourceContext(SourceContext sourceContext) {
sourceContext.getClass();
SourceContext sourceContext2 = this.sourceContext_;
if (sourceContext2 == null || sourceContext2 == SourceContext.getDefaultInstance()) {
this.sourceContext_ = sourceContext;
} else {
this.sourceContext_ = SourceContext.newBuilder(this.sourceContext_).mergeFrom((SourceContext.Builder) sourceContext).buildPartial();
}
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public int getMixinsCount() {
return this.mixins_.size();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public Mixin getMixins(int i) {
return this.mixins_.get(i);
}
public MixinOrBuilder getMixinsOrBuilder(int i) {
return this.mixins_.get(i);
}
private void ensureMixinsIsMutable() {
if (this.mixins_.isModifiable()) {
return;
}
this.mixins_ = GeneratedMessageLite.mutableCopy(this.mixins_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setMixins(int i, Mixin mixin) {
mixin.getClass();
ensureMixinsIsMutable();
this.mixins_.set(i, mixin);
}
/* JADX INFO: Access modifiers changed from: private */
public void setMixins(int i, Mixin.Builder builder) {
ensureMixinsIsMutable();
this.mixins_.set(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addMixins(Mixin mixin) {
mixin.getClass();
ensureMixinsIsMutable();
this.mixins_.add(mixin);
}
/* JADX INFO: Access modifiers changed from: private */
public void addMixins(int i, Mixin mixin) {
mixin.getClass();
ensureMixinsIsMutable();
this.mixins_.add(i, mixin);
}
/* JADX INFO: Access modifiers changed from: private */
public void addMixins(Mixin.Builder builder) {
ensureMixinsIsMutable();
this.mixins_.add(builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addMixins(int i, Mixin.Builder builder) {
ensureMixinsIsMutable();
this.mixins_.add(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllMixins(Iterable<? extends Mixin> iterable) {
ensureMixinsIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.mixins_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearMixins() {
this.mixins_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void removeMixins(int i) {
ensureMixinsIsMutable();
this.mixins_.remove(i);
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public Syntax getSyntax() {
Syntax forNumber = Syntax.forNumber(this.syntax_);
return forNumber == null ? Syntax.UNRECOGNIZED : forNumber;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSyntax(Syntax syntax) {
syntax.getClass();
this.syntax_ = syntax.getNumber();
}
public static Api parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static Api parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static Api parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static Api parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static Api parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static Api parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static Api parseFrom(InputStream inputStream) throws IOException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static Api parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Api parseDelimitedFrom(InputStream inputStream) throws IOException {
return (Api) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static Api parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Api) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Api parseFrom(CodedInputStream codedInputStream) throws IOException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static Api parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Api) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Api api) {
return DEFAULT_INSTANCE.createBuilder(api);
}
public static final class Builder extends GeneratedMessageLite.Builder<Api, Builder> implements ApiOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(Api.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public String getName() {
return ((Api) this.instance).getName();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public ByteString getNameBytes() {
return ((Api) this.instance).getNameBytes();
}
public Builder setName(String str) {
copyOnWrite();
((Api) this.instance).setName(str);
return this;
}
public Builder clearName() {
copyOnWrite();
((Api) this.instance).clearName();
return this;
}
public Builder setNameBytes(ByteString byteString) {
copyOnWrite();
((Api) this.instance).setNameBytes(byteString);
return this;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public List<Method> getMethodsList() {
return Collections.unmodifiableList(((Api) this.instance).getMethodsList());
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public int getMethodsCount() {
return ((Api) this.instance).getMethodsCount();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public Method getMethods(int i) {
return ((Api) this.instance).getMethods(i);
}
public Builder setMethods(int i, Method method) {
copyOnWrite();
((Api) this.instance).setMethods(i, method);
return this;
}
public Builder setMethods(int i, Method.Builder builder) {
copyOnWrite();
((Api) this.instance).setMethods(i, builder);
return this;
}
public Builder addMethods(Method method) {
copyOnWrite();
((Api) this.instance).addMethods(method);
return this;
}
public Builder addMethods(int i, Method method) {
copyOnWrite();
((Api) this.instance).addMethods(i, method);
return this;
}
public Builder addMethods(Method.Builder builder) {
copyOnWrite();
((Api) this.instance).addMethods(builder);
return this;
}
public Builder addMethods(int i, Method.Builder builder) {
copyOnWrite();
((Api) this.instance).addMethods(i, builder);
return this;
}
public Builder addAllMethods(Iterable<? extends Method> iterable) {
copyOnWrite();
((Api) this.instance).addAllMethods(iterable);
return this;
}
public Builder clearMethods() {
copyOnWrite();
((Api) this.instance).clearMethods();
return this;
}
public Builder removeMethods(int i) {
copyOnWrite();
((Api) this.instance).removeMethods(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public List<Option> getOptionsList() {
return Collections.unmodifiableList(((Api) this.instance).getOptionsList());
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public int getOptionsCount() {
return ((Api) this.instance).getOptionsCount();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public Option getOptions(int i) {
return ((Api) this.instance).getOptions(i);
}
public Builder setOptions(int i, Option option) {
copyOnWrite();
((Api) this.instance).setOptions(i, option);
return this;
}
public Builder setOptions(int i, Option.Builder builder) {
copyOnWrite();
((Api) this.instance).setOptions(i, builder);
return this;
}
public Builder addOptions(Option option) {
copyOnWrite();
((Api) this.instance).addOptions(option);
return this;
}
public Builder addOptions(int i, Option option) {
copyOnWrite();
((Api) this.instance).addOptions(i, option);
return this;
}
public Builder addOptions(Option.Builder builder) {
copyOnWrite();
((Api) this.instance).addOptions(builder);
return this;
}
public Builder addOptions(int i, Option.Builder builder) {
copyOnWrite();
((Api) this.instance).addOptions(i, builder);
return this;
}
public Builder addAllOptions(Iterable<? extends Option> iterable) {
copyOnWrite();
((Api) this.instance).addAllOptions(iterable);
return this;
}
public Builder clearOptions() {
copyOnWrite();
((Api) this.instance).clearOptions();
return this;
}
public Builder removeOptions(int i) {
copyOnWrite();
((Api) this.instance).removeOptions(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public String getVersion() {
return ((Api) this.instance).getVersion();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public ByteString getVersionBytes() {
return ((Api) this.instance).getVersionBytes();
}
public Builder setVersion(String str) {
copyOnWrite();
((Api) this.instance).setVersion(str);
return this;
}
public Builder clearVersion() {
copyOnWrite();
((Api) this.instance).clearVersion();
return this;
}
public Builder setVersionBytes(ByteString byteString) {
copyOnWrite();
((Api) this.instance).setVersionBytes(byteString);
return this;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public boolean hasSourceContext() {
return ((Api) this.instance).hasSourceContext();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public SourceContext getSourceContext() {
return ((Api) this.instance).getSourceContext();
}
public Builder setSourceContext(SourceContext sourceContext) {
copyOnWrite();
((Api) this.instance).setSourceContext(sourceContext);
return this;
}
public Builder setSourceContext(SourceContext.Builder builder) {
copyOnWrite();
((Api) this.instance).setSourceContext(builder);
return this;
}
public Builder mergeSourceContext(SourceContext sourceContext) {
copyOnWrite();
((Api) this.instance).mergeSourceContext(sourceContext);
return this;
}
public Builder clearSourceContext() {
copyOnWrite();
((Api) this.instance).clearSourceContext();
return this;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public List<Mixin> getMixinsList() {
return Collections.unmodifiableList(((Api) this.instance).getMixinsList());
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public int getMixinsCount() {
return ((Api) this.instance).getMixinsCount();
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public Mixin getMixins(int i) {
return ((Api) this.instance).getMixins(i);
}
public Builder setMixins(int i, Mixin mixin) {
copyOnWrite();
((Api) this.instance).setMixins(i, mixin);
return this;
}
public Builder setMixins(int i, Mixin.Builder builder) {
copyOnWrite();
((Api) this.instance).setMixins(i, builder);
return this;
}
public Builder addMixins(Mixin mixin) {
copyOnWrite();
((Api) this.instance).addMixins(mixin);
return this;
}
public Builder addMixins(int i, Mixin mixin) {
copyOnWrite();
((Api) this.instance).addMixins(i, mixin);
return this;
}
public Builder addMixins(Mixin.Builder builder) {
copyOnWrite();
((Api) this.instance).addMixins(builder);
return this;
}
public Builder addMixins(int i, Mixin.Builder builder) {
copyOnWrite();
((Api) this.instance).addMixins(i, builder);
return this;
}
public Builder addAllMixins(Iterable<? extends Mixin> iterable) {
copyOnWrite();
((Api) this.instance).addAllMixins(iterable);
return this;
}
public Builder clearMixins() {
copyOnWrite();
((Api) this.instance).clearMixins();
return this;
}
public Builder removeMixins(int i) {
copyOnWrite();
((Api) this.instance).removeMixins(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public int getSyntaxValue() {
return ((Api) this.instance).getSyntaxValue();
}
public Builder setSyntaxValue(int i) {
copyOnWrite();
((Api) this.instance).setSyntaxValue(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.ApiOrBuilder
public Syntax getSyntax() {
return ((Api) this.instance).getSyntax();
}
public Builder setSyntax(Syntax syntax) {
copyOnWrite();
((Api) this.instance).setSyntax(syntax);
return this;
}
public Builder clearSyntax() {
copyOnWrite();
((Api) this.instance).clearSyntax();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.Api$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new Api();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0007\u0000\u0000\u0001\u0007\u0007\u0000\u0003\u0000\u0001Ȉ\u0002\u001b\u0003\u001b\u0004Ȉ\u0005\t\u0006\u001b\u0007\f", new Object[]{"name_", "methods_", Method.class, "options_", Option.class, "version_", "sourceContext_", "mixins_", Mixin.class, "syntax_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<Api> parser = PARSER;
if (parser == null) {
synchronized (Api.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
Api api = new Api();
DEFAULT_INSTANCE = api;
GeneratedMessageLite.registerDefaultInstance(Api.class, api);
}
public static Parser<Api> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,40 @@
package androidx.datastore.preferences.protobuf;
import java.util.List;
/* loaded from: classes.dex */
public interface ApiOrBuilder extends MessageLiteOrBuilder {
Method getMethods(int i);
int getMethodsCount();
List<Method> getMethodsList();
Mixin getMixins(int i);
int getMixinsCount();
List<Mixin> getMixinsList();
String getName();
ByteString getNameBytes();
Option getOptions(int i);
int getOptionsCount();
List<Option> getOptionsList();
SourceContext getSourceContext();
Syntax getSyntax();
int getSyntaxValue();
String getVersion();
ByteString getVersionBytes();
boolean hasSourceContext();
}

View File

@@ -0,0 +1,10 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public final class ApiProto {
public static void registerAllExtensions(ExtensionRegistryLite extensionRegistryLite) {
}
private ApiProto() {
}
}

View File

@@ -0,0 +1,939 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.Internal;
import androidx.datastore.preferences.protobuf.WireFormat;
import com.applovin.exoplayer2.common.base.Ascii;
import java.io.IOException;
import java.util.List;
/* loaded from: classes.dex */
final class ArrayDecoders {
public static final class Registers {
public final ExtensionRegistryLite extensionRegistry;
public int int1;
public long long1;
public Object object1;
public Registers() {
this.extensionRegistry = ExtensionRegistryLite.getEmptyRegistry();
}
public Registers(ExtensionRegistryLite extensionRegistryLite) {
extensionRegistryLite.getClass();
this.extensionRegistry = extensionRegistryLite;
}
}
public static int decodeVarint32(byte[] bArr, int i, Registers registers) {
int i2 = i + 1;
byte b = bArr[i];
if (b >= 0) {
registers.int1 = b;
return i2;
}
return decodeVarint32(b, bArr, i2, registers);
}
public static int decodeVarint32(int i, byte[] bArr, int i2, Registers registers) {
int i3 = i & 127;
int i4 = i2 + 1;
byte b = bArr[i2];
if (b >= 0) {
registers.int1 = i3 | (b << 7);
return i4;
}
int i5 = i3 | ((b & Byte.MAX_VALUE) << 7);
int i6 = i2 + 2;
byte b2 = bArr[i4];
if (b2 >= 0) {
registers.int1 = i5 | (b2 << Ascii.SO);
return i6;
}
int i7 = i5 | ((b2 & Byte.MAX_VALUE) << 14);
int i8 = i2 + 3;
byte b3 = bArr[i6];
if (b3 >= 0) {
registers.int1 = i7 | (b3 << Ascii.NAK);
return i8;
}
int i9 = i7 | ((b3 & Byte.MAX_VALUE) << 21);
int i10 = i2 + 4;
byte b4 = bArr[i8];
if (b4 >= 0) {
registers.int1 = i9 | (b4 << Ascii.FS);
return i10;
}
int i11 = i9 | ((b4 & Byte.MAX_VALUE) << 28);
while (true) {
int i12 = i10 + 1;
if (bArr[i10] >= 0) {
registers.int1 = i11;
return i12;
}
i10 = i12;
}
}
public static int decodeVarint64(byte[] bArr, int i, Registers registers) {
int i2 = i + 1;
long j = bArr[i];
if (j >= 0) {
registers.long1 = j;
return i2;
}
return decodeVarint64(j, bArr, i2, registers);
}
public static int decodeVarint64(long j, byte[] bArr, int i, Registers registers) {
int i2 = i + 1;
byte b = bArr[i];
long j2 = (j & 127) | ((b & Byte.MAX_VALUE) << 7);
int i3 = 7;
while (b < 0) {
int i4 = i2 + 1;
byte b2 = bArr[i2];
i3 += 7;
j2 |= (b2 & Byte.MAX_VALUE) << i3;
i2 = i4;
b = b2;
}
registers.long1 = j2;
return i2;
}
public static int decodeFixed32(byte[] bArr, int i) {
return ((bArr[i + 3] & 255) << 24) | (bArr[i] & 255) | ((bArr[i + 1] & 255) << 8) | ((bArr[i + 2] & 255) << 16);
}
public static long decodeFixed64(byte[] bArr, int i) {
return ((bArr[i + 7] & 255) << 56) | (bArr[i] & 255) | ((bArr[i + 1] & 255) << 8) | ((bArr[i + 2] & 255) << 16) | ((bArr[i + 3] & 255) << 24) | ((bArr[i + 4] & 255) << 32) | ((bArr[i + 5] & 255) << 40) | ((bArr[i + 6] & 255) << 48);
}
public static double decodeDouble(byte[] bArr, int i) {
return Double.longBitsToDouble(decodeFixed64(bArr, i));
}
public static float decodeFloat(byte[] bArr, int i) {
return Float.intBitsToFloat(decodeFixed32(bArr, i));
}
public static int decodeString(byte[] bArr, int i, Registers registers) throws InvalidProtocolBufferException {
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1;
if (i2 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i2 == 0) {
registers.object1 = "";
return decodeVarint32;
}
registers.object1 = new String(bArr, decodeVarint32, i2, Internal.UTF_8);
return decodeVarint32 + i2;
}
public static int decodeStringRequireUtf8(byte[] bArr, int i, Registers registers) throws InvalidProtocolBufferException {
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1;
if (i2 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i2 == 0) {
registers.object1 = "";
return decodeVarint32;
}
registers.object1 = Utf8.decodeUtf8(bArr, decodeVarint32, i2);
return decodeVarint32 + i2;
}
public static int decodeBytes(byte[] bArr, int i, Registers registers) throws InvalidProtocolBufferException {
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1;
if (i2 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i2 > bArr.length - decodeVarint32) {
throw InvalidProtocolBufferException.truncatedMessage();
}
if (i2 == 0) {
registers.object1 = ByteString.EMPTY;
return decodeVarint32;
}
registers.object1 = ByteString.copyFrom(bArr, decodeVarint32, i2);
return decodeVarint32 + i2;
}
public static int decodeMessageField(Schema schema, byte[] bArr, int i, int i2, Registers registers) throws IOException {
int i3 = i + 1;
int i4 = bArr[i];
if (i4 < 0) {
i3 = decodeVarint32(i4, bArr, i3, registers);
i4 = registers.int1;
}
int i5 = i3;
if (i4 < 0 || i4 > i2 - i5) {
throw InvalidProtocolBufferException.truncatedMessage();
}
Object newInstance = schema.newInstance();
int i6 = i4 + i5;
schema.mergeFrom(newInstance, bArr, i5, i6, registers);
schema.makeImmutable(newInstance);
registers.object1 = newInstance;
return i6;
}
public static int decodeGroupField(Schema schema, byte[] bArr, int i, int i2, int i3, Registers registers) throws IOException {
MessageSchema messageSchema = (MessageSchema) schema;
Object newInstance = messageSchema.newInstance();
int parseProto2Message = messageSchema.parseProto2Message(newInstance, bArr, i, i2, i3, registers);
messageSchema.makeImmutable(newInstance);
registers.object1 = newInstance;
return parseProto2Message;
}
public static int decodeVarint32List(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
IntArrayList intArrayList = (IntArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i2, registers);
intArrayList.addInt(registers.int1);
while (decodeVarint32 < i3) {
int decodeVarint322 = decodeVarint32(bArr, decodeVarint32, registers);
if (i != registers.int1) {
break;
}
decodeVarint32 = decodeVarint32(bArr, decodeVarint322, registers);
intArrayList.addInt(registers.int1);
}
return decodeVarint32;
}
public static int decodeVarint64List(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
LongArrayList longArrayList = (LongArrayList) protobufList;
int decodeVarint64 = decodeVarint64(bArr, i2, registers);
longArrayList.addLong(registers.long1);
while (decodeVarint64 < i3) {
int decodeVarint32 = decodeVarint32(bArr, decodeVarint64, registers);
if (i != registers.int1) {
break;
}
decodeVarint64 = decodeVarint64(bArr, decodeVarint32, registers);
longArrayList.addLong(registers.long1);
}
return decodeVarint64;
}
public static int decodeFixed32List(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
IntArrayList intArrayList = (IntArrayList) protobufList;
intArrayList.addInt(decodeFixed32(bArr, i2));
int i4 = i2 + 4;
while (i4 < i3) {
int decodeVarint32 = decodeVarint32(bArr, i4, registers);
if (i != registers.int1) {
break;
}
intArrayList.addInt(decodeFixed32(bArr, decodeVarint32));
i4 = decodeVarint32 + 4;
}
return i4;
}
public static int decodeFixed64List(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
LongArrayList longArrayList = (LongArrayList) protobufList;
longArrayList.addLong(decodeFixed64(bArr, i2));
int i4 = i2 + 8;
while (i4 < i3) {
int decodeVarint32 = decodeVarint32(bArr, i4, registers);
if (i != registers.int1) {
break;
}
longArrayList.addLong(decodeFixed64(bArr, decodeVarint32));
i4 = decodeVarint32 + 8;
}
return i4;
}
public static int decodeFloatList(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
FloatArrayList floatArrayList = (FloatArrayList) protobufList;
floatArrayList.addFloat(decodeFloat(bArr, i2));
int i4 = i2 + 4;
while (i4 < i3) {
int decodeVarint32 = decodeVarint32(bArr, i4, registers);
if (i != registers.int1) {
break;
}
floatArrayList.addFloat(decodeFloat(bArr, decodeVarint32));
i4 = decodeVarint32 + 4;
}
return i4;
}
public static int decodeDoubleList(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
DoubleArrayList doubleArrayList = (DoubleArrayList) protobufList;
doubleArrayList.addDouble(decodeDouble(bArr, i2));
int i4 = i2 + 8;
while (i4 < i3) {
int decodeVarint32 = decodeVarint32(bArr, i4, registers);
if (i != registers.int1) {
break;
}
doubleArrayList.addDouble(decodeDouble(bArr, decodeVarint32));
i4 = decodeVarint32 + 8;
}
return i4;
}
public static int decodeBoolList(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
BooleanArrayList booleanArrayList = (BooleanArrayList) protobufList;
int decodeVarint64 = decodeVarint64(bArr, i2, registers);
booleanArrayList.addBoolean(registers.long1 != 0);
while (decodeVarint64 < i3) {
int decodeVarint32 = decodeVarint32(bArr, decodeVarint64, registers);
if (i != registers.int1) {
break;
}
decodeVarint64 = decodeVarint64(bArr, decodeVarint32, registers);
booleanArrayList.addBoolean(registers.long1 != 0);
}
return decodeVarint64;
}
public static int decodeSInt32List(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
IntArrayList intArrayList = (IntArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i2, registers);
intArrayList.addInt(CodedInputStream.decodeZigZag32(registers.int1));
while (decodeVarint32 < i3) {
int decodeVarint322 = decodeVarint32(bArr, decodeVarint32, registers);
if (i != registers.int1) {
break;
}
decodeVarint32 = decodeVarint32(bArr, decodeVarint322, registers);
intArrayList.addInt(CodedInputStream.decodeZigZag32(registers.int1));
}
return decodeVarint32;
}
public static int decodeSInt64List(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) {
LongArrayList longArrayList = (LongArrayList) protobufList;
int decodeVarint64 = decodeVarint64(bArr, i2, registers);
longArrayList.addLong(CodedInputStream.decodeZigZag64(registers.long1));
while (decodeVarint64 < i3) {
int decodeVarint32 = decodeVarint32(bArr, decodeVarint64, registers);
if (i != registers.int1) {
break;
}
decodeVarint64 = decodeVarint64(bArr, decodeVarint32, registers);
longArrayList.addLong(CodedInputStream.decodeZigZag64(registers.long1));
}
return decodeVarint64;
}
public static int decodePackedVarint32List(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
IntArrayList intArrayList = (IntArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
decodeVarint32 = decodeVarint32(bArr, decodeVarint32, registers);
intArrayList.addInt(registers.int1);
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodePackedVarint64List(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
LongArrayList longArrayList = (LongArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
decodeVarint32 = decodeVarint64(bArr, decodeVarint32, registers);
longArrayList.addLong(registers.long1);
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodePackedFixed32List(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
IntArrayList intArrayList = (IntArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
intArrayList.addInt(decodeFixed32(bArr, decodeVarint32));
decodeVarint32 += 4;
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodePackedFixed64List(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
LongArrayList longArrayList = (LongArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
longArrayList.addLong(decodeFixed64(bArr, decodeVarint32));
decodeVarint32 += 8;
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodePackedFloatList(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
FloatArrayList floatArrayList = (FloatArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
floatArrayList.addFloat(decodeFloat(bArr, decodeVarint32));
decodeVarint32 += 4;
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodePackedDoubleList(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
DoubleArrayList doubleArrayList = (DoubleArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
doubleArrayList.addDouble(decodeDouble(bArr, decodeVarint32));
decodeVarint32 += 8;
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodePackedBoolList(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
BooleanArrayList booleanArrayList = (BooleanArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
decodeVarint32 = decodeVarint64(bArr, decodeVarint32, registers);
booleanArrayList.addBoolean(registers.long1 != 0);
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodePackedSInt32List(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
IntArrayList intArrayList = (IntArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
decodeVarint32 = decodeVarint32(bArr, decodeVarint32, registers);
intArrayList.addInt(CodedInputStream.decodeZigZag32(registers.int1));
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodePackedSInt64List(byte[] bArr, int i, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
LongArrayList longArrayList = (LongArrayList) protobufList;
int decodeVarint32 = decodeVarint32(bArr, i, registers);
int i2 = registers.int1 + decodeVarint32;
while (decodeVarint32 < i2) {
decodeVarint32 = decodeVarint64(bArr, decodeVarint32, registers);
longArrayList.addLong(CodedInputStream.decodeZigZag64(registers.long1));
}
if (decodeVarint32 == i2) {
return decodeVarint32;
}
throw InvalidProtocolBufferException.truncatedMessage();
}
public static int decodeStringList(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) throws InvalidProtocolBufferException {
int decodeVarint32 = decodeVarint32(bArr, i2, registers);
int i4 = registers.int1;
if (i4 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i4 == 0) {
protobufList.add("");
} else {
protobufList.add(new String(bArr, decodeVarint32, i4, Internal.UTF_8));
decodeVarint32 += i4;
}
while (decodeVarint32 < i3) {
int decodeVarint322 = decodeVarint32(bArr, decodeVarint32, registers);
if (i != registers.int1) {
break;
}
decodeVarint32 = decodeVarint32(bArr, decodeVarint322, registers);
int i5 = registers.int1;
if (i5 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i5 == 0) {
protobufList.add("");
} else {
protobufList.add(new String(bArr, decodeVarint32, i5, Internal.UTF_8));
decodeVarint32 += i5;
}
}
return decodeVarint32;
}
public static int decodeStringListRequireUtf8(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) throws InvalidProtocolBufferException {
int decodeVarint32 = decodeVarint32(bArr, i2, registers);
int i4 = registers.int1;
if (i4 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i4 == 0) {
protobufList.add("");
} else {
int i5 = decodeVarint32 + i4;
if (!Utf8.isValidUtf8(bArr, decodeVarint32, i5)) {
throw InvalidProtocolBufferException.invalidUtf8();
}
protobufList.add(new String(bArr, decodeVarint32, i4, Internal.UTF_8));
decodeVarint32 = i5;
}
while (decodeVarint32 < i3) {
int decodeVarint322 = decodeVarint32(bArr, decodeVarint32, registers);
if (i != registers.int1) {
break;
}
decodeVarint32 = decodeVarint32(bArr, decodeVarint322, registers);
int i6 = registers.int1;
if (i6 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i6 == 0) {
protobufList.add("");
} else {
int i7 = decodeVarint32 + i6;
if (!Utf8.isValidUtf8(bArr, decodeVarint32, i7)) {
throw InvalidProtocolBufferException.invalidUtf8();
}
protobufList.add(new String(bArr, decodeVarint32, i6, Internal.UTF_8));
decodeVarint32 = i7;
}
}
return decodeVarint32;
}
public static int decodeBytesList(int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) throws InvalidProtocolBufferException {
int decodeVarint32 = decodeVarint32(bArr, i2, registers);
int i4 = registers.int1;
if (i4 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i4 > bArr.length - decodeVarint32) {
throw InvalidProtocolBufferException.truncatedMessage();
}
if (i4 == 0) {
protobufList.add(ByteString.EMPTY);
} else {
protobufList.add(ByteString.copyFrom(bArr, decodeVarint32, i4));
decodeVarint32 += i4;
}
while (decodeVarint32 < i3) {
int decodeVarint322 = decodeVarint32(bArr, decodeVarint32, registers);
if (i != registers.int1) {
break;
}
decodeVarint32 = decodeVarint32(bArr, decodeVarint322, registers);
int i5 = registers.int1;
if (i5 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i5 > bArr.length - decodeVarint32) {
throw InvalidProtocolBufferException.truncatedMessage();
}
if (i5 == 0) {
protobufList.add(ByteString.EMPTY);
} else {
protobufList.add(ByteString.copyFrom(bArr, decodeVarint32, i5));
decodeVarint32 += i5;
}
}
return decodeVarint32;
}
public static int decodeMessageList(Schema<?> schema, int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
int decodeMessageField = decodeMessageField(schema, bArr, i2, i3, registers);
protobufList.add(registers.object1);
while (decodeMessageField < i3) {
int decodeVarint32 = decodeVarint32(bArr, decodeMessageField, registers);
if (i != registers.int1) {
break;
}
decodeMessageField = decodeMessageField(schema, bArr, decodeVarint32, i3, registers);
protobufList.add(registers.object1);
}
return decodeMessageField;
}
public static int decodeGroupList(Schema schema, int i, byte[] bArr, int i2, int i3, Internal.ProtobufList<?> protobufList, Registers registers) throws IOException {
int i4 = (i & (-8)) | 4;
int decodeGroupField = decodeGroupField(schema, bArr, i2, i3, i4, registers);
protobufList.add(registers.object1);
while (decodeGroupField < i3) {
int decodeVarint32 = decodeVarint32(bArr, decodeGroupField, registers);
if (i != registers.int1) {
break;
}
decodeGroupField = decodeGroupField(schema, bArr, decodeVarint32, i3, i4, registers);
protobufList.add(registers.object1);
}
return decodeGroupField;
}
public static int decodeExtensionOrUnknownField(int i, byte[] bArr, int i2, int i3, Object obj, MessageLite messageLite, UnknownFieldSchema<UnknownFieldSetLite, UnknownFieldSetLite> unknownFieldSchema, Registers registers) throws IOException {
GeneratedMessageLite.GeneratedExtension findLiteExtensionByNumber = registers.extensionRegistry.findLiteExtensionByNumber(messageLite, i >>> 3);
if (findLiteExtensionByNumber == null) {
return decodeUnknownField(i, bArr, i2, i3, MessageSchema.getMutableUnknownFields(obj), registers);
}
GeneratedMessageLite.ExtendableMessage extendableMessage = (GeneratedMessageLite.ExtendableMessage) obj;
extendableMessage.ensureExtensionsAreMutable();
return decodeExtension(i, bArr, i2, i3, extendableMessage, findLiteExtensionByNumber, unknownFieldSchema, registers);
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
public static int decodeExtension(int i, byte[] bArr, int i2, int i3, GeneratedMessageLite.ExtendableMessage<?, ?> extendableMessage, GeneratedMessageLite.GeneratedExtension<?, ?> generatedExtension, UnknownFieldSchema<UnknownFieldSetLite, UnknownFieldSetLite> unknownFieldSchema, Registers registers) throws IOException {
Object field;
FieldSet<GeneratedMessageLite.ExtensionDescriptor> fieldSet = extendableMessage.extensions;
int i4 = i >>> 3;
if (generatedExtension.descriptor.isRepeated() && generatedExtension.descriptor.isPacked()) {
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[generatedExtension.getLiteType().ordinal()]) {
case 1:
DoubleArrayList doubleArrayList = new DoubleArrayList();
int decodePackedDoubleList = decodePackedDoubleList(bArr, i2, doubleArrayList, registers);
fieldSet.setField(generatedExtension.descriptor, doubleArrayList);
return decodePackedDoubleList;
case 2:
FloatArrayList floatArrayList = new FloatArrayList();
int decodePackedFloatList = decodePackedFloatList(bArr, i2, floatArrayList, registers);
fieldSet.setField(generatedExtension.descriptor, floatArrayList);
return decodePackedFloatList;
case 3:
case 4:
LongArrayList longArrayList = new LongArrayList();
int decodePackedVarint64List = decodePackedVarint64List(bArr, i2, longArrayList, registers);
fieldSet.setField(generatedExtension.descriptor, longArrayList);
return decodePackedVarint64List;
case 5:
case 6:
IntArrayList intArrayList = new IntArrayList();
int decodePackedVarint32List = decodePackedVarint32List(bArr, i2, intArrayList, registers);
fieldSet.setField(generatedExtension.descriptor, intArrayList);
return decodePackedVarint32List;
case 7:
case 8:
LongArrayList longArrayList2 = new LongArrayList();
int decodePackedFixed64List = decodePackedFixed64List(bArr, i2, longArrayList2, registers);
fieldSet.setField(generatedExtension.descriptor, longArrayList2);
return decodePackedFixed64List;
case 9:
case 10:
IntArrayList intArrayList2 = new IntArrayList();
int decodePackedFixed32List = decodePackedFixed32List(bArr, i2, intArrayList2, registers);
fieldSet.setField(generatedExtension.descriptor, intArrayList2);
return decodePackedFixed32List;
case 11:
BooleanArrayList booleanArrayList = new BooleanArrayList();
int decodePackedBoolList = decodePackedBoolList(bArr, i2, booleanArrayList, registers);
fieldSet.setField(generatedExtension.descriptor, booleanArrayList);
return decodePackedBoolList;
case 12:
IntArrayList intArrayList3 = new IntArrayList();
int decodePackedSInt32List = decodePackedSInt32List(bArr, i2, intArrayList3, registers);
fieldSet.setField(generatedExtension.descriptor, intArrayList3);
return decodePackedSInt32List;
case 13:
LongArrayList longArrayList3 = new LongArrayList();
int decodePackedSInt64List = decodePackedSInt64List(bArr, i2, longArrayList3, registers);
fieldSet.setField(generatedExtension.descriptor, longArrayList3);
return decodePackedSInt64List;
case 14:
IntArrayList intArrayList4 = new IntArrayList();
int decodePackedVarint32List2 = decodePackedVarint32List(bArr, i2, intArrayList4, registers);
UnknownFieldSetLite unknownFieldSetLite = extendableMessage.unknownFields;
UnknownFieldSetLite unknownFieldSetLite2 = (UnknownFieldSetLite) SchemaUtil.filterUnknownEnumList(i4, (List<Integer>) intArrayList4, generatedExtension.descriptor.getEnumType(), unknownFieldSetLite != UnknownFieldSetLite.getDefaultInstance() ? unknownFieldSetLite : null, (UnknownFieldSchema<UT, Object>) unknownFieldSchema);
if (unknownFieldSetLite2 != null) {
extendableMessage.unknownFields = unknownFieldSetLite2;
}
fieldSet.setField(generatedExtension.descriptor, intArrayList4);
return decodePackedVarint32List2;
default:
throw new IllegalStateException("Type cannot be packed: " + generatedExtension.descriptor.getLiteType());
}
}
if (generatedExtension.getLiteType() == WireFormat.FieldType.ENUM) {
i2 = decodeVarint32(bArr, i2, registers);
if (generatedExtension.descriptor.getEnumType().findValueByNumber(registers.int1) == null) {
UnknownFieldSetLite unknownFieldSetLite3 = extendableMessage.unknownFields;
if (unknownFieldSetLite3 == UnknownFieldSetLite.getDefaultInstance()) {
unknownFieldSetLite3 = UnknownFieldSetLite.newInstance();
extendableMessage.unknownFields = unknownFieldSetLite3;
}
SchemaUtil.storeUnknownEnum(i4, registers.int1, unknownFieldSetLite3, unknownFieldSchema);
return i2;
}
r2 = Integer.valueOf(registers.int1);
} else {
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[generatedExtension.getLiteType().ordinal()]) {
case 1:
r2 = Double.valueOf(decodeDouble(bArr, i2));
i2 += 8;
break;
case 2:
r2 = Float.valueOf(decodeFloat(bArr, i2));
i2 += 4;
break;
case 3:
case 4:
i2 = decodeVarint64(bArr, i2, registers);
r2 = Long.valueOf(registers.long1);
break;
case 5:
case 6:
i2 = decodeVarint32(bArr, i2, registers);
r2 = Integer.valueOf(registers.int1);
break;
case 7:
case 8:
r2 = Long.valueOf(decodeFixed64(bArr, i2));
i2 += 8;
break;
case 9:
case 10:
r2 = Integer.valueOf(decodeFixed32(bArr, i2));
i2 += 4;
break;
case 11:
i2 = decodeVarint64(bArr, i2, registers);
r2 = Boolean.valueOf(registers.long1 != 0);
break;
case 12:
i2 = decodeVarint32(bArr, i2, registers);
r2 = Integer.valueOf(CodedInputStream.decodeZigZag32(registers.int1));
break;
case 13:
i2 = decodeVarint64(bArr, i2, registers);
r2 = Long.valueOf(CodedInputStream.decodeZigZag64(registers.long1));
break;
case 14:
throw new IllegalStateException("Shouldn't reach here.");
case 15:
i2 = decodeBytes(bArr, i2, registers);
r2 = registers.object1;
break;
case 16:
i2 = decodeString(bArr, i2, registers);
r2 = registers.object1;
break;
case 17:
i2 = decodeGroupField(Protobuf.getInstance().schemaFor((Class) generatedExtension.getMessageDefaultInstance().getClass()), bArr, i2, i3, (i4 << 3) | 4, registers);
r2 = registers.object1;
break;
case 18:
i2 = decodeMessageField(Protobuf.getInstance().schemaFor((Class) generatedExtension.getMessageDefaultInstance().getClass()), bArr, i2, i3, registers);
r2 = registers.object1;
break;
}
}
if (generatedExtension.isRepeated()) {
fieldSet.addRepeatedField(generatedExtension.descriptor, r2);
} else {
int i5 = AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[generatedExtension.getLiteType().ordinal()];
if ((i5 == 17 || i5 == 18) && (field = fieldSet.getField(generatedExtension.descriptor)) != null) {
r2 = Internal.mergeMessage(field, r2);
}
fieldSet.setField(generatedExtension.descriptor, r2);
}
return i2;
}
/* renamed from: androidx.datastore.preferences.protobuf.ArrayDecoders$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$FieldType;
static {
int[] iArr = new int[WireFormat.FieldType.values().length];
$SwitchMap$com$google$protobuf$WireFormat$FieldType = iArr;
try {
iArr[WireFormat.FieldType.DOUBLE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FLOAT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT64.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT64.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT32.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT32.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED64.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED64.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED32.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED32.ordinal()] = 10;
} catch (NoSuchFieldError unused10) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.BOOL.ordinal()] = 11;
} catch (NoSuchFieldError unused11) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT32.ordinal()] = 12;
} catch (NoSuchFieldError unused12) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT64.ordinal()] = 13;
} catch (NoSuchFieldError unused13) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.ENUM.ordinal()] = 14;
} catch (NoSuchFieldError unused14) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.BYTES.ordinal()] = 15;
} catch (NoSuchFieldError unused15) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.STRING.ordinal()] = 16;
} catch (NoSuchFieldError unused16) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.GROUP.ordinal()] = 17;
} catch (NoSuchFieldError unused17) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.MESSAGE.ordinal()] = 18;
} catch (NoSuchFieldError unused18) {
}
}
}
public static int decodeUnknownField(int i, byte[] bArr, int i2, int i3, UnknownFieldSetLite unknownFieldSetLite, Registers registers) throws InvalidProtocolBufferException {
if (WireFormat.getTagFieldNumber(i) == 0) {
throw InvalidProtocolBufferException.invalidTag();
}
int tagWireType = WireFormat.getTagWireType(i);
if (tagWireType == 0) {
int decodeVarint64 = decodeVarint64(bArr, i2, registers);
unknownFieldSetLite.storeField(i, Long.valueOf(registers.long1));
return decodeVarint64;
}
if (tagWireType == 1) {
unknownFieldSetLite.storeField(i, Long.valueOf(decodeFixed64(bArr, i2)));
return i2 + 8;
}
if (tagWireType == 2) {
int decodeVarint32 = decodeVarint32(bArr, i2, registers);
int i4 = registers.int1;
if (i4 < 0) {
throw InvalidProtocolBufferException.negativeSize();
}
if (i4 > bArr.length - decodeVarint32) {
throw InvalidProtocolBufferException.truncatedMessage();
}
if (i4 == 0) {
unknownFieldSetLite.storeField(i, ByteString.EMPTY);
} else {
unknownFieldSetLite.storeField(i, ByteString.copyFrom(bArr, decodeVarint32, i4));
}
return decodeVarint32 + i4;
}
if (tagWireType != 3) {
if (tagWireType == 5) {
unknownFieldSetLite.storeField(i, Integer.valueOf(decodeFixed32(bArr, i2)));
return i2 + 4;
}
throw InvalidProtocolBufferException.invalidTag();
}
UnknownFieldSetLite newInstance = UnknownFieldSetLite.newInstance();
int i5 = (i & (-8)) | 4;
int i6 = 0;
while (true) {
if (i2 >= i3) {
break;
}
int decodeVarint322 = decodeVarint32(bArr, i2, registers);
int i7 = registers.int1;
if (i7 == i5) {
i6 = i7;
i2 = decodeVarint322;
break;
}
i6 = i7;
i2 = decodeUnknownField(i7, bArr, decodeVarint322, i3, newInstance, registers);
}
if (i2 > i3 || i6 != i5) {
throw InvalidProtocolBufferException.parseFailure();
}
unknownFieldSetLite.storeField(i, newInstance);
return i2;
}
public static int skipField(int i, byte[] bArr, int i2, int i3, Registers registers) throws InvalidProtocolBufferException {
if (WireFormat.getTagFieldNumber(i) == 0) {
throw InvalidProtocolBufferException.invalidTag();
}
int tagWireType = WireFormat.getTagWireType(i);
if (tagWireType == 0) {
return decodeVarint64(bArr, i2, registers);
}
if (tagWireType == 1) {
return i2 + 8;
}
if (tagWireType == 2) {
return decodeVarint32(bArr, i2, registers) + registers.int1;
}
if (tagWireType != 3) {
if (tagWireType == 5) {
return i2 + 4;
}
throw InvalidProtocolBufferException.invalidTag();
}
int i4 = (i & (-8)) | 4;
int i5 = 0;
while (i2 < i3) {
i2 = decodeVarint32(bArr, i2, registers);
i5 = registers.int1;
if (i5 == i4) {
break;
}
i2 = skipField(i5, bArr, i2, i3, registers);
}
if (i2 > i3 || i5 != i4) {
throw InvalidProtocolBufferException.parseFailure();
}
return i2;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,207 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class BoolValue extends GeneratedMessageLite<BoolValue, Builder> implements BoolValueOrBuilder {
private static final BoolValue DEFAULT_INSTANCE;
private static volatile Parser<BoolValue> PARSER = null;
public static final int VALUE_FIELD_NUMBER = 1;
private boolean value_;
/* JADX INFO: Access modifiers changed from: private */
public void clearValue() {
this.value_ = false;
}
public static BoolValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setValue(boolean z) {
this.value_ = z;
}
@Override // androidx.datastore.preferences.protobuf.BoolValueOrBuilder
public boolean getValue() {
return this.value_;
}
private BoolValue() {
}
public static BoolValue parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static BoolValue parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static BoolValue parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static BoolValue parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static BoolValue parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static BoolValue parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static BoolValue parseFrom(InputStream inputStream) throws IOException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static BoolValue parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static BoolValue parseDelimitedFrom(InputStream inputStream) throws IOException {
return (BoolValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static BoolValue parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (BoolValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static BoolValue parseFrom(CodedInputStream codedInputStream) throws IOException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static BoolValue parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (BoolValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(BoolValue boolValue) {
return DEFAULT_INSTANCE.createBuilder(boolValue);
}
public static final class Builder extends GeneratedMessageLite.Builder<BoolValue, Builder> implements BoolValueOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(BoolValue.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.BoolValueOrBuilder
public boolean getValue() {
return ((BoolValue) this.instance).getValue();
}
public Builder setValue(boolean z) {
copyOnWrite();
((BoolValue) this.instance).setValue(z);
return this;
}
public Builder clearValue() {
copyOnWrite();
((BoolValue) this.instance).clearValue();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.BoolValue$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new BoolValue();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0007", new Object[]{"value_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<BoolValue> parser = PARSER;
if (parser == null) {
synchronized (BoolValue.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
BoolValue boolValue = new BoolValue();
DEFAULT_INSTANCE = boolValue;
GeneratedMessageLite.registerDefaultInstance(BoolValue.class, boolValue);
}
public static BoolValue of(boolean z) {
return newBuilder().setValue(z).build();
}
public static Parser<BoolValue> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,6 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface BoolValueOrBuilder extends MessageLiteOrBuilder {
boolean getValue();
}

View File

@@ -0,0 +1,228 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
import java.util.AbstractList;
import java.util.Arrays;
import java.util.Collection;
import java.util.RandomAccess;
/* loaded from: classes.dex */
final class BooleanArrayList extends AbstractProtobufList<Boolean> implements Internal.BooleanList, RandomAccess, PrimitiveNonBoxingCollection {
private static final BooleanArrayList EMPTY_LIST;
private boolean[] array;
private int size;
public static BooleanArrayList emptyList() {
return EMPTY_LIST;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public int size() {
return this.size;
}
static {
BooleanArrayList booleanArrayList = new BooleanArrayList(new boolean[0], 0);
EMPTY_LIST = booleanArrayList;
booleanArrayList.makeImmutable();
}
public BooleanArrayList() {
this(new boolean[10], 0);
}
private BooleanArrayList(boolean[] zArr, int i) {
this.array = zArr;
this.size = i;
}
@Override // java.util.AbstractList
public void removeRange(int i, int i2) {
ensureIsMutable();
if (i2 < i) {
throw new IndexOutOfBoundsException("toIndex < fromIndex");
}
boolean[] zArr = this.array;
System.arraycopy(zArr, i2, zArr, i, this.size - i2);
this.size -= i2 - i;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof BooleanArrayList)) {
return super.equals(obj);
}
BooleanArrayList booleanArrayList = (BooleanArrayList) obj;
if (this.size != booleanArrayList.size) {
return false;
}
boolean[] zArr = booleanArrayList.array;
for (int i = 0; i < this.size; i++) {
if (this.array[i] != zArr[i]) {
return false;
}
}
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public int hashCode() {
int i = 1;
for (int i2 = 0; i2 < this.size; i2++) {
i = (i * 31) + Internal.hashBoolean(this.array[i2]);
}
return i;
}
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
/* renamed from: mutableCopyWithCapacity, reason: merged with bridge method [inline-methods] */
public Internal.ProtobufList<Boolean> mutableCopyWithCapacity2(int i) {
if (i < this.size) {
throw new IllegalArgumentException();
}
return new BooleanArrayList(Arrays.copyOf(this.array, i), this.size);
}
@Override // java.util.AbstractList, java.util.List
public Boolean get(int i) {
return Boolean.valueOf(getBoolean(i));
}
@Override // androidx.datastore.preferences.protobuf.Internal.BooleanList
public boolean getBoolean(int i) {
ensureIndexInRange(i);
return this.array[i];
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Boolean set(int i, Boolean bool) {
return Boolean.valueOf(setBoolean(i, bool.booleanValue()));
}
@Override // androidx.datastore.preferences.protobuf.Internal.BooleanList
public boolean setBoolean(int i, boolean z) {
ensureIsMutable();
ensureIndexInRange(i);
boolean[] zArr = this.array;
boolean z2 = zArr[i];
zArr[i] = z;
return z2;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean add(Boolean bool) {
addBoolean(bool.booleanValue());
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public void add(int i, Boolean bool) {
addBoolean(i, bool.booleanValue());
}
@Override // androidx.datastore.preferences.protobuf.Internal.BooleanList
public void addBoolean(boolean z) {
ensureIsMutable();
int i = this.size;
boolean[] zArr = this.array;
if (i == zArr.length) {
boolean[] zArr2 = new boolean[((i * 3) / 2) + 1];
System.arraycopy(zArr, 0, zArr2, 0, i);
this.array = zArr2;
}
boolean[] zArr3 = this.array;
int i2 = this.size;
this.size = i2 + 1;
zArr3[i2] = z;
}
private void addBoolean(int i, boolean z) {
int i2;
ensureIsMutable();
if (i < 0 || i > (i2 = this.size)) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
boolean[] zArr = this.array;
if (i2 < zArr.length) {
System.arraycopy(zArr, i, zArr, i + 1, i2 - i);
} else {
boolean[] zArr2 = new boolean[((i2 * 3) / 2) + 1];
System.arraycopy(zArr, 0, zArr2, 0, i);
System.arraycopy(this.array, i, zArr2, i + 1, this.size - i);
this.array = zArr2;
}
this.array[i] = z;
this.size++;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean addAll(Collection<? extends Boolean> collection) {
ensureIsMutable();
Internal.checkNotNull(collection);
if (!(collection instanceof BooleanArrayList)) {
return super.addAll(collection);
}
BooleanArrayList booleanArrayList = (BooleanArrayList) collection;
int i = booleanArrayList.size;
if (i == 0) {
return false;
}
int i2 = this.size;
if (Integer.MAX_VALUE - i2 < i) {
throw new OutOfMemoryError();
}
int i3 = i2 + i;
boolean[] zArr = this.array;
if (i3 > zArr.length) {
this.array = Arrays.copyOf(zArr, i3);
}
System.arraycopy(booleanArrayList.array, 0, this.array, this.size, booleanArrayList.size);
this.size = i3;
((AbstractList) this).modCount++;
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean remove(Object obj) {
ensureIsMutable();
for (int i = 0; i < this.size; i++) {
if (obj.equals(Boolean.valueOf(this.array[i]))) {
boolean[] zArr = this.array;
System.arraycopy(zArr, i + 1, zArr, i, (this.size - i) - 1);
this.size--;
((AbstractList) this).modCount++;
return true;
}
}
return false;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Boolean remove(int i) {
ensureIsMutable();
ensureIndexInRange(i);
boolean[] zArr = this.array;
boolean z = zArr[i];
if (i < this.size - 1) {
System.arraycopy(zArr, i + 1, zArr, i, (r2 - i) - 1);
}
this.size--;
((AbstractList) this).modCount++;
return Boolean.valueOf(z);
}
private void ensureIndexInRange(int i) {
if (i < 0 || i >= this.size) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
}
private String makeOutOfBoundsExceptionMessage(int i) {
return "Index:" + i + ", Size:" + this.size;
}
}

View File

@@ -0,0 +1,26 @@
package androidx.datastore.preferences.protobuf;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
abstract class BufferAllocator {
private static final BufferAllocator UNPOOLED = new BufferAllocator() { // from class: androidx.datastore.preferences.protobuf.BufferAllocator.1
@Override // androidx.datastore.preferences.protobuf.BufferAllocator
public AllocatedBuffer allocateHeapBuffer(int i) {
return AllocatedBuffer.wrap(new byte[i]);
}
@Override // androidx.datastore.preferences.protobuf.BufferAllocator
public AllocatedBuffer allocateDirectBuffer(int i) {
return AllocatedBuffer.wrap(ByteBuffer.allocateDirect(i));
}
};
public static BufferAllocator unpooled() {
return UNPOOLED;
}
public abstract AllocatedBuffer allocateDirectBuffer(int i);
public abstract AllocatedBuffer allocateHeapBuffer(int i);
}

View File

@@ -0,0 +1,119 @@
package androidx.datastore.preferences.protobuf;
import com.firemonkeys.cloudcellapi.LocalNotificationsCenter;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.ref.SoftReference;
import java.nio.ByteBuffer;
import java.nio.channels.WritableByteChannel;
/* loaded from: classes.dex */
final class ByteBufferWriter {
private static final ThreadLocal<SoftReference<byte[]>> BUFFER = new ThreadLocal<>();
private static final float BUFFER_REALLOCATION_THRESHOLD = 0.5f;
private static final long CHANNEL_FIELD_OFFSET;
private static final Class<?> FILE_OUTPUT_STREAM_CLASS;
private static final int MAX_CACHED_BUFFER_SIZE = 16384;
private static final int MIN_CACHED_BUFFER_SIZE = 1024;
private static boolean needToReallocate(int i, int i2) {
return i2 < i && ((float) i2) < ((float) i) * BUFFER_REALLOCATION_THRESHOLD;
}
private ByteBufferWriter() {
}
static {
Class<?> safeGetClass = safeGetClass("java.io.FileOutputStream");
FILE_OUTPUT_STREAM_CLASS = safeGetClass;
CHANNEL_FIELD_OFFSET = getChannelFieldOffset(safeGetClass);
}
public static void clearCachedBuffer() {
BUFFER.set(null);
}
public static void write(ByteBuffer byteBuffer, OutputStream outputStream) throws IOException {
int position = byteBuffer.position();
try {
if (byteBuffer.hasArray()) {
outputStream.write(byteBuffer.array(), byteBuffer.arrayOffset() + byteBuffer.position(), byteBuffer.remaining());
} else if (!writeToChannel(byteBuffer, outputStream)) {
byte[] orCreateBuffer = getOrCreateBuffer(byteBuffer.remaining());
while (byteBuffer.hasRemaining()) {
int min = Math.min(byteBuffer.remaining(), orCreateBuffer.length);
byteBuffer.get(orCreateBuffer, 0, min);
outputStream.write(orCreateBuffer, 0, min);
}
}
byteBuffer.position(position);
} catch (Throwable th) {
byteBuffer.position(position);
throw th;
}
}
private static byte[] getOrCreateBuffer(int i) {
int max = Math.max(i, 1024);
byte[] buffer = getBuffer();
if (buffer == null || needToReallocate(max, buffer.length)) {
buffer = new byte[max];
if (max <= 16384) {
setBuffer(buffer);
}
}
return buffer;
}
private static byte[] getBuffer() {
SoftReference<byte[]> softReference = BUFFER.get();
if (softReference == null) {
return null;
}
return softReference.get();
}
private static void setBuffer(byte[] bArr) {
BUFFER.set(new SoftReference<>(bArr));
}
private static boolean writeToChannel(ByteBuffer byteBuffer, OutputStream outputStream) throws IOException {
WritableByteChannel writableByteChannel;
long j = CHANNEL_FIELD_OFFSET;
if (j < 0 || !FILE_OUTPUT_STREAM_CLASS.isInstance(outputStream)) {
return false;
}
try {
writableByteChannel = (WritableByteChannel) UnsafeUtil.getObject(outputStream, j);
} catch (ClassCastException unused) {
writableByteChannel = null;
}
if (writableByteChannel == null) {
return false;
}
writableByteChannel.write(byteBuffer);
return true;
}
private static Class<?> safeGetClass(String str) {
try {
return Class.forName(str);
} catch (ClassNotFoundException unused) {
return null;
}
}
private static long getChannelFieldOffset(Class<?> cls) {
if (cls == null) {
return -1L;
}
try {
if (UnsafeUtil.hasUnsafeArrayOperations()) {
return UnsafeUtil.objectFieldOffset(cls.getDeclaredField(LocalNotificationsCenter.EXTRA_CHANNEL_ID));
}
return -1L;
} catch (Throwable unused) {
return -1L;
}
}
}

View File

@@ -0,0 +1,17 @@
package androidx.datastore.preferences.protobuf;
import java.io.IOException;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public abstract class ByteOutput {
public abstract void write(byte b) throws IOException;
public abstract void write(ByteBuffer byteBuffer) throws IOException;
public abstract void write(byte[] bArr, int i, int i2) throws IOException;
public abstract void writeLazy(ByteBuffer byteBuffer) throws IOException;
public abstract void writeLazy(byte[] bArr, int i, int i2) throws IOException;
}

View File

@@ -0,0 +1,773 @@
package androidx.datastore.preferences.protobuf;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.UnsupportedCharsetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
/* loaded from: classes.dex */
public abstract class ByteString implements Iterable<Byte>, Serializable {
static final int CONCATENATE_BY_COPY_SIZE = 128;
public static final ByteString EMPTY = new LiteralByteString(Internal.EMPTY_BYTE_ARRAY);
static final int MAX_READ_FROM_CHUNK_SIZE = 8192;
static final int MIN_READ_FROM_CHUNK_SIZE = 256;
private static final int UNSIGNED_BYTE_MASK = 255;
private static final Comparator<ByteString> UNSIGNED_LEXICOGRAPHICAL_COMPARATOR;
private static final ByteArrayCopier byteArrayCopier;
private int hash = 0;
public interface ByteArrayCopier {
byte[] copyFrom(byte[] bArr, int i, int i2);
}
public interface ByteIterator extends Iterator<Byte> {
byte nextByte();
}
/* JADX INFO: Access modifiers changed from: private */
public static int toInt(byte b) {
return b & 255;
}
public static Comparator<ByteString> unsignedLexicographicalComparator() {
return UNSIGNED_LEXICOGRAPHICAL_COMPARATOR;
}
public abstract ByteBuffer asReadOnlyByteBuffer();
public abstract List<ByteBuffer> asReadOnlyByteBufferList();
public abstract byte byteAt(int i);
public abstract void copyTo(ByteBuffer byteBuffer);
public abstract void copyToInternal(byte[] bArr, int i, int i2, int i3);
public abstract boolean equals(Object obj);
public abstract int getTreeDepth();
public abstract byte internalByteAt(int i);
public abstract boolean isBalanced();
public abstract boolean isValidUtf8();
public abstract CodedInputStream newCodedInput();
public abstract InputStream newInput();
public abstract int partialHash(int i, int i2, int i3);
public abstract int partialIsValidUtf8(int i, int i2, int i3);
public final int peekCachedHashCode() {
return this.hash;
}
public abstract int size();
public abstract ByteString substring(int i, int i2);
public abstract String toStringInternal(Charset charset);
public abstract void writeTo(ByteOutput byteOutput) throws IOException;
public abstract void writeTo(OutputStream outputStream) throws IOException;
public abstract void writeToInternal(OutputStream outputStream, int i, int i2) throws IOException;
public abstract void writeToReverse(ByteOutput byteOutput) throws IOException;
static {
byteArrayCopier = Android.isOnAndroidDevice() ? new SystemByteArrayCopier() : new ArraysByteArrayCopier();
UNSIGNED_LEXICOGRAPHICAL_COMPARATOR = new Comparator<ByteString>() { // from class: androidx.datastore.preferences.protobuf.ByteString.2
/* JADX WARN: Type inference failed for: r0v0, types: [androidx.datastore.preferences.protobuf.ByteString$ByteIterator, java.util.Iterator] */
/* JADX WARN: Type inference failed for: r1v0, types: [androidx.datastore.preferences.protobuf.ByteString$ByteIterator, java.util.Iterator] */
@Override // java.util.Comparator
public int compare(ByteString byteString, ByteString byteString2) {
?? iterator2 = byteString.iterator2();
?? iterator22 = byteString2.iterator2();
while (iterator2.hasNext() && iterator22.hasNext()) {
int compare = Integer.compare(ByteString.toInt(iterator2.nextByte()), ByteString.toInt(iterator22.nextByte()));
if (compare != 0) {
return compare;
}
}
return Integer.compare(byteString.size(), byteString2.size());
}
};
}
public static final class SystemByteArrayCopier implements ByteArrayCopier {
private SystemByteArrayCopier() {
}
@Override // androidx.datastore.preferences.protobuf.ByteString.ByteArrayCopier
public byte[] copyFrom(byte[] bArr, int i, int i2) {
byte[] bArr2 = new byte[i2];
System.arraycopy(bArr, i, bArr2, 0, i2);
return bArr2;
}
}
public static final class ArraysByteArrayCopier implements ByteArrayCopier {
private ArraysByteArrayCopier() {
}
@Override // androidx.datastore.preferences.protobuf.ByteString.ByteArrayCopier
public byte[] copyFrom(byte[] bArr, int i, int i2) {
return Arrays.copyOfRange(bArr, i, i2 + i);
}
}
@Override // java.lang.Iterable
/* renamed from: iterator, reason: merged with bridge method [inline-methods] */
public Iterator<Byte> iterator2() {
return new AbstractByteIterator() { // from class: androidx.datastore.preferences.protobuf.ByteString.1
private final int limit;
private int position = 0;
@Override // java.util.Iterator
public boolean hasNext() {
return this.position < this.limit;
}
{
this.limit = ByteString.this.size();
}
@Override // androidx.datastore.preferences.protobuf.ByteString.ByteIterator
public byte nextByte() {
int i = this.position;
if (i >= this.limit) {
throw new NoSuchElementException();
}
this.position = i + 1;
return ByteString.this.internalByteAt(i);
}
};
}
public static abstract class AbstractByteIterator implements ByteIterator {
/* JADX WARN: Can't rename method to resolve collision */
@Override // java.util.Iterator
public final Byte next() {
return Byte.valueOf(nextByte());
}
@Override // java.util.Iterator
public final void remove() {
throw new UnsupportedOperationException();
}
}
public final boolean isEmpty() {
return size() == 0;
}
public final ByteString substring(int i) {
return substring(i, size());
}
public final boolean startsWith(ByteString byteString) {
return size() >= byteString.size() && substring(0, byteString.size()).equals(byteString);
}
public final boolean endsWith(ByteString byteString) {
return size() >= byteString.size() && substring(size() - byteString.size()).equals(byteString);
}
public static ByteString copyFrom(byte[] bArr, int i, int i2) {
checkRange(i, i + i2, bArr.length);
return new LiteralByteString(byteArrayCopier.copyFrom(bArr, i, i2));
}
public static ByteString copyFrom(byte[] bArr) {
return copyFrom(bArr, 0, bArr.length);
}
public static ByteString wrap(ByteBuffer byteBuffer) {
if (byteBuffer.hasArray()) {
return wrap(byteBuffer.array(), byteBuffer.arrayOffset() + byteBuffer.position(), byteBuffer.remaining());
}
return new NioByteString(byteBuffer);
}
public static ByteString wrap(byte[] bArr) {
return new LiteralByteString(bArr);
}
public static ByteString wrap(byte[] bArr, int i, int i2) {
return new BoundedByteString(bArr, i, i2);
}
public static ByteString copyFrom(ByteBuffer byteBuffer, int i) {
checkRange(0, i, byteBuffer.remaining());
byte[] bArr = new byte[i];
byteBuffer.get(bArr);
return new LiteralByteString(bArr);
}
public static ByteString copyFrom(ByteBuffer byteBuffer) {
return copyFrom(byteBuffer, byteBuffer.remaining());
}
public static ByteString copyFrom(String str, String str2) throws UnsupportedEncodingException {
return new LiteralByteString(str.getBytes(str2));
}
public static ByteString copyFrom(String str, Charset charset) {
return new LiteralByteString(str.getBytes(charset));
}
public static ByteString copyFromUtf8(String str) {
return new LiteralByteString(str.getBytes(Internal.UTF_8));
}
public static ByteString readFrom(InputStream inputStream) throws IOException {
return readFrom(inputStream, 256, 8192);
}
public static ByteString readFrom(InputStream inputStream, int i) throws IOException {
return readFrom(inputStream, i, i);
}
public static ByteString readFrom(InputStream inputStream, int i, int i2) throws IOException {
ArrayList arrayList = new ArrayList();
while (true) {
ByteString readChunk = readChunk(inputStream, i);
if (readChunk != null) {
arrayList.add(readChunk);
i = Math.min(i * 2, i2);
} else {
return copyFrom(arrayList);
}
}
}
private static ByteString readChunk(InputStream inputStream, int i) throws IOException {
byte[] bArr = new byte[i];
int i2 = 0;
while (i2 < i) {
int read = inputStream.read(bArr, i2, i - i2);
if (read == -1) {
break;
}
i2 += read;
}
if (i2 == 0) {
return null;
}
return copyFrom(bArr, 0, i2);
}
public final ByteString concat(ByteString byteString) {
if (Integer.MAX_VALUE - size() < byteString.size()) {
throw new IllegalArgumentException("ByteString would be too long: " + size() + "+" + byteString.size());
}
return RopeByteString.concatenate(this, byteString);
}
public static ByteString copyFrom(Iterable<ByteString> iterable) {
int size;
if (!(iterable instanceof Collection)) {
Iterator<ByteString> it = iterable.iterator();
size = 0;
while (it.hasNext()) {
it.next();
size++;
}
} else {
size = ((Collection) iterable).size();
}
return size == 0 ? EMPTY : balancedConcat(iterable.iterator(), size);
}
private static ByteString balancedConcat(Iterator<ByteString> it, int i) {
if (i < 1) {
throw new IllegalArgumentException(String.format("length (%s) must be >= 1", Integer.valueOf(i)));
}
if (i == 1) {
return it.next();
}
int i2 = i >>> 1;
return balancedConcat(it, i2).concat(balancedConcat(it, i - i2));
}
public void copyTo(byte[] bArr, int i) {
copyTo(bArr, 0, i, size());
}
@Deprecated
public final void copyTo(byte[] bArr, int i, int i2, int i3) {
checkRange(i, i + i3, size());
checkRange(i2, i2 + i3, bArr.length);
if (i3 > 0) {
copyToInternal(bArr, i, i2, i3);
}
}
public final byte[] toByteArray() {
int size = size();
if (size == 0) {
return Internal.EMPTY_BYTE_ARRAY;
}
byte[] bArr = new byte[size];
copyToInternal(bArr, 0, 0, size);
return bArr;
}
public final void writeTo(OutputStream outputStream, int i, int i2) throws IOException {
checkRange(i, i + i2, size());
if (i2 > 0) {
writeToInternal(outputStream, i, i2);
}
}
public final String toString(String str) throws UnsupportedEncodingException {
try {
return toString(Charset.forName(str));
} catch (UnsupportedCharsetException e) {
UnsupportedEncodingException unsupportedEncodingException = new UnsupportedEncodingException(str);
unsupportedEncodingException.initCause(e);
throw unsupportedEncodingException;
}
}
public final String toString(Charset charset) {
return size() == 0 ? "" : toStringInternal(charset);
}
public final String toStringUtf8() {
return toString(Internal.UTF_8);
}
public static abstract class LeafByteString extends ByteString {
public abstract boolean equalsRange(ByteString byteString, int i, int i2);
@Override // androidx.datastore.preferences.protobuf.ByteString
public final int getTreeDepth() {
return 0;
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final boolean isBalanced() {
return true;
}
@Override // androidx.datastore.preferences.protobuf.ByteString, java.lang.Iterable
public /* bridge */ /* synthetic */ Iterator<Byte> iterator() {
return super.iterator2();
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public void writeToReverse(ByteOutput byteOutput) throws IOException {
writeTo(byteOutput);
}
}
public final int hashCode() {
int i = this.hash;
if (i == 0) {
int size = size();
i = partialHash(size, 0, size);
if (i == 0) {
i = 1;
}
this.hash = i;
}
return i;
}
public static Output newOutput(int i) {
return new Output(i);
}
public static Output newOutput() {
return new Output(128);
}
public static final class Output extends OutputStream {
private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
private byte[] buffer;
private int bufferPos;
private final ArrayList<ByteString> flushedBuffers;
private int flushedBuffersTotalBytes;
private final int initialCapacity;
public Output(int i) {
if (i < 0) {
throw new IllegalArgumentException("Buffer size < 0");
}
this.initialCapacity = i;
this.flushedBuffers = new ArrayList<>();
this.buffer = new byte[i];
}
@Override // java.io.OutputStream
public synchronized void write(int i) {
try {
if (this.bufferPos == this.buffer.length) {
flushFullBuffer(1);
}
byte[] bArr = this.buffer;
int i2 = this.bufferPos;
this.bufferPos = i2 + 1;
bArr[i2] = (byte) i;
} catch (Throwable th) {
throw th;
}
}
@Override // java.io.OutputStream
public synchronized void write(byte[] bArr, int i, int i2) {
try {
byte[] bArr2 = this.buffer;
int length = bArr2.length;
int i3 = this.bufferPos;
if (i2 <= length - i3) {
System.arraycopy(bArr, i, bArr2, i3, i2);
this.bufferPos += i2;
} else {
int length2 = bArr2.length - i3;
System.arraycopy(bArr, i, bArr2, i3, length2);
int i4 = i2 - length2;
flushFullBuffer(i4);
System.arraycopy(bArr, i + length2, this.buffer, 0, i4);
this.bufferPos = i4;
}
} catch (Throwable th) {
throw th;
}
}
public synchronized ByteString toByteString() {
flushLastBuffer();
return ByteString.copyFrom(this.flushedBuffers);
}
private byte[] copyArray(byte[] bArr, int i) {
byte[] bArr2 = new byte[i];
System.arraycopy(bArr, 0, bArr2, 0, Math.min(bArr.length, i));
return bArr2;
}
public void writeTo(OutputStream outputStream) throws IOException {
ByteString[] byteStringArr;
byte[] bArr;
int i;
synchronized (this) {
ArrayList<ByteString> arrayList = this.flushedBuffers;
byteStringArr = (ByteString[]) arrayList.toArray(new ByteString[arrayList.size()]);
bArr = this.buffer;
i = this.bufferPos;
}
for (ByteString byteString : byteStringArr) {
byteString.writeTo(outputStream);
}
outputStream.write(copyArray(bArr, i));
}
public synchronized int size() {
return this.flushedBuffersTotalBytes + this.bufferPos;
}
public synchronized void reset() {
this.flushedBuffers.clear();
this.flushedBuffersTotalBytes = 0;
this.bufferPos = 0;
}
public String toString() {
return String.format("<ByteString.Output@%s size=%d>", Integer.toHexString(System.identityHashCode(this)), Integer.valueOf(size()));
}
private void flushFullBuffer(int i) {
this.flushedBuffers.add(new LiteralByteString(this.buffer));
int length = this.flushedBuffersTotalBytes + this.buffer.length;
this.flushedBuffersTotalBytes = length;
this.buffer = new byte[Math.max(this.initialCapacity, Math.max(i, length >>> 1))];
this.bufferPos = 0;
}
private void flushLastBuffer() {
int i = this.bufferPos;
byte[] bArr = this.buffer;
if (i >= bArr.length) {
this.flushedBuffers.add(new LiteralByteString(this.buffer));
this.buffer = EMPTY_BYTE_ARRAY;
} else if (i > 0) {
this.flushedBuffers.add(new LiteralByteString(copyArray(bArr, i)));
}
this.flushedBuffersTotalBytes += this.bufferPos;
this.bufferPos = 0;
}
}
public static CodedBuilder newCodedBuilder(int i) {
return new CodedBuilder(i);
}
public static final class CodedBuilder {
private final byte[] buffer;
private final CodedOutputStream output;
public CodedOutputStream getCodedOutput() {
return this.output;
}
private CodedBuilder(int i) {
byte[] bArr = new byte[i];
this.buffer = bArr;
this.output = CodedOutputStream.newInstance(bArr);
}
public ByteString build() {
this.output.checkNoSpaceLeft();
return new LiteralByteString(this.buffer);
}
}
public static void checkIndex(int i, int i2) {
if (((i2 - (i + 1)) | i) < 0) {
if (i < 0) {
throw new ArrayIndexOutOfBoundsException("Index < 0: " + i);
}
throw new ArrayIndexOutOfBoundsException("Index > length: " + i + ", " + i2);
}
}
public static int checkRange(int i, int i2, int i3) {
int i4 = i2 - i;
if ((i | i2 | i4 | (i3 - i2)) >= 0) {
return i4;
}
if (i < 0) {
throw new IndexOutOfBoundsException("Beginning index: " + i + " < 0");
}
if (i2 < i) {
throw new IndexOutOfBoundsException("Beginning index larger than ending index: " + i + ", " + i2);
}
throw new IndexOutOfBoundsException("End index: " + i2 + " >= " + i3);
}
public final String toString() {
return String.format("<ByteString@%s size=%d>", Integer.toHexString(System.identityHashCode(this)), Integer.valueOf(size()));
}
public static class LiteralByteString extends LeafByteString {
private static final long serialVersionUID = 1;
protected final byte[] bytes;
public int getOffsetIntoBytes() {
return 0;
}
public LiteralByteString(byte[] bArr) {
bArr.getClass();
this.bytes = bArr;
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public byte byteAt(int i) {
return this.bytes[i];
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public byte internalByteAt(int i) {
return this.bytes[i];
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public int size() {
return this.bytes.length;
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final ByteString substring(int i, int i2) {
int checkRange = ByteString.checkRange(i, i2, size());
return checkRange == 0 ? ByteString.EMPTY : new BoundedByteString(this.bytes, getOffsetIntoBytes() + i, checkRange);
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public void copyToInternal(byte[] bArr, int i, int i2, int i3) {
System.arraycopy(this.bytes, i, bArr, i2, i3);
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final void copyTo(ByteBuffer byteBuffer) {
byteBuffer.put(this.bytes, getOffsetIntoBytes(), size());
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final ByteBuffer asReadOnlyByteBuffer() {
return ByteBuffer.wrap(this.bytes, getOffsetIntoBytes(), size()).asReadOnlyBuffer();
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final List<ByteBuffer> asReadOnlyByteBufferList() {
return Collections.singletonList(asReadOnlyByteBuffer());
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final void writeTo(OutputStream outputStream) throws IOException {
outputStream.write(toByteArray());
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final void writeToInternal(OutputStream outputStream, int i, int i2) throws IOException {
outputStream.write(this.bytes, getOffsetIntoBytes() + i, i2);
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final void writeTo(ByteOutput byteOutput) throws IOException {
byteOutput.writeLazy(this.bytes, getOffsetIntoBytes(), size());
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final String toStringInternal(Charset charset) {
return new String(this.bytes, getOffsetIntoBytes(), size(), charset);
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final boolean isValidUtf8() {
int offsetIntoBytes = getOffsetIntoBytes();
return Utf8.isValidUtf8(this.bytes, offsetIntoBytes, size() + offsetIntoBytes);
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final int partialIsValidUtf8(int i, int i2, int i3) {
int offsetIntoBytes = getOffsetIntoBytes() + i2;
return Utf8.partialIsValidUtf8(i, this.bytes, offsetIntoBytes, i3 + offsetIntoBytes);
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ByteString) || size() != ((ByteString) obj).size()) {
return false;
}
if (size() == 0) {
return true;
}
if (obj instanceof LiteralByteString) {
LiteralByteString literalByteString = (LiteralByteString) obj;
int peekCachedHashCode = peekCachedHashCode();
int peekCachedHashCode2 = literalByteString.peekCachedHashCode();
if (peekCachedHashCode == 0 || peekCachedHashCode2 == 0 || peekCachedHashCode == peekCachedHashCode2) {
return equalsRange(literalByteString, 0, size());
}
return false;
}
return obj.equals(this);
}
@Override // androidx.datastore.preferences.protobuf.ByteString.LeafByteString
public final boolean equalsRange(ByteString byteString, int i, int i2) {
if (i2 > byteString.size()) {
throw new IllegalArgumentException("Length too large: " + i2 + size());
}
int i3 = i + i2;
if (i3 > byteString.size()) {
throw new IllegalArgumentException("Ran off end of other: " + i + ", " + i2 + ", " + byteString.size());
}
if (byteString instanceof LiteralByteString) {
LiteralByteString literalByteString = (LiteralByteString) byteString;
byte[] bArr = this.bytes;
byte[] bArr2 = literalByteString.bytes;
int offsetIntoBytes = getOffsetIntoBytes() + i2;
int offsetIntoBytes2 = getOffsetIntoBytes();
int offsetIntoBytes3 = literalByteString.getOffsetIntoBytes() + i;
while (offsetIntoBytes2 < offsetIntoBytes) {
if (bArr[offsetIntoBytes2] != bArr2[offsetIntoBytes3]) {
return false;
}
offsetIntoBytes2++;
offsetIntoBytes3++;
}
return true;
}
return byteString.substring(i, i3).equals(substring(0, i2));
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final int partialHash(int i, int i2, int i3) {
return Internal.partialHash(i, this.bytes, getOffsetIntoBytes() + i2, i3);
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final InputStream newInput() {
return new ByteArrayInputStream(this.bytes, getOffsetIntoBytes(), size());
}
@Override // androidx.datastore.preferences.protobuf.ByteString
public final CodedInputStream newCodedInput() {
return CodedInputStream.newInstance(this.bytes, getOffsetIntoBytes(), size(), true);
}
}
public static final class BoundedByteString extends LiteralByteString {
private static final long serialVersionUID = 1;
private final int bytesLength;
private final int bytesOffset;
@Override // androidx.datastore.preferences.protobuf.ByteString.LiteralByteString
public int getOffsetIntoBytes() {
return this.bytesOffset;
}
@Override // androidx.datastore.preferences.protobuf.ByteString.LiteralByteString, androidx.datastore.preferences.protobuf.ByteString
public int size() {
return this.bytesLength;
}
public BoundedByteString(byte[] bArr, int i, int i2) {
super(bArr);
ByteString.checkRange(i, i + i2, bArr.length);
this.bytesOffset = i;
this.bytesLength = i2;
}
@Override // androidx.datastore.preferences.protobuf.ByteString.LiteralByteString, androidx.datastore.preferences.protobuf.ByteString
public byte byteAt(int i) {
ByteString.checkIndex(i, size());
return this.bytes[this.bytesOffset + i];
}
@Override // androidx.datastore.preferences.protobuf.ByteString.LiteralByteString, androidx.datastore.preferences.protobuf.ByteString
public byte internalByteAt(int i) {
return this.bytes[this.bytesOffset + i];
}
@Override // androidx.datastore.preferences.protobuf.ByteString.LiteralByteString, androidx.datastore.preferences.protobuf.ByteString
public void copyToInternal(byte[] bArr, int i, int i2, int i3) {
System.arraycopy(this.bytes, getOffsetIntoBytes() + i, bArr, i2, i3);
}
public Object writeReplace() {
return ByteString.wrap(toByteArray());
}
private void readObject(ObjectInputStream objectInputStream) throws IOException {
throw new InvalidObjectException("BoundedByteStream instances are not to be serialized directly");
}
}
}

View File

@@ -0,0 +1,208 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class BytesValue extends GeneratedMessageLite<BytesValue, Builder> implements BytesValueOrBuilder {
private static final BytesValue DEFAULT_INSTANCE;
private static volatile Parser<BytesValue> PARSER = null;
public static final int VALUE_FIELD_NUMBER = 1;
private ByteString value_ = ByteString.EMPTY;
public static BytesValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@Override // androidx.datastore.preferences.protobuf.BytesValueOrBuilder
public ByteString getValue() {
return this.value_;
}
private BytesValue() {
}
/* JADX INFO: Access modifiers changed from: private */
public void setValue(ByteString byteString) {
byteString.getClass();
this.value_ = byteString;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearValue() {
this.value_ = getDefaultInstance().getValue();
}
public static BytesValue parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static BytesValue parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static BytesValue parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static BytesValue parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static BytesValue parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static BytesValue parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static BytesValue parseFrom(InputStream inputStream) throws IOException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static BytesValue parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static BytesValue parseDelimitedFrom(InputStream inputStream) throws IOException {
return (BytesValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static BytesValue parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (BytesValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static BytesValue parseFrom(CodedInputStream codedInputStream) throws IOException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static BytesValue parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (BytesValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(BytesValue bytesValue) {
return DEFAULT_INSTANCE.createBuilder(bytesValue);
}
public static final class Builder extends GeneratedMessageLite.Builder<BytesValue, Builder> implements BytesValueOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(BytesValue.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.BytesValueOrBuilder
public ByteString getValue() {
return ((BytesValue) this.instance).getValue();
}
public Builder setValue(ByteString byteString) {
copyOnWrite();
((BytesValue) this.instance).setValue(byteString);
return this;
}
public Builder clearValue() {
copyOnWrite();
((BytesValue) this.instance).clearValue();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.BytesValue$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new BytesValue();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\n", new Object[]{"value_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<BytesValue> parser = PARSER;
if (parser == null) {
synchronized (BytesValue.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
BytesValue bytesValue = new BytesValue();
DEFAULT_INSTANCE = bytesValue;
GeneratedMessageLite.registerDefaultInstance(BytesValue.class, bytesValue);
}
public static BytesValue of(ByteString byteString) {
return newBuilder().setValue(byteString).build();
}
public static Parser<BytesValue> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,6 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface BytesValueOrBuilder extends MessageLiteOrBuilder {
ByteString getValue();
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,691 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.MapEntryLite;
import androidx.datastore.preferences.protobuf.WireFormat;
import androidx.datastore.preferences.protobuf.Writer;
import java.io.IOException;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
final class CodedOutputStreamWriter implements Writer {
private final CodedOutputStream output;
public static CodedOutputStreamWriter forCodedOutput(CodedOutputStream codedOutputStream) {
CodedOutputStreamWriter codedOutputStreamWriter = codedOutputStream.wrapper;
return codedOutputStreamWriter != null ? codedOutputStreamWriter : new CodedOutputStreamWriter(codedOutputStream);
}
private CodedOutputStreamWriter(CodedOutputStream codedOutputStream) {
CodedOutputStream codedOutputStream2 = (CodedOutputStream) Internal.checkNotNull(codedOutputStream, "output");
this.output = codedOutputStream2;
codedOutputStream2.wrapper = this;
}
@Override // androidx.datastore.preferences.protobuf.Writer
public Writer.FieldOrder fieldOrder() {
return Writer.FieldOrder.ASCENDING;
}
public int getTotalBytesWritten() {
return this.output.getTotalBytesWritten();
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeSFixed32(int i, int i2) throws IOException {
this.output.writeSFixed32(i, i2);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeInt64(int i, long j) throws IOException {
this.output.writeInt64(i, j);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeSFixed64(int i, long j) throws IOException {
this.output.writeSFixed64(i, j);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeFloat(int i, float f) throws IOException {
this.output.writeFloat(i, f);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeDouble(int i, double d) throws IOException {
this.output.writeDouble(i, d);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeEnum(int i, int i2) throws IOException {
this.output.writeEnum(i, i2);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeUInt64(int i, long j) throws IOException {
this.output.writeUInt64(i, j);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeInt32(int i, int i2) throws IOException {
this.output.writeInt32(i, i2);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeFixed64(int i, long j) throws IOException {
this.output.writeFixed64(i, j);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeFixed32(int i, int i2) throws IOException {
this.output.writeFixed32(i, i2);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeBool(int i, boolean z) throws IOException {
this.output.writeBool(i, z);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeString(int i, String str) throws IOException {
this.output.writeString(i, str);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeBytes(int i, ByteString byteString) throws IOException {
this.output.writeBytes(i, byteString);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeUInt32(int i, int i2) throws IOException {
this.output.writeUInt32(i, i2);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeSInt32(int i, int i2) throws IOException {
this.output.writeSInt32(i, i2);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeSInt64(int i, long j) throws IOException {
this.output.writeSInt64(i, j);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeMessage(int i, Object obj) throws IOException {
this.output.writeMessage(i, (MessageLite) obj);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeMessage(int i, Object obj, Schema schema) throws IOException {
this.output.writeMessage(i, (MessageLite) obj, schema);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeGroup(int i, Object obj) throws IOException {
this.output.writeGroup(i, (MessageLite) obj);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeGroup(int i, Object obj, Schema schema) throws IOException {
this.output.writeGroup(i, (MessageLite) obj, schema);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeStartGroup(int i) throws IOException {
this.output.writeTag(i, 3);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeEndGroup(int i) throws IOException {
this.output.writeTag(i, 4);
}
@Override // androidx.datastore.preferences.protobuf.Writer
public final void writeMessageSetItem(int i, Object obj) throws IOException {
if (obj instanceof ByteString) {
this.output.writeRawMessageSetExtension(i, (ByteString) obj);
} else {
this.output.writeMessageSetExtension(i, (MessageLite) obj);
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeInt32List(int i, List<Integer> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeInt32SizeNoTag(list.get(i4).intValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeInt32NoTag(list.get(i2).intValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeInt32(i, list.get(i2).intValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeFixed32List(int i, List<Integer> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeFixed32SizeNoTag(list.get(i4).intValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeFixed32NoTag(list.get(i2).intValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeFixed32(i, list.get(i2).intValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeInt64List(int i, List<Long> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeInt64SizeNoTag(list.get(i4).longValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeInt64NoTag(list.get(i2).longValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeInt64(i, list.get(i2).longValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeUInt64List(int i, List<Long> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeUInt64SizeNoTag(list.get(i4).longValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeUInt64NoTag(list.get(i2).longValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeUInt64(i, list.get(i2).longValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeFixed64List(int i, List<Long> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeFixed64SizeNoTag(list.get(i4).longValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeFixed64NoTag(list.get(i2).longValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeFixed64(i, list.get(i2).longValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeFloatList(int i, List<Float> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeFloatSizeNoTag(list.get(i4).floatValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeFloatNoTag(list.get(i2).floatValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeFloat(i, list.get(i2).floatValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeDoubleList(int i, List<Double> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeDoubleSizeNoTag(list.get(i4).doubleValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeDoubleNoTag(list.get(i2).doubleValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeDouble(i, list.get(i2).doubleValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeEnumList(int i, List<Integer> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeEnumSizeNoTag(list.get(i4).intValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeEnumNoTag(list.get(i2).intValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeEnum(i, list.get(i2).intValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeBoolList(int i, List<Boolean> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeBoolSizeNoTag(list.get(i4).booleanValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeBoolNoTag(list.get(i2).booleanValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeBool(i, list.get(i2).booleanValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeStringList(int i, List<String> list) throws IOException {
int i2 = 0;
if (list instanceof LazyStringList) {
LazyStringList lazyStringList = (LazyStringList) list;
while (i2 < list.size()) {
writeLazyString(i, lazyStringList.getRaw(i2));
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeString(i, list.get(i2));
i2++;
}
}
private void writeLazyString(int i, Object obj) throws IOException {
if (obj instanceof String) {
this.output.writeString(i, (String) obj);
} else {
this.output.writeBytes(i, (ByteString) obj);
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeBytesList(int i, List<ByteString> list) throws IOException {
for (int i2 = 0; i2 < list.size(); i2++) {
this.output.writeBytes(i, list.get(i2));
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeUInt32List(int i, List<Integer> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeUInt32SizeNoTag(list.get(i4).intValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeUInt32NoTag(list.get(i2).intValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeUInt32(i, list.get(i2).intValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeSFixed32List(int i, List<Integer> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeSFixed32SizeNoTag(list.get(i4).intValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeSFixed32NoTag(list.get(i2).intValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeSFixed32(i, list.get(i2).intValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeSFixed64List(int i, List<Long> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeSFixed64SizeNoTag(list.get(i4).longValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeSFixed64NoTag(list.get(i2).longValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeSFixed64(i, list.get(i2).longValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeSInt32List(int i, List<Integer> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeSInt32SizeNoTag(list.get(i4).intValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeSInt32NoTag(list.get(i2).intValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeSInt32(i, list.get(i2).intValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeSInt64List(int i, List<Long> list, boolean z) throws IOException {
int i2 = 0;
if (z) {
this.output.writeTag(i, 2);
int i3 = 0;
for (int i4 = 0; i4 < list.size(); i4++) {
i3 += CodedOutputStream.computeSInt64SizeNoTag(list.get(i4).longValue());
}
this.output.writeUInt32NoTag(i3);
while (i2 < list.size()) {
this.output.writeSInt64NoTag(list.get(i2).longValue());
i2++;
}
return;
}
while (i2 < list.size()) {
this.output.writeSInt64(i, list.get(i2).longValue());
i2++;
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeMessageList(int i, List<?> list) throws IOException {
for (int i2 = 0; i2 < list.size(); i2++) {
writeMessage(i, list.get(i2));
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeMessageList(int i, List<?> list, Schema schema) throws IOException {
for (int i2 = 0; i2 < list.size(); i2++) {
writeMessage(i, list.get(i2), schema);
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeGroupList(int i, List<?> list) throws IOException {
for (int i2 = 0; i2 < list.size(); i2++) {
writeGroup(i, list.get(i2));
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public void writeGroupList(int i, List<?> list, Schema schema) throws IOException {
for (int i2 = 0; i2 < list.size(); i2++) {
writeGroup(i, list.get(i2), schema);
}
}
@Override // androidx.datastore.preferences.protobuf.Writer
public <K, V> void writeMap(int i, MapEntryLite.Metadata<K, V> metadata, Map<K, V> map) throws IOException {
if (this.output.isSerializationDeterministic()) {
writeDeterministicMap(i, metadata, map);
return;
}
for (Map.Entry<K, V> entry : map.entrySet()) {
this.output.writeTag(i, 2);
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, entry.getKey(), entry.getValue()));
MapEntryLite.writeTo(this.output, metadata, entry.getKey(), entry.getValue());
}
}
/* renamed from: androidx.datastore.preferences.protobuf.CodedOutputStreamWriter$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$FieldType;
static {
int[] iArr = new int[WireFormat.FieldType.values().length];
$SwitchMap$com$google$protobuf$WireFormat$FieldType = iArr;
try {
iArr[WireFormat.FieldType.BOOL.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED32.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT32.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED32.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT32.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT32.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED64.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT64.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED64.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT64.ordinal()] = 10;
} catch (NoSuchFieldError unused10) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT64.ordinal()] = 11;
} catch (NoSuchFieldError unused11) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.STRING.ordinal()] = 12;
} catch (NoSuchFieldError unused12) {
}
}
}
private <K, V> void writeDeterministicMap(int i, MapEntryLite.Metadata<K, V> metadata, Map<K, V> map) throws IOException {
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[metadata.keyType.ordinal()]) {
case 1:
V v = map.get(Boolean.FALSE);
if (v != null) {
writeDeterministicBooleanMapEntry(i, false, v, metadata);
}
V v2 = map.get(Boolean.TRUE);
if (v2 != null) {
writeDeterministicBooleanMapEntry(i, true, v2, metadata);
return;
}
return;
case 2:
case 3:
case 4:
case 5:
case 6:
writeDeterministicIntegerMap(i, metadata, map);
return;
case 7:
case 8:
case 9:
case 10:
case 11:
writeDeterministicLongMap(i, metadata, map);
return;
case 12:
writeDeterministicStringMap(i, metadata, map);
return;
default:
throw new IllegalArgumentException("does not support key type: " + metadata.keyType);
}
}
private <V> void writeDeterministicBooleanMapEntry(int i, boolean z, V v, MapEntryLite.Metadata<Boolean, V> metadata) throws IOException {
this.output.writeTag(i, 2);
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, Boolean.valueOf(z), v));
MapEntryLite.writeTo(this.output, metadata, Boolean.valueOf(z), v);
}
private <V> void writeDeterministicIntegerMap(int i, MapEntryLite.Metadata<Integer, V> metadata, Map<Integer, V> map) throws IOException {
int size = map.size();
int[] iArr = new int[size];
Iterator<Integer> it = map.keySet().iterator();
int i2 = 0;
while (it.hasNext()) {
iArr[i2] = it.next().intValue();
i2++;
}
Arrays.sort(iArr);
for (int i3 = 0; i3 < size; i3++) {
int i4 = iArr[i3];
V v = map.get(Integer.valueOf(i4));
this.output.writeTag(i, 2);
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, Integer.valueOf(i4), v));
MapEntryLite.writeTo(this.output, metadata, Integer.valueOf(i4), v);
}
}
private <V> void writeDeterministicLongMap(int i, MapEntryLite.Metadata<Long, V> metadata, Map<Long, V> map) throws IOException {
int size = map.size();
long[] jArr = new long[size];
Iterator<Long> it = map.keySet().iterator();
int i2 = 0;
while (it.hasNext()) {
jArr[i2] = it.next().longValue();
i2++;
}
Arrays.sort(jArr);
for (int i3 = 0; i3 < size; i3++) {
long j = jArr[i3];
V v = map.get(Long.valueOf(j));
this.output.writeTag(i, 2);
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, Long.valueOf(j), v));
MapEntryLite.writeTo(this.output, metadata, Long.valueOf(j), v);
}
}
private <V> void writeDeterministicStringMap(int i, MapEntryLite.Metadata<String, V> metadata, Map<String, V> map) throws IOException {
int size = map.size();
String[] strArr = new String[size];
Iterator<String> it = map.keySet().iterator();
int i2 = 0;
while (it.hasNext()) {
strArr[i2] = it.next();
i2++;
}
Arrays.sort(strArr);
for (int i3 = 0; i3 < size; i3++) {
String str = strArr[i3];
V v = map.get(str);
this.output.writeTag(i, 2);
this.output.writeUInt32NoTag(MapEntryLite.computeSerializedSize(metadata, str, v));
MapEntryLite.writeTo(this.output, metadata, str, v);
}
}
}

View File

@@ -0,0 +1,228 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
import java.util.AbstractList;
import java.util.Arrays;
import java.util.Collection;
import java.util.RandomAccess;
/* loaded from: classes.dex */
final class DoubleArrayList extends AbstractProtobufList<Double> implements Internal.DoubleList, RandomAccess, PrimitiveNonBoxingCollection {
private static final DoubleArrayList EMPTY_LIST;
private double[] array;
private int size;
public static DoubleArrayList emptyList() {
return EMPTY_LIST;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public int size() {
return this.size;
}
static {
DoubleArrayList doubleArrayList = new DoubleArrayList(new double[0], 0);
EMPTY_LIST = doubleArrayList;
doubleArrayList.makeImmutable();
}
public DoubleArrayList() {
this(new double[10], 0);
}
private DoubleArrayList(double[] dArr, int i) {
this.array = dArr;
this.size = i;
}
@Override // java.util.AbstractList
public void removeRange(int i, int i2) {
ensureIsMutable();
if (i2 < i) {
throw new IndexOutOfBoundsException("toIndex < fromIndex");
}
double[] dArr = this.array;
System.arraycopy(dArr, i2, dArr, i, this.size - i2);
this.size -= i2 - i;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof DoubleArrayList)) {
return super.equals(obj);
}
DoubleArrayList doubleArrayList = (DoubleArrayList) obj;
if (this.size != doubleArrayList.size) {
return false;
}
double[] dArr = doubleArrayList.array;
for (int i = 0; i < this.size; i++) {
if (Double.doubleToLongBits(this.array[i]) != Double.doubleToLongBits(dArr[i])) {
return false;
}
}
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public int hashCode() {
int i = 1;
for (int i2 = 0; i2 < this.size; i2++) {
i = (i * 31) + Internal.hashLong(Double.doubleToLongBits(this.array[i2]));
}
return i;
}
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
/* renamed from: mutableCopyWithCapacity */
public Internal.ProtobufList<Double> mutableCopyWithCapacity2(int i) {
if (i < this.size) {
throw new IllegalArgumentException();
}
return new DoubleArrayList(Arrays.copyOf(this.array, i), this.size);
}
@Override // java.util.AbstractList, java.util.List
public Double get(int i) {
return Double.valueOf(getDouble(i));
}
@Override // androidx.datastore.preferences.protobuf.Internal.DoubleList
public double getDouble(int i) {
ensureIndexInRange(i);
return this.array[i];
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Double set(int i, Double d) {
return Double.valueOf(setDouble(i, d.doubleValue()));
}
@Override // androidx.datastore.preferences.protobuf.Internal.DoubleList
public double setDouble(int i, double d) {
ensureIsMutable();
ensureIndexInRange(i);
double[] dArr = this.array;
double d2 = dArr[i];
dArr[i] = d;
return d2;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean add(Double d) {
addDouble(d.doubleValue());
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public void add(int i, Double d) {
addDouble(i, d.doubleValue());
}
@Override // androidx.datastore.preferences.protobuf.Internal.DoubleList
public void addDouble(double d) {
ensureIsMutable();
int i = this.size;
double[] dArr = this.array;
if (i == dArr.length) {
double[] dArr2 = new double[((i * 3) / 2) + 1];
System.arraycopy(dArr, 0, dArr2, 0, i);
this.array = dArr2;
}
double[] dArr3 = this.array;
int i2 = this.size;
this.size = i2 + 1;
dArr3[i2] = d;
}
private void addDouble(int i, double d) {
int i2;
ensureIsMutable();
if (i < 0 || i > (i2 = this.size)) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
double[] dArr = this.array;
if (i2 < dArr.length) {
System.arraycopy(dArr, i, dArr, i + 1, i2 - i);
} else {
double[] dArr2 = new double[((i2 * 3) / 2) + 1];
System.arraycopy(dArr, 0, dArr2, 0, i);
System.arraycopy(this.array, i, dArr2, i + 1, this.size - i);
this.array = dArr2;
}
this.array[i] = d;
this.size++;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean addAll(Collection<? extends Double> collection) {
ensureIsMutable();
Internal.checkNotNull(collection);
if (!(collection instanceof DoubleArrayList)) {
return super.addAll(collection);
}
DoubleArrayList doubleArrayList = (DoubleArrayList) collection;
int i = doubleArrayList.size;
if (i == 0) {
return false;
}
int i2 = this.size;
if (Integer.MAX_VALUE - i2 < i) {
throw new OutOfMemoryError();
}
int i3 = i2 + i;
double[] dArr = this.array;
if (i3 > dArr.length) {
this.array = Arrays.copyOf(dArr, i3);
}
System.arraycopy(doubleArrayList.array, 0, this.array, this.size, doubleArrayList.size);
this.size = i3;
((AbstractList) this).modCount++;
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean remove(Object obj) {
ensureIsMutable();
for (int i = 0; i < this.size; i++) {
if (obj.equals(Double.valueOf(this.array[i]))) {
double[] dArr = this.array;
System.arraycopy(dArr, i + 1, dArr, i, (this.size - i) - 1);
this.size--;
((AbstractList) this).modCount++;
return true;
}
}
return false;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Double remove(int i) {
ensureIsMutable();
ensureIndexInRange(i);
double[] dArr = this.array;
double d = dArr[i];
if (i < this.size - 1) {
System.arraycopy(dArr, i + 1, dArr, i, (r3 - i) - 1);
}
this.size--;
((AbstractList) this).modCount++;
return Double.valueOf(d);
}
private void ensureIndexInRange(int i) {
if (i < 0 || i >= this.size) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
}
private String makeOutOfBoundsExceptionMessage(int i) {
return "Index:" + i + ", Size:" + this.size;
}
}

View File

@@ -0,0 +1,207 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class DoubleValue extends GeneratedMessageLite<DoubleValue, Builder> implements DoubleValueOrBuilder {
private static final DoubleValue DEFAULT_INSTANCE;
private static volatile Parser<DoubleValue> PARSER = null;
public static final int VALUE_FIELD_NUMBER = 1;
private double value_;
/* JADX INFO: Access modifiers changed from: private */
public void clearValue() {
this.value_ = 0.0d;
}
public static DoubleValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setValue(double d) {
this.value_ = d;
}
@Override // androidx.datastore.preferences.protobuf.DoubleValueOrBuilder
public double getValue() {
return this.value_;
}
private DoubleValue() {
}
public static DoubleValue parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static DoubleValue parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static DoubleValue parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static DoubleValue parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static DoubleValue parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static DoubleValue parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static DoubleValue parseFrom(InputStream inputStream) throws IOException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static DoubleValue parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static DoubleValue parseDelimitedFrom(InputStream inputStream) throws IOException {
return (DoubleValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static DoubleValue parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (DoubleValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static DoubleValue parseFrom(CodedInputStream codedInputStream) throws IOException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static DoubleValue parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (DoubleValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(DoubleValue doubleValue) {
return DEFAULT_INSTANCE.createBuilder(doubleValue);
}
public static final class Builder extends GeneratedMessageLite.Builder<DoubleValue, Builder> implements DoubleValueOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(DoubleValue.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.DoubleValueOrBuilder
public double getValue() {
return ((DoubleValue) this.instance).getValue();
}
public Builder setValue(double d) {
copyOnWrite();
((DoubleValue) this.instance).setValue(d);
return this;
}
public Builder clearValue() {
copyOnWrite();
((DoubleValue) this.instance).clearValue();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.DoubleValue$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new DoubleValue();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0000", new Object[]{"value_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<DoubleValue> parser = PARSER;
if (parser == null) {
synchronized (DoubleValue.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
DoubleValue doubleValue = new DoubleValue();
DEFAULT_INSTANCE = doubleValue;
GeneratedMessageLite.registerDefaultInstance(DoubleValue.class, doubleValue);
}
public static DoubleValue of(double d) {
return newBuilder().setValue(d).build();
}
public static Parser<DoubleValue> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,6 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface DoubleValueOrBuilder extends MessageLiteOrBuilder {
double getValue();
}

View File

@@ -0,0 +1,237 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class Duration extends GeneratedMessageLite<Duration, Builder> implements DurationOrBuilder {
private static final Duration DEFAULT_INSTANCE;
public static final int NANOS_FIELD_NUMBER = 2;
private static volatile Parser<Duration> PARSER = null;
public static final int SECONDS_FIELD_NUMBER = 1;
private int nanos_;
private long seconds_;
/* JADX INFO: Access modifiers changed from: private */
public void clearNanos() {
this.nanos_ = 0;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearSeconds() {
this.seconds_ = 0L;
}
public static Duration getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setNanos(int i) {
this.nanos_ = i;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSeconds(long j) {
this.seconds_ = j;
}
@Override // androidx.datastore.preferences.protobuf.DurationOrBuilder
public int getNanos() {
return this.nanos_;
}
@Override // androidx.datastore.preferences.protobuf.DurationOrBuilder
public long getSeconds() {
return this.seconds_;
}
private Duration() {
}
public static Duration parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static Duration parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static Duration parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static Duration parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static Duration parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static Duration parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static Duration parseFrom(InputStream inputStream) throws IOException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static Duration parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Duration parseDelimitedFrom(InputStream inputStream) throws IOException {
return (Duration) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static Duration parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Duration) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Duration parseFrom(CodedInputStream codedInputStream) throws IOException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static Duration parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Duration) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Duration duration) {
return DEFAULT_INSTANCE.createBuilder(duration);
}
public static final class Builder extends GeneratedMessageLite.Builder<Duration, Builder> implements DurationOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(Duration.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.DurationOrBuilder
public long getSeconds() {
return ((Duration) this.instance).getSeconds();
}
public Builder setSeconds(long j) {
copyOnWrite();
((Duration) this.instance).setSeconds(j);
return this;
}
public Builder clearSeconds() {
copyOnWrite();
((Duration) this.instance).clearSeconds();
return this;
}
@Override // androidx.datastore.preferences.protobuf.DurationOrBuilder
public int getNanos() {
return ((Duration) this.instance).getNanos();
}
public Builder setNanos(int i) {
copyOnWrite();
((Duration) this.instance).setNanos(i);
return this;
}
public Builder clearNanos() {
copyOnWrite();
((Duration) this.instance).clearNanos();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.Duration$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new Duration();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0002\u0002\u0004", new Object[]{"seconds_", "nanos_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<Duration> parser = PARSER;
if (parser == null) {
synchronized (Duration.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
Duration duration = new Duration();
DEFAULT_INSTANCE = duration;
GeneratedMessageLite.registerDefaultInstance(Duration.class, duration);
}
public static Parser<Duration> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,8 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface DurationOrBuilder extends MessageLiteOrBuilder {
int getNanos();
long getSeconds();
}

View File

@@ -0,0 +1,10 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public final class DurationProto {
public static void registerAllExtensions(ExtensionRegistryLite extensionRegistryLite) {
}
private DurationProto() {
}
}

View File

@@ -0,0 +1,169 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class Empty extends GeneratedMessageLite<Empty, Builder> implements EmptyOrBuilder {
private static final Empty DEFAULT_INSTANCE;
private static volatile Parser<Empty> PARSER;
public static Empty getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private Empty() {
}
public static Empty parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static Empty parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static Empty parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static Empty parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static Empty parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static Empty parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static Empty parseFrom(InputStream inputStream) throws IOException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static Empty parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Empty parseDelimitedFrom(InputStream inputStream) throws IOException {
return (Empty) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static Empty parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Empty) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Empty parseFrom(CodedInputStream codedInputStream) throws IOException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static Empty parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Empty) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Empty empty) {
return DEFAULT_INSTANCE.createBuilder(empty);
}
public static final class Builder extends GeneratedMessageLite.Builder<Empty, Builder> implements EmptyOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(Empty.DEFAULT_INSTANCE);
}
}
/* renamed from: androidx.datastore.preferences.protobuf.Empty$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new Empty();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0000", null);
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<Empty> parser = PARSER;
if (parser == null) {
synchronized (Empty.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
Empty empty = new Empty();
DEFAULT_INSTANCE = empty;
GeneratedMessageLite.registerDefaultInstance(Empty.class, empty);
}
public static Parser<Empty> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,5 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface EmptyOrBuilder extends MessageLiteOrBuilder {
}

View File

@@ -0,0 +1,10 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public final class EmptyProto {
public static void registerAllExtensions(ExtensionRegistryLite extensionRegistryLite) {
}
private EmptyProto() {
}
}

View File

@@ -0,0 +1,678 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.EnumValue;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.Internal;
import androidx.datastore.preferences.protobuf.Option;
import androidx.datastore.preferences.protobuf.SourceContext;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class Enum extends GeneratedMessageLite<Enum, Builder> implements EnumOrBuilder {
private static final Enum DEFAULT_INSTANCE;
public static final int ENUMVALUE_FIELD_NUMBER = 2;
public static final int NAME_FIELD_NUMBER = 1;
public static final int OPTIONS_FIELD_NUMBER = 3;
private static volatile Parser<Enum> PARSER = null;
public static final int SOURCE_CONTEXT_FIELD_NUMBER = 4;
public static final int SYNTAX_FIELD_NUMBER = 5;
private SourceContext sourceContext_;
private int syntax_;
private String name_ = "";
private Internal.ProtobufList<EnumValue> enumvalue_ = GeneratedMessageLite.emptyProtobufList();
private Internal.ProtobufList<Option> options_ = GeneratedMessageLite.emptyProtobufList();
/* JADX INFO: Access modifiers changed from: private */
public void clearSourceContext() {
this.sourceContext_ = null;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearSyntax() {
this.syntax_ = 0;
}
public static Enum getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSyntaxValue(int i) {
this.syntax_ = i;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public List<EnumValue> getEnumvalueList() {
return this.enumvalue_;
}
public List<? extends EnumValueOrBuilder> getEnumvalueOrBuilderList() {
return this.enumvalue_;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public String getName() {
return this.name_;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public List<Option> getOptionsList() {
return this.options_;
}
public List<? extends OptionOrBuilder> getOptionsOrBuilderList() {
return this.options_;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public int getSyntaxValue() {
return this.syntax_;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public boolean hasSourceContext() {
return this.sourceContext_ != null;
}
private Enum() {
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public ByteString getNameBytes() {
return ByteString.copyFromUtf8(this.name_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setName(String str) {
str.getClass();
this.name_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearName() {
this.name_ = getDefaultInstance().getName();
}
/* JADX INFO: Access modifiers changed from: private */
public void setNameBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.name_ = byteString.toStringUtf8();
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public int getEnumvalueCount() {
return this.enumvalue_.size();
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public EnumValue getEnumvalue(int i) {
return this.enumvalue_.get(i);
}
public EnumValueOrBuilder getEnumvalueOrBuilder(int i) {
return this.enumvalue_.get(i);
}
private void ensureEnumvalueIsMutable() {
if (this.enumvalue_.isModifiable()) {
return;
}
this.enumvalue_ = GeneratedMessageLite.mutableCopy(this.enumvalue_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setEnumvalue(int i, EnumValue enumValue) {
enumValue.getClass();
ensureEnumvalueIsMutable();
this.enumvalue_.set(i, enumValue);
}
/* JADX INFO: Access modifiers changed from: private */
public void setEnumvalue(int i, EnumValue.Builder builder) {
ensureEnumvalueIsMutable();
this.enumvalue_.set(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addEnumvalue(EnumValue enumValue) {
enumValue.getClass();
ensureEnumvalueIsMutable();
this.enumvalue_.add(enumValue);
}
/* JADX INFO: Access modifiers changed from: private */
public void addEnumvalue(int i, EnumValue enumValue) {
enumValue.getClass();
ensureEnumvalueIsMutable();
this.enumvalue_.add(i, enumValue);
}
/* JADX INFO: Access modifiers changed from: private */
public void addEnumvalue(EnumValue.Builder builder) {
ensureEnumvalueIsMutable();
this.enumvalue_.add(builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addEnumvalue(int i, EnumValue.Builder builder) {
ensureEnumvalueIsMutable();
this.enumvalue_.add(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllEnumvalue(Iterable<? extends EnumValue> iterable) {
ensureEnumvalueIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.enumvalue_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearEnumvalue() {
this.enumvalue_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void removeEnumvalue(int i) {
ensureEnumvalueIsMutable();
this.enumvalue_.remove(i);
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public int getOptionsCount() {
return this.options_.size();
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public Option getOptions(int i) {
return this.options_.get(i);
}
public OptionOrBuilder getOptionsOrBuilder(int i) {
return this.options_.get(i);
}
private void ensureOptionsIsMutable() {
if (this.options_.isModifiable()) {
return;
}
this.options_ = GeneratedMessageLite.mutableCopy(this.options_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setOptions(int i, Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.set(i, option);
}
/* JADX INFO: Access modifiers changed from: private */
public void setOptions(int i, Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.set(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.add(option);
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(int i, Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.add(i, option);
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.add(builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(int i, Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.add(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllOptions(Iterable<? extends Option> iterable) {
ensureOptionsIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.options_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearOptions() {
this.options_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void removeOptions(int i) {
ensureOptionsIsMutable();
this.options_.remove(i);
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public SourceContext getSourceContext() {
SourceContext sourceContext = this.sourceContext_;
return sourceContext == null ? SourceContext.getDefaultInstance() : sourceContext;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSourceContext(SourceContext sourceContext) {
sourceContext.getClass();
this.sourceContext_ = sourceContext;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSourceContext(SourceContext.Builder builder) {
this.sourceContext_ = builder.build();
}
/* JADX INFO: Access modifiers changed from: private */
public void mergeSourceContext(SourceContext sourceContext) {
sourceContext.getClass();
SourceContext sourceContext2 = this.sourceContext_;
if (sourceContext2 == null || sourceContext2 == SourceContext.getDefaultInstance()) {
this.sourceContext_ = sourceContext;
} else {
this.sourceContext_ = SourceContext.newBuilder(this.sourceContext_).mergeFrom((SourceContext.Builder) sourceContext).buildPartial();
}
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public Syntax getSyntax() {
Syntax forNumber = Syntax.forNumber(this.syntax_);
return forNumber == null ? Syntax.UNRECOGNIZED : forNumber;
}
/* JADX INFO: Access modifiers changed from: private */
public void setSyntax(Syntax syntax) {
syntax.getClass();
this.syntax_ = syntax.getNumber();
}
public static Enum parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static Enum parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static Enum parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static Enum parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static Enum parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static Enum parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static Enum parseFrom(InputStream inputStream) throws IOException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static Enum parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Enum parseDelimitedFrom(InputStream inputStream) throws IOException {
return (Enum) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static Enum parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Enum) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Enum parseFrom(CodedInputStream codedInputStream) throws IOException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static Enum parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Enum) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Enum r1) {
return DEFAULT_INSTANCE.createBuilder(r1);
}
public static final class Builder extends GeneratedMessageLite.Builder<Enum, Builder> implements EnumOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(Enum.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public String getName() {
return ((Enum) this.instance).getName();
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public ByteString getNameBytes() {
return ((Enum) this.instance).getNameBytes();
}
public Builder setName(String str) {
copyOnWrite();
((Enum) this.instance).setName(str);
return this;
}
public Builder clearName() {
copyOnWrite();
((Enum) this.instance).clearName();
return this;
}
public Builder setNameBytes(ByteString byteString) {
copyOnWrite();
((Enum) this.instance).setNameBytes(byteString);
return this;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public List<EnumValue> getEnumvalueList() {
return Collections.unmodifiableList(((Enum) this.instance).getEnumvalueList());
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public int getEnumvalueCount() {
return ((Enum) this.instance).getEnumvalueCount();
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public EnumValue getEnumvalue(int i) {
return ((Enum) this.instance).getEnumvalue(i);
}
public Builder setEnumvalue(int i, EnumValue enumValue) {
copyOnWrite();
((Enum) this.instance).setEnumvalue(i, enumValue);
return this;
}
public Builder setEnumvalue(int i, EnumValue.Builder builder) {
copyOnWrite();
((Enum) this.instance).setEnumvalue(i, builder);
return this;
}
public Builder addEnumvalue(EnumValue enumValue) {
copyOnWrite();
((Enum) this.instance).addEnumvalue(enumValue);
return this;
}
public Builder addEnumvalue(int i, EnumValue enumValue) {
copyOnWrite();
((Enum) this.instance).addEnumvalue(i, enumValue);
return this;
}
public Builder addEnumvalue(EnumValue.Builder builder) {
copyOnWrite();
((Enum) this.instance).addEnumvalue(builder);
return this;
}
public Builder addEnumvalue(int i, EnumValue.Builder builder) {
copyOnWrite();
((Enum) this.instance).addEnumvalue(i, builder);
return this;
}
public Builder addAllEnumvalue(Iterable<? extends EnumValue> iterable) {
copyOnWrite();
((Enum) this.instance).addAllEnumvalue(iterable);
return this;
}
public Builder clearEnumvalue() {
copyOnWrite();
((Enum) this.instance).clearEnumvalue();
return this;
}
public Builder removeEnumvalue(int i) {
copyOnWrite();
((Enum) this.instance).removeEnumvalue(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public List<Option> getOptionsList() {
return Collections.unmodifiableList(((Enum) this.instance).getOptionsList());
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public int getOptionsCount() {
return ((Enum) this.instance).getOptionsCount();
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public Option getOptions(int i) {
return ((Enum) this.instance).getOptions(i);
}
public Builder setOptions(int i, Option option) {
copyOnWrite();
((Enum) this.instance).setOptions(i, option);
return this;
}
public Builder setOptions(int i, Option.Builder builder) {
copyOnWrite();
((Enum) this.instance).setOptions(i, builder);
return this;
}
public Builder addOptions(Option option) {
copyOnWrite();
((Enum) this.instance).addOptions(option);
return this;
}
public Builder addOptions(int i, Option option) {
copyOnWrite();
((Enum) this.instance).addOptions(i, option);
return this;
}
public Builder addOptions(Option.Builder builder) {
copyOnWrite();
((Enum) this.instance).addOptions(builder);
return this;
}
public Builder addOptions(int i, Option.Builder builder) {
copyOnWrite();
((Enum) this.instance).addOptions(i, builder);
return this;
}
public Builder addAllOptions(Iterable<? extends Option> iterable) {
copyOnWrite();
((Enum) this.instance).addAllOptions(iterable);
return this;
}
public Builder clearOptions() {
copyOnWrite();
((Enum) this.instance).clearOptions();
return this;
}
public Builder removeOptions(int i) {
copyOnWrite();
((Enum) this.instance).removeOptions(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public boolean hasSourceContext() {
return ((Enum) this.instance).hasSourceContext();
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public SourceContext getSourceContext() {
return ((Enum) this.instance).getSourceContext();
}
public Builder setSourceContext(SourceContext sourceContext) {
copyOnWrite();
((Enum) this.instance).setSourceContext(sourceContext);
return this;
}
public Builder setSourceContext(SourceContext.Builder builder) {
copyOnWrite();
((Enum) this.instance).setSourceContext(builder);
return this;
}
public Builder mergeSourceContext(SourceContext sourceContext) {
copyOnWrite();
((Enum) this.instance).mergeSourceContext(sourceContext);
return this;
}
public Builder clearSourceContext() {
copyOnWrite();
((Enum) this.instance).clearSourceContext();
return this;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public int getSyntaxValue() {
return ((Enum) this.instance).getSyntaxValue();
}
public Builder setSyntaxValue(int i) {
copyOnWrite();
((Enum) this.instance).setSyntaxValue(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.EnumOrBuilder
public Syntax getSyntax() {
return ((Enum) this.instance).getSyntax();
}
public Builder setSyntax(Syntax syntax) {
copyOnWrite();
((Enum) this.instance).setSyntax(syntax);
return this;
}
public Builder clearSyntax() {
copyOnWrite();
((Enum) this.instance).clearSyntax();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.Enum$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new Enum();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0002\u0000\u0001Ȉ\u0002\u001b\u0003\u001b\u0004\t\u0005\f", new Object[]{"name_", "enumvalue_", EnumValue.class, "options_", Option.class, "sourceContext_", "syntax_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<Enum> parser = PARSER;
if (parser == null) {
synchronized (Enum.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
Enum r0 = new Enum();
DEFAULT_INSTANCE = r0;
GeneratedMessageLite.registerDefaultInstance(Enum.class, r0);
}
public static Parser<Enum> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,30 @@
package androidx.datastore.preferences.protobuf;
import java.util.List;
/* loaded from: classes.dex */
public interface EnumOrBuilder extends MessageLiteOrBuilder {
EnumValue getEnumvalue(int i);
int getEnumvalueCount();
List<EnumValue> getEnumvalueList();
String getName();
ByteString getNameBytes();
Option getOptions(int i);
int getOptionsCount();
List<Option> getOptionsList();
SourceContext getSourceContext();
Syntax getSyntax();
int getSyntaxValue();
boolean hasSourceContext();
}

View File

@@ -0,0 +1,422 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.Internal;
import androidx.datastore.preferences.protobuf.Option;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class EnumValue extends GeneratedMessageLite<EnumValue, Builder> implements EnumValueOrBuilder {
private static final EnumValue DEFAULT_INSTANCE;
public static final int NAME_FIELD_NUMBER = 1;
public static final int NUMBER_FIELD_NUMBER = 2;
public static final int OPTIONS_FIELD_NUMBER = 3;
private static volatile Parser<EnumValue> PARSER;
private int number_;
private String name_ = "";
private Internal.ProtobufList<Option> options_ = GeneratedMessageLite.emptyProtobufList();
/* JADX INFO: Access modifiers changed from: private */
public void clearNumber() {
this.number_ = 0;
}
public static EnumValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setNumber(int i) {
this.number_ = i;
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public String getName() {
return this.name_;
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public int getNumber() {
return this.number_;
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public List<Option> getOptionsList() {
return this.options_;
}
public List<? extends OptionOrBuilder> getOptionsOrBuilderList() {
return this.options_;
}
private EnumValue() {
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public ByteString getNameBytes() {
return ByteString.copyFromUtf8(this.name_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setName(String str) {
str.getClass();
this.name_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearName() {
this.name_ = getDefaultInstance().getName();
}
/* JADX INFO: Access modifiers changed from: private */
public void setNameBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.name_ = byteString.toStringUtf8();
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public int getOptionsCount() {
return this.options_.size();
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public Option getOptions(int i) {
return this.options_.get(i);
}
public OptionOrBuilder getOptionsOrBuilder(int i) {
return this.options_.get(i);
}
private void ensureOptionsIsMutable() {
if (this.options_.isModifiable()) {
return;
}
this.options_ = GeneratedMessageLite.mutableCopy(this.options_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setOptions(int i, Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.set(i, option);
}
/* JADX INFO: Access modifiers changed from: private */
public void setOptions(int i, Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.set(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.add(option);
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(int i, Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.add(i, option);
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.add(builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(int i, Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.add(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllOptions(Iterable<? extends Option> iterable) {
ensureOptionsIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.options_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearOptions() {
this.options_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void removeOptions(int i) {
ensureOptionsIsMutable();
this.options_.remove(i);
}
public static EnumValue parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static EnumValue parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static EnumValue parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static EnumValue parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static EnumValue parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static EnumValue parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static EnumValue parseFrom(InputStream inputStream) throws IOException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static EnumValue parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static EnumValue parseDelimitedFrom(InputStream inputStream) throws IOException {
return (EnumValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static EnumValue parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (EnumValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static EnumValue parseFrom(CodedInputStream codedInputStream) throws IOException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static EnumValue parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (EnumValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(EnumValue enumValue) {
return DEFAULT_INSTANCE.createBuilder(enumValue);
}
public static final class Builder extends GeneratedMessageLite.Builder<EnumValue, Builder> implements EnumValueOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(EnumValue.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public String getName() {
return ((EnumValue) this.instance).getName();
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public ByteString getNameBytes() {
return ((EnumValue) this.instance).getNameBytes();
}
public Builder setName(String str) {
copyOnWrite();
((EnumValue) this.instance).setName(str);
return this;
}
public Builder clearName() {
copyOnWrite();
((EnumValue) this.instance).clearName();
return this;
}
public Builder setNameBytes(ByteString byteString) {
copyOnWrite();
((EnumValue) this.instance).setNameBytes(byteString);
return this;
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public int getNumber() {
return ((EnumValue) this.instance).getNumber();
}
public Builder setNumber(int i) {
copyOnWrite();
((EnumValue) this.instance).setNumber(i);
return this;
}
public Builder clearNumber() {
copyOnWrite();
((EnumValue) this.instance).clearNumber();
return this;
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public List<Option> getOptionsList() {
return Collections.unmodifiableList(((EnumValue) this.instance).getOptionsList());
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public int getOptionsCount() {
return ((EnumValue) this.instance).getOptionsCount();
}
@Override // androidx.datastore.preferences.protobuf.EnumValueOrBuilder
public Option getOptions(int i) {
return ((EnumValue) this.instance).getOptions(i);
}
public Builder setOptions(int i, Option option) {
copyOnWrite();
((EnumValue) this.instance).setOptions(i, option);
return this;
}
public Builder setOptions(int i, Option.Builder builder) {
copyOnWrite();
((EnumValue) this.instance).setOptions(i, builder);
return this;
}
public Builder addOptions(Option option) {
copyOnWrite();
((EnumValue) this.instance).addOptions(option);
return this;
}
public Builder addOptions(int i, Option option) {
copyOnWrite();
((EnumValue) this.instance).addOptions(i, option);
return this;
}
public Builder addOptions(Option.Builder builder) {
copyOnWrite();
((EnumValue) this.instance).addOptions(builder);
return this;
}
public Builder addOptions(int i, Option.Builder builder) {
copyOnWrite();
((EnumValue) this.instance).addOptions(i, builder);
return this;
}
public Builder addAllOptions(Iterable<? extends Option> iterable) {
copyOnWrite();
((EnumValue) this.instance).addAllOptions(iterable);
return this;
}
public Builder clearOptions() {
copyOnWrite();
((EnumValue) this.instance).clearOptions();
return this;
}
public Builder removeOptions(int i) {
copyOnWrite();
((EnumValue) this.instance).removeOptions(i);
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.EnumValue$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new EnumValue();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0001\u0000\u0001Ȉ\u0002\u0004\u0003\u001b", new Object[]{"name_", "number_", "options_", Option.class});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<EnumValue> parser = PARSER;
if (parser == null) {
synchronized (EnumValue.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
EnumValue enumValue = new EnumValue();
DEFAULT_INSTANCE = enumValue;
GeneratedMessageLite.registerDefaultInstance(EnumValue.class, enumValue);
}
public static Parser<EnumValue> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,18 @@
package androidx.datastore.preferences.protobuf;
import java.util.List;
/* loaded from: classes.dex */
public interface EnumValueOrBuilder extends MessageLiteOrBuilder {
String getName();
ByteString getNameBytes();
int getNumber();
Option getOptions(int i);
int getOptionsCount();
List<Option> getOptionsList();
}

View File

@@ -0,0 +1,15 @@
package androidx.datastore.preferences.protobuf;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.PACKAGE, ElementType.TYPE})
@Documented
@Retention(RetentionPolicy.SOURCE)
/* loaded from: classes.dex */
public @interface ExperimentalApi {
String value() default "";
}

View File

@@ -0,0 +1,21 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.MessageLite;
import androidx.datastore.preferences.protobuf.WireFormat;
/* loaded from: classes.dex */
public abstract class ExtensionLite<ContainingType extends MessageLite, Type> {
public abstract Type getDefaultValue();
public abstract WireFormat.FieldType getLiteType();
public abstract MessageLite getMessageDefaultInstance();
public abstract int getNumber();
public boolean isLite() {
return true;
}
public abstract boolean isRepeated();
}

View File

@@ -0,0 +1,44 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
final class ExtensionRegistryFactory {
static final Class<?> EXTENSION_REGISTRY_CLASS = reflectExtensionRegistry();
static final String FULL_REGISTRY_CLASS_NAME = "androidx.datastore.preferences.protobuf.ExtensionRegistry";
public static Class<?> reflectExtensionRegistry() {
try {
return Class.forName(FULL_REGISTRY_CLASS_NAME);
} catch (ClassNotFoundException unused) {
return null;
}
}
public static ExtensionRegistryLite create() {
if (EXTENSION_REGISTRY_CLASS != null) {
try {
return invokeSubclassFactory("newInstance");
} catch (Exception unused) {
}
}
return new ExtensionRegistryLite();
}
public static ExtensionRegistryLite createEmpty() {
if (EXTENSION_REGISTRY_CLASS != null) {
try {
return invokeSubclassFactory("getEmptyRegistry");
} catch (Exception unused) {
}
}
return ExtensionRegistryLite.EMPTY_REGISTRY_LITE;
}
public static boolean isFullRegistry(ExtensionRegistryLite extensionRegistryLite) {
Class<?> cls = EXTENSION_REGISTRY_CLASS;
return cls != null && cls.isAssignableFrom(extensionRegistryLite.getClass());
}
private static final ExtensionRegistryLite invokeSubclassFactory(String str) throws Exception {
return (ExtensionRegistryLite) EXTENSION_REGISTRY_CLASS.getDeclaredMethod(str, new Class[0]).invoke(null, new Object[0]);
}
}

View File

@@ -0,0 +1,118 @@
package androidx.datastore.preferences.protobuf;
import androidx.core.internal.view.SupportMenu;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes.dex */
public class ExtensionRegistryLite {
static final String EXTENSION_CLASS_NAME = "androidx.datastore.preferences.protobuf.Extension";
private static boolean doFullRuntimeInheritanceCheck = true;
private static volatile boolean eagerlyParseMessageSets = false;
private static volatile ExtensionRegistryLite emptyRegistry;
private final Map<ObjectIntPair, GeneratedMessageLite.GeneratedExtension<?, ?>> extensionsByNumber;
private static final Class<?> extensionClass = resolveExtensionClass();
static final ExtensionRegistryLite EMPTY_REGISTRY_LITE = new ExtensionRegistryLite(true);
public static boolean isEagerlyParseMessageSets() {
return eagerlyParseMessageSets;
}
public static void setEagerlyParseMessageSets(boolean z) {
eagerlyParseMessageSets = z;
}
public static Class<?> resolveExtensionClass() {
try {
return Class.forName(EXTENSION_CLASS_NAME);
} catch (ClassNotFoundException unused) {
return null;
}
}
public static ExtensionRegistryLite newInstance() {
return doFullRuntimeInheritanceCheck ? ExtensionRegistryFactory.create() : 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", extensionClass).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;
}
}
}

View File

@@ -0,0 +1,31 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.FieldSet;
import androidx.datastore.preferences.protobuf.FieldSet.FieldDescriptorLite;
import java.io.IOException;
import java.util.Map;
/* loaded from: classes.dex */
abstract class ExtensionSchema<T extends FieldSet.FieldDescriptorLite<T>> {
public abstract int extensionNumber(Map.Entry<?, ?> entry);
public abstract Object findExtensionByNumber(ExtensionRegistryLite extensionRegistryLite, MessageLite messageLite, int i);
public abstract FieldSet<T> getExtensions(Object obj);
public abstract FieldSet<T> getMutableExtensions(Object obj);
public abstract boolean hasExtensions(MessageLite messageLite);
public abstract void makeImmutable(Object obj);
public abstract <UT, UB> UB parseExtension(Reader reader, Object obj, ExtensionRegistryLite extensionRegistryLite, FieldSet<T> fieldSet, UB ub, UnknownFieldSchema<UT, UB> unknownFieldSchema) throws IOException;
public abstract void parseLengthPrefixedMessageSetItem(Reader reader, Object obj, ExtensionRegistryLite extensionRegistryLite, FieldSet<T> fieldSet) throws IOException;
public abstract void parseMessageSetItem(ByteString byteString, Object obj, ExtensionRegistryLite extensionRegistryLite, FieldSet<T> fieldSet) throws IOException;
public abstract void serializeExtension(Writer writer, Map.Entry<?, ?> entry) throws IOException;
public abstract void setExtensions(Object obj, FieldSet<T> fieldSet);
}

View File

@@ -0,0 +1,424 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.WireFormat;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
final class ExtensionSchemaLite extends ExtensionSchema<GeneratedMessageLite.ExtensionDescriptor> {
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public boolean hasExtensions(MessageLite messageLite) {
return messageLite instanceof GeneratedMessageLite.ExtendableMessage;
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public FieldSet<GeneratedMessageLite.ExtensionDescriptor> getExtensions(Object obj) {
return ((GeneratedMessageLite.ExtendableMessage) obj).extensions;
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public void setExtensions(Object obj, FieldSet<GeneratedMessageLite.ExtensionDescriptor> fieldSet) {
((GeneratedMessageLite.ExtendableMessage) obj).extensions = fieldSet;
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public FieldSet<GeneratedMessageLite.ExtensionDescriptor> getMutableExtensions(Object obj) {
return ((GeneratedMessageLite.ExtendableMessage) obj).ensureExtensionsAreMutable();
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public void makeImmutable(Object obj) {
getExtensions(obj).makeImmutable();
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public <UT, UB> UB parseExtension(Reader reader, Object obj, ExtensionRegistryLite extensionRegistryLite, FieldSet<GeneratedMessageLite.ExtensionDescriptor> fieldSet, UB ub, UnknownFieldSchema<UT, UB> unknownFieldSchema) throws IOException {
Object valueOf;
Object field;
ArrayList arrayList;
GeneratedMessageLite.GeneratedExtension generatedExtension = (GeneratedMessageLite.GeneratedExtension) obj;
int number = generatedExtension.getNumber();
if (generatedExtension.descriptor.isRepeated() && generatedExtension.descriptor.isPacked()) {
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[generatedExtension.getLiteType().ordinal()]) {
case 1:
arrayList = new ArrayList();
reader.readDoubleList(arrayList);
break;
case 2:
arrayList = new ArrayList();
reader.readFloatList(arrayList);
break;
case 3:
arrayList = new ArrayList();
reader.readInt64List(arrayList);
break;
case 4:
arrayList = new ArrayList();
reader.readUInt64List(arrayList);
break;
case 5:
arrayList = new ArrayList();
reader.readInt32List(arrayList);
break;
case 6:
arrayList = new ArrayList();
reader.readFixed64List(arrayList);
break;
case 7:
arrayList = new ArrayList();
reader.readFixed32List(arrayList);
break;
case 8:
arrayList = new ArrayList();
reader.readBoolList(arrayList);
break;
case 9:
arrayList = new ArrayList();
reader.readUInt32List(arrayList);
break;
case 10:
arrayList = new ArrayList();
reader.readSFixed32List(arrayList);
break;
case 11:
arrayList = new ArrayList();
reader.readSFixed64List(arrayList);
break;
case 12:
arrayList = new ArrayList();
reader.readSInt32List(arrayList);
break;
case 13:
arrayList = new ArrayList();
reader.readSInt64List(arrayList);
break;
case 14:
arrayList = new ArrayList();
reader.readEnumList(arrayList);
ub = (UB) SchemaUtil.filterUnknownEnumList(number, arrayList, generatedExtension.descriptor.getEnumType(), ub, unknownFieldSchema);
break;
default:
throw new IllegalStateException("Type cannot be packed: " + generatedExtension.descriptor.getLiteType());
}
fieldSet.setField(generatedExtension.descriptor, arrayList);
} else {
if (generatedExtension.getLiteType() == WireFormat.FieldType.ENUM) {
int readInt32 = reader.readInt32();
if (generatedExtension.descriptor.getEnumType().findValueByNumber(readInt32) == null) {
return (UB) SchemaUtil.storeUnknownEnum(number, readInt32, ub, unknownFieldSchema);
}
valueOf = Integer.valueOf(readInt32);
} else {
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[generatedExtension.getLiteType().ordinal()]) {
case 1:
valueOf = Double.valueOf(reader.readDouble());
break;
case 2:
valueOf = Float.valueOf(reader.readFloat());
break;
case 3:
valueOf = Long.valueOf(reader.readInt64());
break;
case 4:
valueOf = Long.valueOf(reader.readUInt64());
break;
case 5:
valueOf = Integer.valueOf(reader.readInt32());
break;
case 6:
valueOf = Long.valueOf(reader.readFixed64());
break;
case 7:
valueOf = Integer.valueOf(reader.readFixed32());
break;
case 8:
valueOf = Boolean.valueOf(reader.readBool());
break;
case 9:
valueOf = Integer.valueOf(reader.readUInt32());
break;
case 10:
valueOf = Integer.valueOf(reader.readSFixed32());
break;
case 11:
valueOf = Long.valueOf(reader.readSFixed64());
break;
case 12:
valueOf = Integer.valueOf(reader.readSInt32());
break;
case 13:
valueOf = Long.valueOf(reader.readSInt64());
break;
case 14:
throw new IllegalStateException("Shouldn't reach here.");
case 15:
valueOf = reader.readBytes();
break;
case 16:
valueOf = reader.readString();
break;
case 17:
valueOf = reader.readGroup(generatedExtension.getMessageDefaultInstance().getClass(), extensionRegistryLite);
break;
case 18:
valueOf = reader.readMessage(generatedExtension.getMessageDefaultInstance().getClass(), extensionRegistryLite);
break;
default:
valueOf = null;
break;
}
}
if (generatedExtension.isRepeated()) {
fieldSet.addRepeatedField(generatedExtension.descriptor, valueOf);
} else {
int i = AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[generatedExtension.getLiteType().ordinal()];
if ((i == 17 || i == 18) && (field = fieldSet.getField(generatedExtension.descriptor)) != null) {
valueOf = Internal.mergeMessage(field, valueOf);
}
fieldSet.setField(generatedExtension.descriptor, valueOf);
}
}
return ub;
}
/* renamed from: androidx.datastore.preferences.protobuf.ExtensionSchemaLite$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$FieldType;
static {
int[] iArr = new int[WireFormat.FieldType.values().length];
$SwitchMap$com$google$protobuf$WireFormat$FieldType = iArr;
try {
iArr[WireFormat.FieldType.DOUBLE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FLOAT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT64.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT64.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT32.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED64.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED32.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.BOOL.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT32.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED32.ordinal()] = 10;
} catch (NoSuchFieldError unused10) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED64.ordinal()] = 11;
} catch (NoSuchFieldError unused11) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT32.ordinal()] = 12;
} catch (NoSuchFieldError unused12) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT64.ordinal()] = 13;
} catch (NoSuchFieldError unused13) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.ENUM.ordinal()] = 14;
} catch (NoSuchFieldError unused14) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.BYTES.ordinal()] = 15;
} catch (NoSuchFieldError unused15) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.STRING.ordinal()] = 16;
} catch (NoSuchFieldError unused16) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.GROUP.ordinal()] = 17;
} catch (NoSuchFieldError unused17) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.MESSAGE.ordinal()] = 18;
} catch (NoSuchFieldError unused18) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public int extensionNumber(Map.Entry<?, ?> entry) {
return ((GeneratedMessageLite.ExtensionDescriptor) entry.getKey()).getNumber();
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public void serializeExtension(Writer writer, Map.Entry<?, ?> entry) throws IOException {
GeneratedMessageLite.ExtensionDescriptor extensionDescriptor = (GeneratedMessageLite.ExtensionDescriptor) entry.getKey();
if (extensionDescriptor.isRepeated()) {
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[extensionDescriptor.getLiteType().ordinal()]) {
case 1:
SchemaUtil.writeDoubleList(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 2:
SchemaUtil.writeFloatList(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 3:
SchemaUtil.writeInt64List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 4:
SchemaUtil.writeUInt64List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 5:
SchemaUtil.writeInt32List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 6:
SchemaUtil.writeFixed64List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 7:
SchemaUtil.writeFixed32List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 8:
SchemaUtil.writeBoolList(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 9:
SchemaUtil.writeUInt32List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 10:
SchemaUtil.writeSFixed32List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 11:
SchemaUtil.writeSFixed64List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 12:
SchemaUtil.writeSInt32List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 13:
SchemaUtil.writeSInt64List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 14:
SchemaUtil.writeInt32List(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, extensionDescriptor.isPacked());
break;
case 15:
SchemaUtil.writeBytesList(extensionDescriptor.getNumber(), (List) entry.getValue(), writer);
break;
case 16:
SchemaUtil.writeStringList(extensionDescriptor.getNumber(), (List) entry.getValue(), writer);
break;
case 17:
List list = (List) entry.getValue();
if (list != null && !list.isEmpty()) {
SchemaUtil.writeGroupList(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, Protobuf.getInstance().schemaFor((Class) list.get(0).getClass()));
break;
}
break;
case 18:
List list2 = (List) entry.getValue();
if (list2 != null && !list2.isEmpty()) {
SchemaUtil.writeMessageList(extensionDescriptor.getNumber(), (List) entry.getValue(), writer, Protobuf.getInstance().schemaFor((Class) list2.get(0).getClass()));
break;
}
break;
}
}
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[extensionDescriptor.getLiteType().ordinal()]) {
case 1:
writer.writeDouble(extensionDescriptor.getNumber(), ((Double) entry.getValue()).doubleValue());
break;
case 2:
writer.writeFloat(extensionDescriptor.getNumber(), ((Float) entry.getValue()).floatValue());
break;
case 3:
writer.writeInt64(extensionDescriptor.getNumber(), ((Long) entry.getValue()).longValue());
break;
case 4:
writer.writeUInt64(extensionDescriptor.getNumber(), ((Long) entry.getValue()).longValue());
break;
case 5:
writer.writeInt32(extensionDescriptor.getNumber(), ((Integer) entry.getValue()).intValue());
break;
case 6:
writer.writeFixed64(extensionDescriptor.getNumber(), ((Long) entry.getValue()).longValue());
break;
case 7:
writer.writeFixed32(extensionDescriptor.getNumber(), ((Integer) entry.getValue()).intValue());
break;
case 8:
writer.writeBool(extensionDescriptor.getNumber(), ((Boolean) entry.getValue()).booleanValue());
break;
case 9:
writer.writeUInt32(extensionDescriptor.getNumber(), ((Integer) entry.getValue()).intValue());
break;
case 10:
writer.writeSFixed32(extensionDescriptor.getNumber(), ((Integer) entry.getValue()).intValue());
break;
case 11:
writer.writeSFixed64(extensionDescriptor.getNumber(), ((Long) entry.getValue()).longValue());
break;
case 12:
writer.writeSInt32(extensionDescriptor.getNumber(), ((Integer) entry.getValue()).intValue());
break;
case 13:
writer.writeSInt64(extensionDescriptor.getNumber(), ((Long) entry.getValue()).longValue());
break;
case 14:
writer.writeInt32(extensionDescriptor.getNumber(), ((Integer) entry.getValue()).intValue());
break;
case 15:
writer.writeBytes(extensionDescriptor.getNumber(), (ByteString) entry.getValue());
break;
case 16:
writer.writeString(extensionDescriptor.getNumber(), (String) entry.getValue());
break;
case 17:
writer.writeGroup(extensionDescriptor.getNumber(), entry.getValue(), Protobuf.getInstance().schemaFor((Class) entry.getValue().getClass()));
break;
case 18:
writer.writeMessage(extensionDescriptor.getNumber(), entry.getValue(), Protobuf.getInstance().schemaFor((Class) entry.getValue().getClass()));
break;
}
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public Object findExtensionByNumber(ExtensionRegistryLite extensionRegistryLite, MessageLite messageLite, int i) {
return extensionRegistryLite.findLiteExtensionByNumber(messageLite, i);
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public void parseLengthPrefixedMessageSetItem(Reader reader, Object obj, ExtensionRegistryLite extensionRegistryLite, FieldSet<GeneratedMessageLite.ExtensionDescriptor> fieldSet) throws IOException {
GeneratedMessageLite.GeneratedExtension generatedExtension = (GeneratedMessageLite.GeneratedExtension) obj;
fieldSet.setField(generatedExtension.descriptor, reader.readMessage(generatedExtension.getMessageDefaultInstance().getClass(), extensionRegistryLite));
}
@Override // androidx.datastore.preferences.protobuf.ExtensionSchema
public void parseMessageSetItem(ByteString byteString, Object obj, ExtensionRegistryLite extensionRegistryLite, FieldSet<GeneratedMessageLite.ExtensionDescriptor> fieldSet) throws IOException {
GeneratedMessageLite.GeneratedExtension generatedExtension = (GeneratedMessageLite.GeneratedExtension) obj;
MessageLite buildPartial = generatedExtension.getMessageDefaultInstance().newBuilderForType().buildPartial();
BinaryReader newInstance = BinaryReader.newInstance(ByteBuffer.wrap(byteString.toByteArray()), true);
Protobuf.getInstance().mergeFrom(buildPartial, newInstance, extensionRegistryLite);
fieldSet.setField(generatedExtension.descriptor, buildPartial);
if (newInstance.getFieldNumber() != Integer.MAX_VALUE) {
throw InvalidProtocolBufferException.invalidEndTag();
}
}
}

View File

@@ -0,0 +1,27 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
final class ExtensionSchemas {
private static final ExtensionSchema<?> LITE_SCHEMA = new ExtensionSchemaLite();
private static final ExtensionSchema<?> FULL_SCHEMA = loadSchemaForFullRuntime();
public static ExtensionSchema<?> lite() {
return LITE_SCHEMA;
}
private static ExtensionSchema<?> loadSchemaForFullRuntime() {
try {
return (ExtensionSchema) Class.forName("androidx.datastore.preferences.protobuf.ExtensionSchemaFull").getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
} catch (Exception unused) {
return null;
}
}
public static ExtensionSchema<?> full() {
ExtensionSchema<?> extensionSchema = FULL_SCHEMA;
if (extensionSchema != null) {
return extensionSchema;
}
throw new IllegalStateException("Protobuf runtime is not correctly loaded.");
}
}

View File

@@ -0,0 +1,985 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.Internal;
import androidx.datastore.preferences.protobuf.Option;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class Field extends GeneratedMessageLite<Field, Builder> implements FieldOrBuilder {
public static final int CARDINALITY_FIELD_NUMBER = 2;
private static final Field DEFAULT_INSTANCE;
public static final int DEFAULT_VALUE_FIELD_NUMBER = 11;
public static final int JSON_NAME_FIELD_NUMBER = 10;
public static final int KIND_FIELD_NUMBER = 1;
public static final int NAME_FIELD_NUMBER = 4;
public static final int NUMBER_FIELD_NUMBER = 3;
public static final int ONEOF_INDEX_FIELD_NUMBER = 7;
public static final int OPTIONS_FIELD_NUMBER = 9;
public static final int PACKED_FIELD_NUMBER = 8;
private static volatile Parser<Field> PARSER = null;
public static final int TYPE_URL_FIELD_NUMBER = 6;
private int cardinality_;
private int kind_;
private int number_;
private int oneofIndex_;
private boolean packed_;
private String name_ = "";
private String typeUrl_ = "";
private Internal.ProtobufList<Option> options_ = GeneratedMessageLite.emptyProtobufList();
private String jsonName_ = "";
private String defaultValue_ = "";
/* JADX INFO: Access modifiers changed from: private */
public void clearCardinality() {
this.cardinality_ = 0;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearKind() {
this.kind_ = 0;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearNumber() {
this.number_ = 0;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearOneofIndex() {
this.oneofIndex_ = 0;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearPacked() {
this.packed_ = false;
}
public static Field getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setCardinalityValue(int i) {
this.cardinality_ = i;
}
/* JADX INFO: Access modifiers changed from: private */
public void setKindValue(int i) {
this.kind_ = i;
}
/* JADX INFO: Access modifiers changed from: private */
public void setNumber(int i) {
this.number_ = i;
}
/* JADX INFO: Access modifiers changed from: private */
public void setOneofIndex(int i) {
this.oneofIndex_ = i;
}
/* JADX INFO: Access modifiers changed from: private */
public void setPacked(boolean z) {
this.packed_ = z;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getCardinalityValue() {
return this.cardinality_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public String getDefaultValue() {
return this.defaultValue_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public String getJsonName() {
return this.jsonName_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getKindValue() {
return this.kind_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public String getName() {
return this.name_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getNumber() {
return this.number_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getOneofIndex() {
return this.oneofIndex_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public List<Option> getOptionsList() {
return this.options_;
}
public List<? extends OptionOrBuilder> getOptionsOrBuilderList() {
return this.options_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public boolean getPacked() {
return this.packed_;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public String getTypeUrl() {
return this.typeUrl_;
}
private Field() {
}
public enum Kind implements Internal.EnumLite {
TYPE_UNKNOWN(0),
TYPE_DOUBLE(1),
TYPE_FLOAT(2),
TYPE_INT64(3),
TYPE_UINT64(4),
TYPE_INT32(5),
TYPE_FIXED64(6),
TYPE_FIXED32(7),
TYPE_BOOL(8),
TYPE_STRING(9),
TYPE_GROUP(10),
TYPE_MESSAGE(11),
TYPE_BYTES(12),
TYPE_UINT32(13),
TYPE_ENUM(14),
TYPE_SFIXED32(15),
TYPE_SFIXED64(16),
TYPE_SINT32(17),
TYPE_SINT64(18),
UNRECOGNIZED(-1);
public static final int TYPE_BOOL_VALUE = 8;
public static final int TYPE_BYTES_VALUE = 12;
public static final int TYPE_DOUBLE_VALUE = 1;
public static final int TYPE_ENUM_VALUE = 14;
public static final int TYPE_FIXED32_VALUE = 7;
public static final int TYPE_FIXED64_VALUE = 6;
public static final int TYPE_FLOAT_VALUE = 2;
public static final int TYPE_GROUP_VALUE = 10;
public static final int TYPE_INT32_VALUE = 5;
public static final int TYPE_INT64_VALUE = 3;
public static final int TYPE_MESSAGE_VALUE = 11;
public static final int TYPE_SFIXED32_VALUE = 15;
public static final int TYPE_SFIXED64_VALUE = 16;
public static final int TYPE_SINT32_VALUE = 17;
public static final int TYPE_SINT64_VALUE = 18;
public static final int TYPE_STRING_VALUE = 9;
public static final int TYPE_UINT32_VALUE = 13;
public static final int TYPE_UINT64_VALUE = 4;
public static final int TYPE_UNKNOWN_VALUE = 0;
private static final Internal.EnumLiteMap<Kind> internalValueMap = new Internal.EnumLiteMap<Kind>() { // from class: androidx.datastore.preferences.protobuf.Field.Kind.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.datastore.preferences.protobuf.Internal.EnumLiteMap
public Kind findValueByNumber(int i) {
return Kind.forNumber(i);
}
};
private final int value;
public static Kind forNumber(int i) {
switch (i) {
case 0:
return TYPE_UNKNOWN;
case 1:
return TYPE_DOUBLE;
case 2:
return TYPE_FLOAT;
case 3:
return TYPE_INT64;
case 4:
return TYPE_UINT64;
case 5:
return TYPE_INT32;
case 6:
return TYPE_FIXED64;
case 7:
return TYPE_FIXED32;
case 8:
return TYPE_BOOL;
case 9:
return TYPE_STRING;
case 10:
return TYPE_GROUP;
case 11:
return TYPE_MESSAGE;
case 12:
return TYPE_BYTES;
case 13:
return TYPE_UINT32;
case 14:
return TYPE_ENUM;
case 15:
return TYPE_SFIXED32;
case 16:
return TYPE_SFIXED64;
case 17:
return TYPE_SINT32;
case 18:
return TYPE_SINT64;
default:
return null;
}
}
public static Internal.EnumLiteMap<Kind> internalGetValueMap() {
return internalValueMap;
}
@Override // androidx.datastore.preferences.protobuf.Internal.EnumLite
public final int getNumber() {
if (this != UNRECOGNIZED) {
return this.value;
}
throw new IllegalArgumentException("Can't get the number of an unknown enum value.");
}
@Deprecated
public static Kind valueOf(int i) {
return forNumber(i);
}
public static Internal.EnumVerifier internalGetVerifier() {
return KindVerifier.INSTANCE;
}
public static final class KindVerifier implements Internal.EnumVerifier {
static final Internal.EnumVerifier INSTANCE = new KindVerifier();
private KindVerifier() {
}
@Override // androidx.datastore.preferences.protobuf.Internal.EnumVerifier
public boolean isInRange(int i) {
return Kind.forNumber(i) != null;
}
}
Kind(int i) {
this.value = i;
}
}
public enum Cardinality implements Internal.EnumLite {
CARDINALITY_UNKNOWN(0),
CARDINALITY_OPTIONAL(1),
CARDINALITY_REQUIRED(2),
CARDINALITY_REPEATED(3),
UNRECOGNIZED(-1);
public static final int CARDINALITY_OPTIONAL_VALUE = 1;
public static final int CARDINALITY_REPEATED_VALUE = 3;
public static final int CARDINALITY_REQUIRED_VALUE = 2;
public static final int CARDINALITY_UNKNOWN_VALUE = 0;
private static final Internal.EnumLiteMap<Cardinality> internalValueMap = new Internal.EnumLiteMap<Cardinality>() { // from class: androidx.datastore.preferences.protobuf.Field.Cardinality.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.datastore.preferences.protobuf.Internal.EnumLiteMap
public Cardinality findValueByNumber(int i) {
return Cardinality.forNumber(i);
}
};
private final int value;
public static Cardinality forNumber(int i) {
if (i == 0) {
return CARDINALITY_UNKNOWN;
}
if (i == 1) {
return CARDINALITY_OPTIONAL;
}
if (i == 2) {
return CARDINALITY_REQUIRED;
}
if (i != 3) {
return null;
}
return CARDINALITY_REPEATED;
}
public static Internal.EnumLiteMap<Cardinality> internalGetValueMap() {
return internalValueMap;
}
@Override // androidx.datastore.preferences.protobuf.Internal.EnumLite
public final int getNumber() {
if (this != UNRECOGNIZED) {
return this.value;
}
throw new IllegalArgumentException("Can't get the number of an unknown enum value.");
}
@Deprecated
public static Cardinality valueOf(int i) {
return forNumber(i);
}
public static Internal.EnumVerifier internalGetVerifier() {
return CardinalityVerifier.INSTANCE;
}
public static final class CardinalityVerifier implements Internal.EnumVerifier {
static final Internal.EnumVerifier INSTANCE = new CardinalityVerifier();
private CardinalityVerifier() {
}
@Override // androidx.datastore.preferences.protobuf.Internal.EnumVerifier
public boolean isInRange(int i) {
return Cardinality.forNumber(i) != null;
}
}
Cardinality(int i) {
this.value = i;
}
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public Kind getKind() {
Kind forNumber = Kind.forNumber(this.kind_);
return forNumber == null ? Kind.UNRECOGNIZED : forNumber;
}
/* JADX INFO: Access modifiers changed from: private */
public void setKind(Kind kind) {
kind.getClass();
this.kind_ = kind.getNumber();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public Cardinality getCardinality() {
Cardinality forNumber = Cardinality.forNumber(this.cardinality_);
return forNumber == null ? Cardinality.UNRECOGNIZED : forNumber;
}
/* JADX INFO: Access modifiers changed from: private */
public void setCardinality(Cardinality cardinality) {
cardinality.getClass();
this.cardinality_ = cardinality.getNumber();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public ByteString getNameBytes() {
return ByteString.copyFromUtf8(this.name_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setName(String str) {
str.getClass();
this.name_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearName() {
this.name_ = getDefaultInstance().getName();
}
/* JADX INFO: Access modifiers changed from: private */
public void setNameBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.name_ = byteString.toStringUtf8();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public ByteString getTypeUrlBytes() {
return ByteString.copyFromUtf8(this.typeUrl_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setTypeUrl(String str) {
str.getClass();
this.typeUrl_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearTypeUrl() {
this.typeUrl_ = getDefaultInstance().getTypeUrl();
}
/* JADX INFO: Access modifiers changed from: private */
public void setTypeUrlBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.typeUrl_ = byteString.toStringUtf8();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getOptionsCount() {
return this.options_.size();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public Option getOptions(int i) {
return this.options_.get(i);
}
public OptionOrBuilder getOptionsOrBuilder(int i) {
return this.options_.get(i);
}
private void ensureOptionsIsMutable() {
if (this.options_.isModifiable()) {
return;
}
this.options_ = GeneratedMessageLite.mutableCopy(this.options_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setOptions(int i, Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.set(i, option);
}
/* JADX INFO: Access modifiers changed from: private */
public void setOptions(int i, Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.set(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.add(option);
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(int i, Option option) {
option.getClass();
ensureOptionsIsMutable();
this.options_.add(i, option);
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.add(builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addOptions(int i, Option.Builder builder) {
ensureOptionsIsMutable();
this.options_.add(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllOptions(Iterable<? extends Option> iterable) {
ensureOptionsIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.options_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearOptions() {
this.options_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void removeOptions(int i) {
ensureOptionsIsMutable();
this.options_.remove(i);
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public ByteString getJsonNameBytes() {
return ByteString.copyFromUtf8(this.jsonName_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setJsonName(String str) {
str.getClass();
this.jsonName_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearJsonName() {
this.jsonName_ = getDefaultInstance().getJsonName();
}
/* JADX INFO: Access modifiers changed from: private */
public void setJsonNameBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.jsonName_ = byteString.toStringUtf8();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public ByteString getDefaultValueBytes() {
return ByteString.copyFromUtf8(this.defaultValue_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setDefaultValue(String str) {
str.getClass();
this.defaultValue_ = str;
}
/* JADX INFO: Access modifiers changed from: private */
public void clearDefaultValue() {
this.defaultValue_ = getDefaultInstance().getDefaultValue();
}
/* JADX INFO: Access modifiers changed from: private */
public void setDefaultValueBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
this.defaultValue_ = byteString.toStringUtf8();
}
public static Field parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static Field parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static Field parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static Field parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static Field parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static Field parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static Field parseFrom(InputStream inputStream) throws IOException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static Field parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Field parseDelimitedFrom(InputStream inputStream) throws IOException {
return (Field) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static Field parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Field) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Field parseFrom(CodedInputStream codedInputStream) throws IOException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static Field parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Field) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Field field) {
return DEFAULT_INSTANCE.createBuilder(field);
}
public static final class Builder extends GeneratedMessageLite.Builder<Field, Builder> implements FieldOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(Field.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getKindValue() {
return ((Field) this.instance).getKindValue();
}
public Builder setKindValue(int i) {
copyOnWrite();
((Field) this.instance).setKindValue(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public Kind getKind() {
return ((Field) this.instance).getKind();
}
public Builder setKind(Kind kind) {
copyOnWrite();
((Field) this.instance).setKind(kind);
return this;
}
public Builder clearKind() {
copyOnWrite();
((Field) this.instance).clearKind();
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getCardinalityValue() {
return ((Field) this.instance).getCardinalityValue();
}
public Builder setCardinalityValue(int i) {
copyOnWrite();
((Field) this.instance).setCardinalityValue(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public Cardinality getCardinality() {
return ((Field) this.instance).getCardinality();
}
public Builder setCardinality(Cardinality cardinality) {
copyOnWrite();
((Field) this.instance).setCardinality(cardinality);
return this;
}
public Builder clearCardinality() {
copyOnWrite();
((Field) this.instance).clearCardinality();
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getNumber() {
return ((Field) this.instance).getNumber();
}
public Builder setNumber(int i) {
copyOnWrite();
((Field) this.instance).setNumber(i);
return this;
}
public Builder clearNumber() {
copyOnWrite();
((Field) this.instance).clearNumber();
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public String getName() {
return ((Field) this.instance).getName();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public ByteString getNameBytes() {
return ((Field) this.instance).getNameBytes();
}
public Builder setName(String str) {
copyOnWrite();
((Field) this.instance).setName(str);
return this;
}
public Builder clearName() {
copyOnWrite();
((Field) this.instance).clearName();
return this;
}
public Builder setNameBytes(ByteString byteString) {
copyOnWrite();
((Field) this.instance).setNameBytes(byteString);
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public String getTypeUrl() {
return ((Field) this.instance).getTypeUrl();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public ByteString getTypeUrlBytes() {
return ((Field) this.instance).getTypeUrlBytes();
}
public Builder setTypeUrl(String str) {
copyOnWrite();
((Field) this.instance).setTypeUrl(str);
return this;
}
public Builder clearTypeUrl() {
copyOnWrite();
((Field) this.instance).clearTypeUrl();
return this;
}
public Builder setTypeUrlBytes(ByteString byteString) {
copyOnWrite();
((Field) this.instance).setTypeUrlBytes(byteString);
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getOneofIndex() {
return ((Field) this.instance).getOneofIndex();
}
public Builder setOneofIndex(int i) {
copyOnWrite();
((Field) this.instance).setOneofIndex(i);
return this;
}
public Builder clearOneofIndex() {
copyOnWrite();
((Field) this.instance).clearOneofIndex();
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public boolean getPacked() {
return ((Field) this.instance).getPacked();
}
public Builder setPacked(boolean z) {
copyOnWrite();
((Field) this.instance).setPacked(z);
return this;
}
public Builder clearPacked() {
copyOnWrite();
((Field) this.instance).clearPacked();
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public List<Option> getOptionsList() {
return Collections.unmodifiableList(((Field) this.instance).getOptionsList());
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public int getOptionsCount() {
return ((Field) this.instance).getOptionsCount();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public Option getOptions(int i) {
return ((Field) this.instance).getOptions(i);
}
public Builder setOptions(int i, Option option) {
copyOnWrite();
((Field) this.instance).setOptions(i, option);
return this;
}
public Builder setOptions(int i, Option.Builder builder) {
copyOnWrite();
((Field) this.instance).setOptions(i, builder);
return this;
}
public Builder addOptions(Option option) {
copyOnWrite();
((Field) this.instance).addOptions(option);
return this;
}
public Builder addOptions(int i, Option option) {
copyOnWrite();
((Field) this.instance).addOptions(i, option);
return this;
}
public Builder addOptions(Option.Builder builder) {
copyOnWrite();
((Field) this.instance).addOptions(builder);
return this;
}
public Builder addOptions(int i, Option.Builder builder) {
copyOnWrite();
((Field) this.instance).addOptions(i, builder);
return this;
}
public Builder addAllOptions(Iterable<? extends Option> iterable) {
copyOnWrite();
((Field) this.instance).addAllOptions(iterable);
return this;
}
public Builder clearOptions() {
copyOnWrite();
((Field) this.instance).clearOptions();
return this;
}
public Builder removeOptions(int i) {
copyOnWrite();
((Field) this.instance).removeOptions(i);
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public String getJsonName() {
return ((Field) this.instance).getJsonName();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public ByteString getJsonNameBytes() {
return ((Field) this.instance).getJsonNameBytes();
}
public Builder setJsonName(String str) {
copyOnWrite();
((Field) this.instance).setJsonName(str);
return this;
}
public Builder clearJsonName() {
copyOnWrite();
((Field) this.instance).clearJsonName();
return this;
}
public Builder setJsonNameBytes(ByteString byteString) {
copyOnWrite();
((Field) this.instance).setJsonNameBytes(byteString);
return this;
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public String getDefaultValue() {
return ((Field) this.instance).getDefaultValue();
}
@Override // androidx.datastore.preferences.protobuf.FieldOrBuilder
public ByteString getDefaultValueBytes() {
return ((Field) this.instance).getDefaultValueBytes();
}
public Builder setDefaultValue(String str) {
copyOnWrite();
((Field) this.instance).setDefaultValue(str);
return this;
}
public Builder clearDefaultValue() {
copyOnWrite();
((Field) this.instance).clearDefaultValue();
return this;
}
public Builder setDefaultValueBytes(ByteString byteString) {
copyOnWrite();
((Field) this.instance).setDefaultValueBytes(byteString);
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.Field$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new Field();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\n\u0000\u0000\u0001\u000b\n\u0000\u0001\u0000\u0001\f\u0002\f\u0003\u0004\u0004Ȉ\u0006Ȉ\u0007\u0004\b\u0007\t\u001b\\u000bȈ", new Object[]{"kind_", "cardinality_", "number_", "name_", "typeUrl_", "oneofIndex_", "packed_", "options_", Option.class, "jsonName_", "defaultValue_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<Field> parser = PARSER;
if (parser == null) {
synchronized (Field.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
Field field = new Field();
DEFAULT_INSTANCE = field;
GeneratedMessageLite.registerDefaultInstance(Field.class, field);
}
public static Parser<Field> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,337 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
/* loaded from: classes.dex */
final class FieldInfo implements Comparable<FieldInfo> {
private final java.lang.reflect.Field cachedSizeField;
private final boolean enforceUtf8;
private final Internal.EnumVerifier enumVerifier;
private final java.lang.reflect.Field field;
private final int fieldNumber;
private final Object mapDefaultEntry;
private final Class<?> messageClass;
private final OneofInfo oneof;
private final Class<?> oneofStoredType;
private final java.lang.reflect.Field presenceField;
private final int presenceMask;
private final boolean required;
private final FieldType type;
private static boolean isExactlyOneBitSet(int i) {
return i != 0 && (i & (i + (-1))) == 0;
}
public java.lang.reflect.Field getCachedSizeField() {
return this.cachedSizeField;
}
public Internal.EnumVerifier getEnumVerifier() {
return this.enumVerifier;
}
public java.lang.reflect.Field getField() {
return this.field;
}
public int getFieldNumber() {
return this.fieldNumber;
}
public Class<?> getListElementType() {
return this.messageClass;
}
public Object getMapDefaultEntry() {
return this.mapDefaultEntry;
}
public OneofInfo getOneof() {
return this.oneof;
}
public Class<?> getOneofStoredType() {
return this.oneofStoredType;
}
public java.lang.reflect.Field getPresenceField() {
return this.presenceField;
}
public int getPresenceMask() {
return this.presenceMask;
}
public FieldType getType() {
return this.type;
}
public boolean isEnforceUtf8() {
return this.enforceUtf8;
}
public boolean isRequired() {
return this.required;
}
public static FieldInfo forField(java.lang.reflect.Field field, int i, FieldType fieldType, boolean z) {
checkFieldNumber(i);
Internal.checkNotNull(field, "field");
Internal.checkNotNull(fieldType, "fieldType");
if (fieldType == FieldType.MESSAGE_LIST || fieldType == FieldType.GROUP_LIST) {
throw new IllegalStateException("Shouldn't be called for repeated message fields.");
}
return new FieldInfo(field, i, fieldType, null, null, 0, false, z, null, null, null, null, null);
}
public static FieldInfo forPackedField(java.lang.reflect.Field field, int i, FieldType fieldType, java.lang.reflect.Field field2) {
checkFieldNumber(i);
Internal.checkNotNull(field, "field");
Internal.checkNotNull(fieldType, "fieldType");
if (fieldType == FieldType.MESSAGE_LIST || fieldType == FieldType.GROUP_LIST) {
throw new IllegalStateException("Shouldn't be called for repeated message fields.");
}
return new FieldInfo(field, i, fieldType, null, null, 0, false, false, null, null, null, null, field2);
}
public static FieldInfo forRepeatedMessageField(java.lang.reflect.Field field, int i, FieldType fieldType, Class<?> cls) {
checkFieldNumber(i);
Internal.checkNotNull(field, "field");
Internal.checkNotNull(fieldType, "fieldType");
Internal.checkNotNull(cls, "messageClass");
return new FieldInfo(field, i, fieldType, cls, null, 0, false, false, null, null, null, null, null);
}
public static FieldInfo forFieldWithEnumVerifier(java.lang.reflect.Field field, int i, FieldType fieldType, Internal.EnumVerifier enumVerifier) {
checkFieldNumber(i);
Internal.checkNotNull(field, "field");
return new FieldInfo(field, i, fieldType, null, null, 0, false, false, null, null, null, enumVerifier, null);
}
public static FieldInfo forPackedFieldWithEnumVerifier(java.lang.reflect.Field field, int i, FieldType fieldType, Internal.EnumVerifier enumVerifier, java.lang.reflect.Field field2) {
checkFieldNumber(i);
Internal.checkNotNull(field, "field");
return new FieldInfo(field, i, fieldType, null, null, 0, false, false, null, null, null, enumVerifier, field2);
}
public static FieldInfo forProto2OptionalField(java.lang.reflect.Field field, int i, FieldType fieldType, java.lang.reflect.Field field2, int i2, boolean z, Internal.EnumVerifier enumVerifier) {
checkFieldNumber(i);
Internal.checkNotNull(field, "field");
Internal.checkNotNull(fieldType, "fieldType");
Internal.checkNotNull(field2, "presenceField");
if (field2 != null && !isExactlyOneBitSet(i2)) {
throw new IllegalArgumentException("presenceMask must have exactly one bit set: " + i2);
}
return new FieldInfo(field, i, fieldType, null, field2, i2, false, z, null, null, null, enumVerifier, null);
}
public static FieldInfo forOneofMemberField(int i, FieldType fieldType, OneofInfo oneofInfo, Class<?> cls, boolean z, Internal.EnumVerifier enumVerifier) {
checkFieldNumber(i);
Internal.checkNotNull(fieldType, "fieldType");
Internal.checkNotNull(oneofInfo, "oneof");
Internal.checkNotNull(cls, "oneofStoredType");
if (!fieldType.isScalar()) {
throw new IllegalArgumentException("Oneof is only supported for scalar fields. Field " + i + " is of type " + fieldType);
}
return new FieldInfo(null, i, fieldType, null, null, 0, false, z, oneofInfo, cls, null, enumVerifier, null);
}
private static void checkFieldNumber(int i) {
if (i > 0) {
return;
}
throw new IllegalArgumentException("fieldNumber must be positive: " + i);
}
public static FieldInfo forProto2RequiredField(java.lang.reflect.Field field, int i, FieldType fieldType, java.lang.reflect.Field field2, int i2, boolean z, Internal.EnumVerifier enumVerifier) {
checkFieldNumber(i);
Internal.checkNotNull(field, "field");
Internal.checkNotNull(fieldType, "fieldType");
Internal.checkNotNull(field2, "presenceField");
if (field2 != null && !isExactlyOneBitSet(i2)) {
throw new IllegalArgumentException("presenceMask must have exactly one bit set: " + i2);
}
return new FieldInfo(field, i, fieldType, null, field2, i2, true, z, null, null, null, enumVerifier, null);
}
public static FieldInfo forMapField(java.lang.reflect.Field field, int i, Object obj, Internal.EnumVerifier enumVerifier) {
Internal.checkNotNull(obj, "mapDefaultEntry");
checkFieldNumber(i);
Internal.checkNotNull(field, "field");
return new FieldInfo(field, i, FieldType.MAP, null, null, 0, false, true, null, null, obj, enumVerifier, null);
}
private FieldInfo(java.lang.reflect.Field field, int i, FieldType fieldType, Class<?> cls, java.lang.reflect.Field field2, int i2, boolean z, boolean z2, OneofInfo oneofInfo, Class<?> cls2, Object obj, Internal.EnumVerifier enumVerifier, java.lang.reflect.Field field3) {
this.field = field;
this.type = fieldType;
this.messageClass = cls;
this.fieldNumber = i;
this.presenceField = field2;
this.presenceMask = i2;
this.required = z;
this.enforceUtf8 = z2;
this.oneof = oneofInfo;
this.oneofStoredType = cls2;
this.mapDefaultEntry = obj;
this.enumVerifier = enumVerifier;
this.cachedSizeField = field3;
}
@Override // java.lang.Comparable
public int compareTo(FieldInfo fieldInfo) {
return this.fieldNumber - fieldInfo.fieldNumber;
}
/* renamed from: androidx.datastore.preferences.protobuf.FieldInfo$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$FieldType;
static {
int[] iArr = new int[FieldType.values().length];
$SwitchMap$com$google$protobuf$FieldType = iArr;
try {
iArr[FieldType.MESSAGE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$FieldType[FieldType.GROUP.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$FieldType[FieldType.MESSAGE_LIST.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$FieldType[FieldType.GROUP_LIST.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
}
}
public Class<?> getMessageFieldClass() {
int i = AnonymousClass1.$SwitchMap$com$google$protobuf$FieldType[this.type.ordinal()];
if (i == 1 || i == 2) {
java.lang.reflect.Field field = this.field;
return field != null ? field.getType() : this.oneofStoredType;
}
if (i == 3 || i == 4) {
return this.messageClass;
}
return null;
}
public static Builder newBuilder() {
return new Builder(null);
}
public static final class Builder {
private java.lang.reflect.Field cachedSizeField;
private boolean enforceUtf8;
private Internal.EnumVerifier enumVerifier;
private java.lang.reflect.Field field;
private int fieldNumber;
private Object mapDefaultEntry;
private OneofInfo oneof;
private Class<?> oneofStoredType;
private java.lang.reflect.Field presenceField;
private int presenceMask;
private boolean required;
private FieldType type;
public Builder withCachedSizeField(java.lang.reflect.Field field) {
this.cachedSizeField = field;
return this;
}
public Builder withEnforceUtf8(boolean z) {
this.enforceUtf8 = z;
return this;
}
public Builder withEnumVerifier(Internal.EnumVerifier enumVerifier) {
this.enumVerifier = enumVerifier;
return this;
}
public Builder withFieldNumber(int i) {
this.fieldNumber = i;
return this;
}
public Builder withMapDefaultEntry(Object obj) {
this.mapDefaultEntry = obj;
return this;
}
public Builder withRequired(boolean z) {
this.required = z;
return this;
}
public Builder withType(FieldType fieldType) {
this.type = fieldType;
return this;
}
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
}
public Builder withField(java.lang.reflect.Field field) {
if (this.oneof != null) {
throw new IllegalStateException("Cannot set field when building a oneof.");
}
this.field = field;
return this;
}
public Builder withPresence(java.lang.reflect.Field field, int i) {
this.presenceField = (java.lang.reflect.Field) Internal.checkNotNull(field, "presenceField");
this.presenceMask = i;
return this;
}
public Builder withOneof(OneofInfo oneofInfo, Class<?> cls) {
if (this.field != null || this.presenceField != null) {
throw new IllegalStateException("Cannot set oneof when field or presenceField have been provided");
}
this.oneof = oneofInfo;
this.oneofStoredType = cls;
return this;
}
public FieldInfo build() {
OneofInfo oneofInfo = this.oneof;
if (oneofInfo != null) {
return FieldInfo.forOneofMemberField(this.fieldNumber, this.type, oneofInfo, this.oneofStoredType, this.enforceUtf8, this.enumVerifier);
}
Object obj = this.mapDefaultEntry;
if (obj != null) {
return FieldInfo.forMapField(this.field, this.fieldNumber, obj, this.enumVerifier);
}
java.lang.reflect.Field field = this.presenceField;
if (field != null) {
if (this.required) {
return FieldInfo.forProto2RequiredField(this.field, this.fieldNumber, this.type, field, this.presenceMask, this.enforceUtf8, this.enumVerifier);
}
return FieldInfo.forProto2OptionalField(this.field, this.fieldNumber, this.type, field, this.presenceMask, this.enforceUtf8, this.enumVerifier);
}
Internal.EnumVerifier enumVerifier = this.enumVerifier;
if (enumVerifier != null) {
java.lang.reflect.Field field2 = this.cachedSizeField;
if (field2 == null) {
return FieldInfo.forFieldWithEnumVerifier(this.field, this.fieldNumber, this.type, enumVerifier);
}
return FieldInfo.forPackedFieldWithEnumVerifier(this.field, this.fieldNumber, this.type, enumVerifier, field2);
}
java.lang.reflect.Field field3 = this.cachedSizeField;
if (field3 == null) {
return FieldInfo.forField(this.field, this.fieldNumber, this.type, this.enforceUtf8);
}
return FieldInfo.forPackedField(this.field, this.fieldNumber, this.type, field3);
}
}
}

View File

@@ -0,0 +1,284 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.Internal;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class FieldMask extends GeneratedMessageLite<FieldMask, Builder> implements FieldMaskOrBuilder {
private static final FieldMask DEFAULT_INSTANCE;
private static volatile Parser<FieldMask> PARSER = null;
public static final int PATHS_FIELD_NUMBER = 1;
private Internal.ProtobufList<String> paths_ = GeneratedMessageLite.emptyProtobufList();
public static FieldMask getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@Override // androidx.datastore.preferences.protobuf.FieldMaskOrBuilder
public List<String> getPathsList() {
return this.paths_;
}
private FieldMask() {
}
@Override // androidx.datastore.preferences.protobuf.FieldMaskOrBuilder
public int getPathsCount() {
return this.paths_.size();
}
@Override // androidx.datastore.preferences.protobuf.FieldMaskOrBuilder
public String getPaths(int i) {
return this.paths_.get(i);
}
@Override // androidx.datastore.preferences.protobuf.FieldMaskOrBuilder
public ByteString getPathsBytes(int i) {
return ByteString.copyFromUtf8(this.paths_.get(i));
}
private void ensurePathsIsMutable() {
if (this.paths_.isModifiable()) {
return;
}
this.paths_ = GeneratedMessageLite.mutableCopy(this.paths_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setPaths(int i, String str) {
str.getClass();
ensurePathsIsMutable();
this.paths_.set(i, str);
}
/* JADX INFO: Access modifiers changed from: private */
public void addPaths(String str) {
str.getClass();
ensurePathsIsMutable();
this.paths_.add(str);
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllPaths(Iterable<String> iterable) {
ensurePathsIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.paths_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearPaths() {
this.paths_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void addPathsBytes(ByteString byteString) {
byteString.getClass();
AbstractMessageLite.checkByteStringIsUtf8(byteString);
ensurePathsIsMutable();
this.paths_.add(byteString.toStringUtf8());
}
public static FieldMask parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static FieldMask parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static FieldMask parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static FieldMask parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static FieldMask parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static FieldMask parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static FieldMask parseFrom(InputStream inputStream) throws IOException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static FieldMask parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static FieldMask parseDelimitedFrom(InputStream inputStream) throws IOException {
return (FieldMask) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static FieldMask parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (FieldMask) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static FieldMask parseFrom(CodedInputStream codedInputStream) throws IOException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static FieldMask parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (FieldMask) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(FieldMask fieldMask) {
return DEFAULT_INSTANCE.createBuilder(fieldMask);
}
public static final class Builder extends GeneratedMessageLite.Builder<FieldMask, Builder> implements FieldMaskOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(FieldMask.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.FieldMaskOrBuilder
public List<String> getPathsList() {
return Collections.unmodifiableList(((FieldMask) this.instance).getPathsList());
}
@Override // androidx.datastore.preferences.protobuf.FieldMaskOrBuilder
public int getPathsCount() {
return ((FieldMask) this.instance).getPathsCount();
}
@Override // androidx.datastore.preferences.protobuf.FieldMaskOrBuilder
public String getPaths(int i) {
return ((FieldMask) this.instance).getPaths(i);
}
@Override // androidx.datastore.preferences.protobuf.FieldMaskOrBuilder
public ByteString getPathsBytes(int i) {
return ((FieldMask) this.instance).getPathsBytes(i);
}
public Builder setPaths(int i, String str) {
copyOnWrite();
((FieldMask) this.instance).setPaths(i, str);
return this;
}
public Builder addPaths(String str) {
copyOnWrite();
((FieldMask) this.instance).addPaths(str);
return this;
}
public Builder addAllPaths(Iterable<String> iterable) {
copyOnWrite();
((FieldMask) this.instance).addAllPaths(iterable);
return this;
}
public Builder clearPaths() {
copyOnWrite();
((FieldMask) this.instance).clearPaths();
return this;
}
public Builder addPathsBytes(ByteString byteString) {
copyOnWrite();
((FieldMask) this.instance).addPathsBytes(byteString);
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.FieldMask$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new FieldMask();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001Ț", new Object[]{"paths_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<FieldMask> parser = PARSER;
if (parser == null) {
synchronized (FieldMask.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
FieldMask fieldMask = new FieldMask();
DEFAULT_INSTANCE = fieldMask;
GeneratedMessageLite.registerDefaultInstance(FieldMask.class, fieldMask);
}
public static Parser<FieldMask> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,14 @@
package androidx.datastore.preferences.protobuf;
import java.util.List;
/* loaded from: classes.dex */
public interface FieldMaskOrBuilder extends MessageLiteOrBuilder {
String getPaths(int i);
ByteString getPathsBytes(int i);
int getPathsCount();
List<String> getPathsList();
}

View File

@@ -0,0 +1,10 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public final class FieldMaskProto {
public static void registerAllExtensions(ExtensionRegistryLite extensionRegistryLite) {
}
private FieldMaskProto() {
}
}

View File

@@ -0,0 +1,43 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Field;
import java.util.List;
/* loaded from: classes.dex */
public interface FieldOrBuilder extends MessageLiteOrBuilder {
Field.Cardinality getCardinality();
int getCardinalityValue();
String getDefaultValue();
ByteString getDefaultValueBytes();
String getJsonName();
ByteString getJsonNameBytes();
Field.Kind getKind();
int getKindValue();
String getName();
ByteString getNameBytes();
int getNumber();
int getOneofIndex();
Option getOptions(int i);
int getOptionsCount();
List<Option> getOptionsList();
boolean getPacked();
String getTypeUrl();
ByteString getTypeUrlBytes();
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,407 @@
package androidx.datastore.preferences.protobuf;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.TypeVariable;
import java.util.List;
/* JADX WARN: Enum visitor error
jadx.core.utils.exceptions.JadxRuntimeException: Init of enum field 'DOUBLE' uses external variables
at jadx.core.dex.visitors.EnumVisitor.createEnumFieldByConstructor(EnumVisitor.java:451)
at jadx.core.dex.visitors.EnumVisitor.processEnumFieldByRegister(EnumVisitor.java:395)
at jadx.core.dex.visitors.EnumVisitor.extractEnumFieldsFromFilledArray(EnumVisitor.java:324)
at jadx.core.dex.visitors.EnumVisitor.extractEnumFieldsFromInsn(EnumVisitor.java:262)
at jadx.core.dex.visitors.EnumVisitor.convertToEnum(EnumVisitor.java:151)
at jadx.core.dex.visitors.EnumVisitor.visit(EnumVisitor.java:100)
*/
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* loaded from: classes.dex */
public final class FieldType {
private static final /* synthetic */ FieldType[] $VALUES;
public static final FieldType BOOL;
public static final FieldType BOOL_LIST;
public static final FieldType BOOL_LIST_PACKED;
public static final FieldType BYTES;
public static final FieldType BYTES_LIST;
public static final FieldType DOUBLE;
public static final FieldType DOUBLE_LIST;
public static final FieldType DOUBLE_LIST_PACKED;
private static final java.lang.reflect.Type[] EMPTY_TYPES;
public static final FieldType ENUM;
public static final FieldType ENUM_LIST;
public static final FieldType ENUM_LIST_PACKED;
public static final FieldType FIXED32;
public static final FieldType FIXED32_LIST;
public static final FieldType FIXED32_LIST_PACKED;
public static final FieldType FIXED64;
public static final FieldType FIXED64_LIST;
public static final FieldType FIXED64_LIST_PACKED;
public static final FieldType FLOAT;
public static final FieldType FLOAT_LIST;
public static final FieldType FLOAT_LIST_PACKED;
public static final FieldType GROUP;
public static final FieldType GROUP_LIST;
public static final FieldType INT32;
public static final FieldType INT32_LIST;
public static final FieldType INT32_LIST_PACKED;
public static final FieldType INT64;
public static final FieldType INT64_LIST;
public static final FieldType INT64_LIST_PACKED;
public static final FieldType MAP;
public static final FieldType MESSAGE;
public static final FieldType MESSAGE_LIST;
public static final FieldType SFIXED32;
public static final FieldType SFIXED32_LIST;
public static final FieldType SFIXED32_LIST_PACKED;
public static final FieldType SFIXED64;
public static final FieldType SFIXED64_LIST;
public static final FieldType SFIXED64_LIST_PACKED;
public static final FieldType SINT32;
public static final FieldType SINT32_LIST;
public static final FieldType SINT32_LIST_PACKED;
public static final FieldType SINT64;
public static final FieldType SINT64_LIST;
public static final FieldType SINT64_LIST_PACKED;
public static final FieldType STRING;
public static final FieldType STRING_LIST;
public static final FieldType UINT32;
public static final FieldType UINT32_LIST;
public static final FieldType UINT32_LIST_PACKED;
public static final FieldType UINT64;
public static final FieldType UINT64_LIST;
public static final FieldType UINT64_LIST_PACKED;
private static final FieldType[] VALUES;
private final Collection collection;
private final Class<?> elementType;
private final int id;
private final JavaType javaType;
private final boolean primitiveScalar;
public JavaType getJavaType() {
return this.javaType;
}
public int id() {
return this.id;
}
public boolean isPrimitiveScalar() {
return this.primitiveScalar;
}
public static FieldType valueOf(String str) {
return (FieldType) java.lang.Enum.valueOf(FieldType.class, str);
}
public static FieldType[] values() {
return (FieldType[]) $VALUES.clone();
}
static {
Collection collection = Collection.SCALAR;
JavaType javaType = JavaType.DOUBLE;
FieldType fieldType = new FieldType("DOUBLE", 0, 0, collection, javaType);
DOUBLE = fieldType;
JavaType javaType2 = JavaType.FLOAT;
FieldType fieldType2 = new FieldType("FLOAT", 1, 1, collection, javaType2);
FLOAT = fieldType2;
JavaType javaType3 = JavaType.LONG;
FieldType fieldType3 = new FieldType("INT64", 2, 2, collection, javaType3);
INT64 = fieldType3;
FieldType fieldType4 = new FieldType("UINT64", 3, 3, collection, javaType3);
UINT64 = fieldType4;
JavaType javaType4 = JavaType.INT;
FieldType fieldType5 = new FieldType("INT32", 4, 4, collection, javaType4);
INT32 = fieldType5;
FieldType fieldType6 = new FieldType("FIXED64", 5, 5, collection, javaType3);
FIXED64 = fieldType6;
FieldType fieldType7 = new FieldType("FIXED32", 6, 6, collection, javaType4);
FIXED32 = fieldType7;
JavaType javaType5 = JavaType.BOOLEAN;
FieldType fieldType8 = new FieldType("BOOL", 7, 7, collection, javaType5);
BOOL = fieldType8;
JavaType javaType6 = JavaType.STRING;
FieldType fieldType9 = new FieldType("STRING", 8, 8, collection, javaType6);
STRING = fieldType9;
JavaType javaType7 = JavaType.MESSAGE;
FieldType fieldType10 = new FieldType("MESSAGE", 9, 9, collection, javaType7);
MESSAGE = fieldType10;
JavaType javaType8 = JavaType.BYTE_STRING;
FieldType fieldType11 = new FieldType("BYTES", 10, 10, collection, javaType8);
BYTES = fieldType11;
FieldType fieldType12 = new FieldType("UINT32", 11, 11, collection, javaType4);
UINT32 = fieldType12;
JavaType javaType9 = JavaType.ENUM;
FieldType fieldType13 = new FieldType("ENUM", 12, 12, collection, javaType9);
ENUM = fieldType13;
FieldType fieldType14 = new FieldType("SFIXED32", 13, 13, collection, javaType4);
SFIXED32 = fieldType14;
FieldType fieldType15 = new FieldType("SFIXED64", 14, 14, collection, javaType3);
SFIXED64 = fieldType15;
FieldType fieldType16 = new FieldType("SINT32", 15, 15, collection, javaType4);
SINT32 = fieldType16;
FieldType fieldType17 = new FieldType("SINT64", 16, 16, collection, javaType3);
SINT64 = fieldType17;
FieldType fieldType18 = new FieldType("GROUP", 17, 17, collection, javaType7);
GROUP = fieldType18;
Collection collection2 = Collection.VECTOR;
FieldType fieldType19 = new FieldType("DOUBLE_LIST", 18, 18, collection2, javaType);
DOUBLE_LIST = fieldType19;
FieldType fieldType20 = new FieldType("FLOAT_LIST", 19, 19, collection2, javaType2);
FLOAT_LIST = fieldType20;
FieldType fieldType21 = new FieldType("INT64_LIST", 20, 20, collection2, javaType3);
INT64_LIST = fieldType21;
FieldType fieldType22 = new FieldType("UINT64_LIST", 21, 21, collection2, javaType3);
UINT64_LIST = fieldType22;
FieldType fieldType23 = new FieldType("INT32_LIST", 22, 22, collection2, javaType4);
INT32_LIST = fieldType23;
FieldType fieldType24 = new FieldType("FIXED64_LIST", 23, 23, collection2, javaType3);
FIXED64_LIST = fieldType24;
FieldType fieldType25 = new FieldType("FIXED32_LIST", 24, 24, collection2, javaType4);
FIXED32_LIST = fieldType25;
FieldType fieldType26 = new FieldType("BOOL_LIST", 25, 25, collection2, javaType5);
BOOL_LIST = fieldType26;
FieldType fieldType27 = new FieldType("STRING_LIST", 26, 26, collection2, javaType6);
STRING_LIST = fieldType27;
FieldType fieldType28 = new FieldType("MESSAGE_LIST", 27, 27, collection2, javaType7);
MESSAGE_LIST = fieldType28;
FieldType fieldType29 = new FieldType("BYTES_LIST", 28, 28, collection2, javaType8);
BYTES_LIST = fieldType29;
FieldType fieldType30 = new FieldType("UINT32_LIST", 29, 29, collection2, javaType4);
UINT32_LIST = fieldType30;
FieldType fieldType31 = new FieldType("ENUM_LIST", 30, 30, collection2, javaType9);
ENUM_LIST = fieldType31;
FieldType fieldType32 = new FieldType("SFIXED32_LIST", 31, 31, collection2, javaType4);
SFIXED32_LIST = fieldType32;
FieldType fieldType33 = new FieldType("SFIXED64_LIST", 32, 32, collection2, javaType3);
SFIXED64_LIST = fieldType33;
FieldType fieldType34 = new FieldType("SINT32_LIST", 33, 33, collection2, javaType4);
SINT32_LIST = fieldType34;
FieldType fieldType35 = new FieldType("SINT64_LIST", 34, 34, collection2, javaType3);
SINT64_LIST = fieldType35;
Collection collection3 = Collection.PACKED_VECTOR;
FieldType fieldType36 = new FieldType("DOUBLE_LIST_PACKED", 35, 35, collection3, javaType);
DOUBLE_LIST_PACKED = fieldType36;
FieldType fieldType37 = new FieldType("FLOAT_LIST_PACKED", 36, 36, collection3, javaType2);
FLOAT_LIST_PACKED = fieldType37;
FieldType fieldType38 = new FieldType("INT64_LIST_PACKED", 37, 37, collection3, javaType3);
INT64_LIST_PACKED = fieldType38;
FieldType fieldType39 = new FieldType("UINT64_LIST_PACKED", 38, 38, collection3, javaType3);
UINT64_LIST_PACKED = fieldType39;
FieldType fieldType40 = new FieldType("INT32_LIST_PACKED", 39, 39, collection3, javaType4);
INT32_LIST_PACKED = fieldType40;
FieldType fieldType41 = new FieldType("FIXED64_LIST_PACKED", 40, 40, collection3, javaType3);
FIXED64_LIST_PACKED = fieldType41;
FieldType fieldType42 = new FieldType("FIXED32_LIST_PACKED", 41, 41, collection3, javaType4);
FIXED32_LIST_PACKED = fieldType42;
FieldType fieldType43 = new FieldType("BOOL_LIST_PACKED", 42, 42, collection3, javaType5);
BOOL_LIST_PACKED = fieldType43;
FieldType fieldType44 = new FieldType("UINT32_LIST_PACKED", 43, 43, collection3, javaType4);
UINT32_LIST_PACKED = fieldType44;
FieldType fieldType45 = new FieldType("ENUM_LIST_PACKED", 44, 44, collection3, javaType9);
ENUM_LIST_PACKED = fieldType45;
FieldType fieldType46 = new FieldType("SFIXED32_LIST_PACKED", 45, 45, collection3, javaType4);
SFIXED32_LIST_PACKED = fieldType46;
FieldType fieldType47 = new FieldType("SFIXED64_LIST_PACKED", 46, 46, collection3, javaType3);
SFIXED64_LIST_PACKED = fieldType47;
FieldType fieldType48 = new FieldType("SINT32_LIST_PACKED", 47, 47, collection3, javaType4);
SINT32_LIST_PACKED = fieldType48;
FieldType fieldType49 = new FieldType("SINT64_LIST_PACKED", 48, 48, collection3, javaType3);
SINT64_LIST_PACKED = fieldType49;
FieldType fieldType50 = new FieldType("GROUP_LIST", 49, 49, collection2, javaType7);
GROUP_LIST = fieldType50;
FieldType fieldType51 = new FieldType("MAP", 50, 50, Collection.MAP, JavaType.VOID);
MAP = fieldType51;
$VALUES = new FieldType[]{fieldType, fieldType2, fieldType3, fieldType4, fieldType5, fieldType6, fieldType7, fieldType8, fieldType9, fieldType10, fieldType11, fieldType12, fieldType13, fieldType14, fieldType15, fieldType16, fieldType17, fieldType18, fieldType19, fieldType20, fieldType21, fieldType22, fieldType23, fieldType24, fieldType25, fieldType26, fieldType27, fieldType28, fieldType29, fieldType30, fieldType31, fieldType32, fieldType33, fieldType34, fieldType35, fieldType36, fieldType37, fieldType38, fieldType39, fieldType40, fieldType41, fieldType42, fieldType43, fieldType44, fieldType45, fieldType46, fieldType47, fieldType48, fieldType49, fieldType50, fieldType51};
EMPTY_TYPES = new java.lang.reflect.Type[0];
FieldType[] values = values();
VALUES = new FieldType[values.length];
for (FieldType fieldType52 : values) {
VALUES[fieldType52.id] = fieldType52;
}
}
private FieldType(String str, int i, int i2, Collection collection, JavaType javaType) {
int i3;
this.id = i2;
this.collection = collection;
this.javaType = javaType;
int i4 = AnonymousClass1.$SwitchMap$com$google$protobuf$FieldType$Collection[collection.ordinal()];
if (i4 == 1) {
this.elementType = javaType.getBoxedType();
} else if (i4 != 2) {
this.elementType = null;
} else {
this.elementType = javaType.getBoxedType();
}
this.primitiveScalar = (collection != Collection.SCALAR || (i3 = AnonymousClass1.$SwitchMap$com$google$protobuf$JavaType[javaType.ordinal()]) == 1 || i3 == 2 || i3 == 3) ? false : true;
}
/* renamed from: androidx.datastore.preferences.protobuf.FieldType$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$FieldType$Collection;
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$JavaType;
static {
int[] iArr = new int[JavaType.values().length];
$SwitchMap$com$google$protobuf$JavaType = iArr;
try {
iArr[JavaType.BYTE_STRING.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$JavaType[JavaType.MESSAGE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$JavaType[JavaType.STRING.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
int[] iArr2 = new int[Collection.values().length];
$SwitchMap$com$google$protobuf$FieldType$Collection = iArr2;
try {
iArr2[Collection.MAP.ordinal()] = 1;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$FieldType$Collection[Collection.VECTOR.ordinal()] = 2;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$FieldType$Collection[Collection.SCALAR.ordinal()] = 3;
} catch (NoSuchFieldError unused6) {
}
}
}
public boolean isPacked() {
return Collection.PACKED_VECTOR.equals(this.collection);
}
public boolean isScalar() {
return this.collection == Collection.SCALAR;
}
public boolean isList() {
return this.collection.isList();
}
public boolean isMap() {
return this.collection == Collection.MAP;
}
public boolean isValidForField(java.lang.reflect.Field field) {
if (Collection.VECTOR.equals(this.collection)) {
return isValidForList(field);
}
return this.javaType.getType().isAssignableFrom(field.getType());
}
private boolean isValidForList(java.lang.reflect.Field field) {
Class<?> type = field.getType();
if (!this.javaType.getType().isAssignableFrom(type)) {
return false;
}
java.lang.reflect.Type[] typeArr = EMPTY_TYPES;
if (field.getGenericType() instanceof ParameterizedType) {
typeArr = ((ParameterizedType) field.getGenericType()).getActualTypeArguments();
}
java.lang.reflect.Type listParameter = getListParameter(type, typeArr);
if (listParameter instanceof Class) {
return this.elementType.isAssignableFrom((Class) listParameter);
}
return true;
}
public static FieldType forId(int i) {
if (i < 0) {
return null;
}
FieldType[] fieldTypeArr = VALUES;
if (i >= fieldTypeArr.length) {
return null;
}
return fieldTypeArr[i];
}
private static java.lang.reflect.Type getGenericSuperList(Class<?> cls) {
for (java.lang.reflect.Type type : cls.getGenericInterfaces()) {
if ((type instanceof ParameterizedType) && List.class.isAssignableFrom((Class) ((ParameterizedType) type).getRawType())) {
return type;
}
}
java.lang.reflect.Type genericSuperclass = cls.getGenericSuperclass();
if ((genericSuperclass instanceof ParameterizedType) && List.class.isAssignableFrom((Class) ((ParameterizedType) genericSuperclass).getRawType())) {
return genericSuperclass;
}
return null;
}
private static java.lang.reflect.Type getListParameter(Class<?> cls, java.lang.reflect.Type[] typeArr) {
while (true) {
int i = 0;
if (cls != List.class) {
java.lang.reflect.Type genericSuperList = getGenericSuperList(cls);
if (genericSuperList instanceof ParameterizedType) {
ParameterizedType parameterizedType = (ParameterizedType) genericSuperList;
java.lang.reflect.Type[] actualTypeArguments = parameterizedType.getActualTypeArguments();
for (int i2 = 0; i2 < actualTypeArguments.length; i2++) {
java.lang.reflect.Type type = actualTypeArguments[i2];
if (type instanceof TypeVariable) {
TypeVariable<Class<?>>[] typeParameters = cls.getTypeParameters();
if (typeArr.length != typeParameters.length) {
throw new RuntimeException("Type array mismatch");
}
for (int i3 = 0; i3 < typeParameters.length; i3++) {
if (type == typeParameters[i3]) {
actualTypeArguments[i2] = typeArr[i3];
}
}
throw new RuntimeException("Unable to find replacement for " + type);
}
}
cls = (Class) parameterizedType.getRawType();
typeArr = actualTypeArguments;
} else {
typeArr = EMPTY_TYPES;
Class<?>[] interfaces = cls.getInterfaces();
int length = interfaces.length;
while (true) {
if (i < length) {
Class<?> cls2 = interfaces[i];
if (List.class.isAssignableFrom(cls2)) {
cls = cls2;
break;
}
i++;
} else {
cls = cls.getSuperclass();
break;
}
}
}
} else {
if (typeArr.length != 1) {
throw new RuntimeException("Unable to identify parameter type for List<T>");
}
return typeArr[0];
}
}
}
public enum Collection {
SCALAR(false),
VECTOR(true),
PACKED_VECTOR(true),
MAP(false);
private final boolean isList;
public boolean isList() {
return this.isList;
}
Collection(boolean z) {
this.isList = z;
}
}
}

View File

@@ -0,0 +1,228 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
import java.util.AbstractList;
import java.util.Arrays;
import java.util.Collection;
import java.util.RandomAccess;
/* loaded from: classes.dex */
final class FloatArrayList extends AbstractProtobufList<Float> implements Internal.FloatList, RandomAccess, PrimitiveNonBoxingCollection {
private static final FloatArrayList EMPTY_LIST;
private float[] array;
private int size;
public static FloatArrayList emptyList() {
return EMPTY_LIST;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public int size() {
return this.size;
}
static {
FloatArrayList floatArrayList = new FloatArrayList(new float[0], 0);
EMPTY_LIST = floatArrayList;
floatArrayList.makeImmutable();
}
public FloatArrayList() {
this(new float[10], 0);
}
private FloatArrayList(float[] fArr, int i) {
this.array = fArr;
this.size = i;
}
@Override // java.util.AbstractList
public void removeRange(int i, int i2) {
ensureIsMutable();
if (i2 < i) {
throw new IndexOutOfBoundsException("toIndex < fromIndex");
}
float[] fArr = this.array;
System.arraycopy(fArr, i2, fArr, i, this.size - i2);
this.size -= i2 - i;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof FloatArrayList)) {
return super.equals(obj);
}
FloatArrayList floatArrayList = (FloatArrayList) obj;
if (this.size != floatArrayList.size) {
return false;
}
float[] fArr = floatArrayList.array;
for (int i = 0; i < this.size; i++) {
if (Float.floatToIntBits(this.array[i]) != Float.floatToIntBits(fArr[i])) {
return false;
}
}
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public int hashCode() {
int i = 1;
for (int i2 = 0; i2 < this.size; i2++) {
i = (i * 31) + Float.floatToIntBits(this.array[i2]);
}
return i;
}
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
/* renamed from: mutableCopyWithCapacity */
public Internal.ProtobufList<Float> mutableCopyWithCapacity2(int i) {
if (i < this.size) {
throw new IllegalArgumentException();
}
return new FloatArrayList(Arrays.copyOf(this.array, i), this.size);
}
@Override // java.util.AbstractList, java.util.List
public Float get(int i) {
return Float.valueOf(getFloat(i));
}
@Override // androidx.datastore.preferences.protobuf.Internal.FloatList
public float getFloat(int i) {
ensureIndexInRange(i);
return this.array[i];
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Float set(int i, Float f) {
return Float.valueOf(setFloat(i, f.floatValue()));
}
@Override // androidx.datastore.preferences.protobuf.Internal.FloatList
public float setFloat(int i, float f) {
ensureIsMutable();
ensureIndexInRange(i);
float[] fArr = this.array;
float f2 = fArr[i];
fArr[i] = f;
return f2;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean add(Float f) {
addFloat(f.floatValue());
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public void add(int i, Float f) {
addFloat(i, f.floatValue());
}
@Override // androidx.datastore.preferences.protobuf.Internal.FloatList
public void addFloat(float f) {
ensureIsMutable();
int i = this.size;
float[] fArr = this.array;
if (i == fArr.length) {
float[] fArr2 = new float[((i * 3) / 2) + 1];
System.arraycopy(fArr, 0, fArr2, 0, i);
this.array = fArr2;
}
float[] fArr3 = this.array;
int i2 = this.size;
this.size = i2 + 1;
fArr3[i2] = f;
}
private void addFloat(int i, float f) {
int i2;
ensureIsMutable();
if (i < 0 || i > (i2 = this.size)) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
float[] fArr = this.array;
if (i2 < fArr.length) {
System.arraycopy(fArr, i, fArr, i + 1, i2 - i);
} else {
float[] fArr2 = new float[((i2 * 3) / 2) + 1];
System.arraycopy(fArr, 0, fArr2, 0, i);
System.arraycopy(this.array, i, fArr2, i + 1, this.size - i);
this.array = fArr2;
}
this.array[i] = f;
this.size++;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean addAll(Collection<? extends Float> collection) {
ensureIsMutable();
Internal.checkNotNull(collection);
if (!(collection instanceof FloatArrayList)) {
return super.addAll(collection);
}
FloatArrayList floatArrayList = (FloatArrayList) collection;
int i = floatArrayList.size;
if (i == 0) {
return false;
}
int i2 = this.size;
if (Integer.MAX_VALUE - i2 < i) {
throw new OutOfMemoryError();
}
int i3 = i2 + i;
float[] fArr = this.array;
if (i3 > fArr.length) {
this.array = Arrays.copyOf(fArr, i3);
}
System.arraycopy(floatArrayList.array, 0, this.array, this.size, floatArrayList.size);
this.size = i3;
((AbstractList) this).modCount++;
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean remove(Object obj) {
ensureIsMutable();
for (int i = 0; i < this.size; i++) {
if (obj.equals(Float.valueOf(this.array[i]))) {
float[] fArr = this.array;
System.arraycopy(fArr, i + 1, fArr, i, (this.size - i) - 1);
this.size--;
((AbstractList) this).modCount++;
return true;
}
}
return false;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Float remove(int i) {
ensureIsMutable();
ensureIndexInRange(i);
float[] fArr = this.array;
float f = fArr[i];
if (i < this.size - 1) {
System.arraycopy(fArr, i + 1, fArr, i, (r2 - i) - 1);
}
this.size--;
((AbstractList) this).modCount++;
return Float.valueOf(f);
}
private void ensureIndexInRange(int i) {
if (i < 0 || i >= this.size) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
}
private String makeOutOfBoundsExceptionMessage(int i) {
return "Index:" + i + ", Size:" + this.size;
}
}

View File

@@ -0,0 +1,207 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class FloatValue extends GeneratedMessageLite<FloatValue, Builder> implements FloatValueOrBuilder {
private static final FloatValue DEFAULT_INSTANCE;
private static volatile Parser<FloatValue> PARSER = null;
public static final int VALUE_FIELD_NUMBER = 1;
private float value_;
/* JADX INFO: Access modifiers changed from: private */
public void clearValue() {
this.value_ = 0.0f;
}
public static FloatValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setValue(float f) {
this.value_ = f;
}
@Override // androidx.datastore.preferences.protobuf.FloatValueOrBuilder
public float getValue() {
return this.value_;
}
private FloatValue() {
}
public static FloatValue parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static FloatValue parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static FloatValue parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static FloatValue parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static FloatValue parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static FloatValue parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static FloatValue parseFrom(InputStream inputStream) throws IOException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static FloatValue parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static FloatValue parseDelimitedFrom(InputStream inputStream) throws IOException {
return (FloatValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static FloatValue parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (FloatValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static FloatValue parseFrom(CodedInputStream codedInputStream) throws IOException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static FloatValue parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (FloatValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(FloatValue floatValue) {
return DEFAULT_INSTANCE.createBuilder(floatValue);
}
public static final class Builder extends GeneratedMessageLite.Builder<FloatValue, Builder> implements FloatValueOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(FloatValue.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.FloatValueOrBuilder
public float getValue() {
return ((FloatValue) this.instance).getValue();
}
public Builder setValue(float f) {
copyOnWrite();
((FloatValue) this.instance).setValue(f);
return this;
}
public Builder clearValue() {
copyOnWrite();
((FloatValue) this.instance).clearValue();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.FloatValue$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new FloatValue();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0001", new Object[]{"value_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<FloatValue> parser = PARSER;
if (parser == null) {
synchronized (FloatValue.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
FloatValue floatValue = new FloatValue();
DEFAULT_INSTANCE = floatValue;
GeneratedMessageLite.registerDefaultInstance(FloatValue.class, floatValue);
}
public static FloatValue of(float f) {
return newBuilder().setValue(f).build();
}
public static Parser<FloatValue> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,6 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface FloatValueOrBuilder extends MessageLiteOrBuilder {
float getValue();
}

View File

@@ -0,0 +1,30 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
class GeneratedMessageInfoFactory implements MessageInfoFactory {
private static final GeneratedMessageInfoFactory instance = new GeneratedMessageInfoFactory();
public static GeneratedMessageInfoFactory getInstance() {
return instance;
}
private GeneratedMessageInfoFactory() {
}
@Override // androidx.datastore.preferences.protobuf.MessageInfoFactory
public boolean isSupported(Class<?> cls) {
return GeneratedMessageLite.class.isAssignableFrom(cls);
}
@Override // androidx.datastore.preferences.protobuf.MessageInfoFactory
public MessageInfo messageInfoFor(Class<?> cls) {
if (!GeneratedMessageLite.class.isAssignableFrom(cls)) {
throw new IllegalArgumentException("Unsupported message type: " + cls.getName());
}
try {
return (MessageInfo) GeneratedMessageLite.getDefaultInstance(cls.asSubclass(GeneratedMessageLite.class)).buildMessageInfo();
} catch (Exception e) {
throw new RuntimeException("Unable to get message info for " + cls.getName(), e);
}
}
}

View File

@@ -0,0 +1,207 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class Int32Value extends GeneratedMessageLite<Int32Value, Builder> implements Int32ValueOrBuilder {
private static final Int32Value DEFAULT_INSTANCE;
private static volatile Parser<Int32Value> PARSER = null;
public static final int VALUE_FIELD_NUMBER = 1;
private int value_;
/* JADX INFO: Access modifiers changed from: private */
public void clearValue() {
this.value_ = 0;
}
public static Int32Value getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setValue(int i) {
this.value_ = i;
}
@Override // androidx.datastore.preferences.protobuf.Int32ValueOrBuilder
public int getValue() {
return this.value_;
}
private Int32Value() {
}
public static Int32Value parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static Int32Value parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static Int32Value parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static Int32Value parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static Int32Value parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static Int32Value parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static Int32Value parseFrom(InputStream inputStream) throws IOException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static Int32Value parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Int32Value parseDelimitedFrom(InputStream inputStream) throws IOException {
return (Int32Value) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static Int32Value parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Int32Value) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Int32Value parseFrom(CodedInputStream codedInputStream) throws IOException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static Int32Value parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Int32Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Int32Value int32Value) {
return DEFAULT_INSTANCE.createBuilder(int32Value);
}
public static final class Builder extends GeneratedMessageLite.Builder<Int32Value, Builder> implements Int32ValueOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(Int32Value.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.Int32ValueOrBuilder
public int getValue() {
return ((Int32Value) this.instance).getValue();
}
public Builder setValue(int i) {
copyOnWrite();
((Int32Value) this.instance).setValue(i);
return this;
}
public Builder clearValue() {
copyOnWrite();
((Int32Value) this.instance).clearValue();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.Int32Value$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new Int32Value();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0004", new Object[]{"value_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<Int32Value> parser = PARSER;
if (parser == null) {
synchronized (Int32Value.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
Int32Value int32Value = new Int32Value();
DEFAULT_INSTANCE = int32Value;
GeneratedMessageLite.registerDefaultInstance(Int32Value.class, int32Value);
}
public static Int32Value of(int i) {
return newBuilder().setValue(i).build();
}
public static Parser<Int32Value> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,6 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface Int32ValueOrBuilder extends MessageLiteOrBuilder {
int getValue();
}

View File

@@ -0,0 +1,207 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class Int64Value extends GeneratedMessageLite<Int64Value, Builder> implements Int64ValueOrBuilder {
private static final Int64Value DEFAULT_INSTANCE;
private static volatile Parser<Int64Value> PARSER = null;
public static final int VALUE_FIELD_NUMBER = 1;
private long value_;
/* JADX INFO: Access modifiers changed from: private */
public void clearValue() {
this.value_ = 0L;
}
public static Int64Value getDefaultInstance() {
return DEFAULT_INSTANCE;
}
/* JADX INFO: Access modifiers changed from: private */
public void setValue(long j) {
this.value_ = j;
}
@Override // androidx.datastore.preferences.protobuf.Int64ValueOrBuilder
public long getValue() {
return this.value_;
}
private Int64Value() {
}
public static Int64Value parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static Int64Value parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static Int64Value parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static Int64Value parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static Int64Value parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static Int64Value parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static Int64Value parseFrom(InputStream inputStream) throws IOException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static Int64Value parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Int64Value parseDelimitedFrom(InputStream inputStream) throws IOException {
return (Int64Value) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static Int64Value parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Int64Value) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static Int64Value parseFrom(CodedInputStream codedInputStream) throws IOException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static Int64Value parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (Int64Value) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(Int64Value int64Value) {
return DEFAULT_INSTANCE.createBuilder(int64Value);
}
public static final class Builder extends GeneratedMessageLite.Builder<Int64Value, Builder> implements Int64ValueOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(Int64Value.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.Int64ValueOrBuilder
public long getValue() {
return ((Int64Value) this.instance).getValue();
}
public Builder setValue(long j) {
copyOnWrite();
((Int64Value) this.instance).setValue(j);
return this;
}
public Builder clearValue() {
copyOnWrite();
((Int64Value) this.instance).clearValue();
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.Int64Value$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new Int64Value();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0002", new Object[]{"value_"});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<Int64Value> parser = PARSER;
if (parser == null) {
synchronized (Int64Value.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
Int64Value int64Value = new Int64Value();
DEFAULT_INSTANCE = int64Value;
GeneratedMessageLite.registerDefaultInstance(Int64Value.class, int64Value);
}
public static Int64Value of(long j) {
return newBuilder().setValue(j).build();
}
public static Parser<Int64Value> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,6 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
public interface Int64ValueOrBuilder extends MessageLiteOrBuilder {
long getValue();
}

View File

@@ -0,0 +1,228 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
import java.util.AbstractList;
import java.util.Arrays;
import java.util.Collection;
import java.util.RandomAccess;
/* loaded from: classes.dex */
final class IntArrayList extends AbstractProtobufList<Integer> implements Internal.IntList, RandomAccess, PrimitiveNonBoxingCollection {
private static final IntArrayList EMPTY_LIST;
private int[] array;
private int size;
public static IntArrayList emptyList() {
return EMPTY_LIST;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public int size() {
return this.size;
}
static {
IntArrayList intArrayList = new IntArrayList(new int[0], 0);
EMPTY_LIST = intArrayList;
intArrayList.makeImmutable();
}
public IntArrayList() {
this(new int[10], 0);
}
private IntArrayList(int[] iArr, int i) {
this.array = iArr;
this.size = i;
}
@Override // java.util.AbstractList
public void removeRange(int i, int i2) {
ensureIsMutable();
if (i2 < i) {
throw new IndexOutOfBoundsException("toIndex < fromIndex");
}
int[] iArr = this.array;
System.arraycopy(iArr, i2, iArr, i, this.size - i2);
this.size -= i2 - i;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof IntArrayList)) {
return super.equals(obj);
}
IntArrayList intArrayList = (IntArrayList) obj;
if (this.size != intArrayList.size) {
return false;
}
int[] iArr = intArrayList.array;
for (int i = 0; i < this.size; i++) {
if (this.array[i] != iArr[i]) {
return false;
}
}
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public int hashCode() {
int i = 1;
for (int i2 = 0; i2 < this.size; i2++) {
i = (i * 31) + this.array[i2];
}
return i;
}
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
/* renamed from: mutableCopyWithCapacity */
public Internal.ProtobufList<Integer> mutableCopyWithCapacity2(int i) {
if (i < this.size) {
throw new IllegalArgumentException();
}
return new IntArrayList(Arrays.copyOf(this.array, i), this.size);
}
@Override // java.util.AbstractList, java.util.List
public Integer get(int i) {
return Integer.valueOf(getInt(i));
}
@Override // androidx.datastore.preferences.protobuf.Internal.IntList
public int getInt(int i) {
ensureIndexInRange(i);
return this.array[i];
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Integer set(int i, Integer num) {
return Integer.valueOf(setInt(i, num.intValue()));
}
@Override // androidx.datastore.preferences.protobuf.Internal.IntList
public int setInt(int i, int i2) {
ensureIsMutable();
ensureIndexInRange(i);
int[] iArr = this.array;
int i3 = iArr[i];
iArr[i] = i2;
return i3;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean add(Integer num) {
addInt(num.intValue());
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public void add(int i, Integer num) {
addInt(i, num.intValue());
}
@Override // androidx.datastore.preferences.protobuf.Internal.IntList
public void addInt(int i) {
ensureIsMutable();
int i2 = this.size;
int[] iArr = this.array;
if (i2 == iArr.length) {
int[] iArr2 = new int[((i2 * 3) / 2) + 1];
System.arraycopy(iArr, 0, iArr2, 0, i2);
this.array = iArr2;
}
int[] iArr3 = this.array;
int i3 = this.size;
this.size = i3 + 1;
iArr3[i3] = i;
}
private void addInt(int i, int i2) {
int i3;
ensureIsMutable();
if (i < 0 || i > (i3 = this.size)) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
int[] iArr = this.array;
if (i3 < iArr.length) {
System.arraycopy(iArr, i, iArr, i + 1, i3 - i);
} else {
int[] iArr2 = new int[((i3 * 3) / 2) + 1];
System.arraycopy(iArr, 0, iArr2, 0, i);
System.arraycopy(this.array, i, iArr2, i + 1, this.size - i);
this.array = iArr2;
}
this.array[i] = i2;
this.size++;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean addAll(Collection<? extends Integer> collection) {
ensureIsMutable();
Internal.checkNotNull(collection);
if (!(collection instanceof IntArrayList)) {
return super.addAll(collection);
}
IntArrayList intArrayList = (IntArrayList) collection;
int i = intArrayList.size;
if (i == 0) {
return false;
}
int i2 = this.size;
if (Integer.MAX_VALUE - i2 < i) {
throw new OutOfMemoryError();
}
int i3 = i2 + i;
int[] iArr = this.array;
if (i3 > iArr.length) {
this.array = Arrays.copyOf(iArr, i3);
}
System.arraycopy(intArrayList.array, 0, this.array, this.size, intArrayList.size);
this.size = i3;
((AbstractList) this).modCount++;
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean remove(Object obj) {
ensureIsMutable();
for (int i = 0; i < this.size; i++) {
if (obj.equals(Integer.valueOf(this.array[i]))) {
int[] iArr = this.array;
System.arraycopy(iArr, i + 1, iArr, i, (this.size - i) - 1);
this.size--;
((AbstractList) this).modCount++;
return true;
}
}
return false;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Integer remove(int i) {
ensureIsMutable();
ensureIndexInRange(i);
int[] iArr = this.array;
int i2 = iArr[i];
if (i < this.size - 1) {
System.arraycopy(iArr, i + 1, iArr, i, (r2 - i) - 1);
}
this.size--;
((AbstractList) this).modCount++;
return Integer.valueOf(i2);
}
private void ensureIndexInRange(int i) {
if (i < 0 || i >= this.size) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
}
private String makeOutOfBoundsExceptionMessage(int i) {
return "Index:" + i + ", Size:" + this.size;
}
}

View File

@@ -0,0 +1,452 @@
package androidx.datastore.preferences.protobuf;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.AbstractList;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.RandomAccess;
import java.util.Set;
/* loaded from: classes.dex */
public final class Internal {
private static final int DEFAULT_BUFFER_SIZE = 4096;
public static final byte[] EMPTY_BYTE_ARRAY;
public static final ByteBuffer EMPTY_BYTE_BUFFER;
public static final CodedInputStream EMPTY_CODED_INPUT_STREAM;
static final Charset UTF_8 = Charset.forName("UTF-8");
static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
public interface BooleanList extends ProtobufList<Boolean> {
void addBoolean(boolean z);
boolean getBoolean(int i);
@Override //
ProtobufList<Boolean> mutableCopyWithCapacity(int i);
boolean setBoolean(int i, boolean z);
}
public interface DoubleList extends ProtobufList<Double> {
void addDouble(double d);
double getDouble(int i);
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
ProtobufList<Double> mutableCopyWithCapacity(int i);
double setDouble(int i, double d);
}
public interface EnumLite {
int getNumber();
}
public interface EnumLiteMap<T extends EnumLite> {
T findValueByNumber(int i);
}
public interface EnumVerifier {
boolean isInRange(int i);
}
public interface FloatList extends ProtobufList<Float> {
void addFloat(float f);
float getFloat(int i);
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
ProtobufList<Float> mutableCopyWithCapacity(int i);
float setFloat(int i, float f);
}
public interface IntList extends ProtobufList<Integer> {
void addInt(int i);
int getInt(int i);
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
ProtobufList<Integer> mutableCopyWithCapacity(int i);
int setInt(int i, int i2);
}
public interface LongList extends ProtobufList<Long> {
void addLong(long j);
long getLong(int i);
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
ProtobufList<Long> mutableCopyWithCapacity(int i);
long setLong(int i, long j);
}
public interface ProtobufList<E> extends List<E>, RandomAccess {
boolean isModifiable();
void makeImmutable();
ProtobufList<E> mutableCopyWithCapacity(int i);
}
public static int hashBoolean(boolean z) {
return z ? 1231 : 1237;
}
public static int hashLong(long j) {
return (int) (j ^ (j >>> 32));
}
private Internal() {
}
static {
byte[] bArr = new byte[0];
EMPTY_BYTE_ARRAY = bArr;
EMPTY_BYTE_BUFFER = ByteBuffer.wrap(bArr);
EMPTY_CODED_INPUT_STREAM = CodedInputStream.newInstance(bArr);
}
public static <T> T checkNotNull(T t) {
t.getClass();
return t;
}
public static <T> T checkNotNull(T t, String str) {
if (t != null) {
return t;
}
throw new NullPointerException(str);
}
public static String stringDefaultValue(String str) {
return new String(str.getBytes(ISO_8859_1), UTF_8);
}
public static ByteString bytesDefaultValue(String str) {
return ByteString.copyFrom(str.getBytes(ISO_8859_1));
}
public static byte[] byteArrayDefaultValue(String str) {
return str.getBytes(ISO_8859_1);
}
public static ByteBuffer byteBufferDefaultValue(String str) {
return ByteBuffer.wrap(byteArrayDefaultValue(str));
}
public static ByteBuffer copyByteBuffer(ByteBuffer byteBuffer) {
ByteBuffer duplicate = byteBuffer.duplicate();
duplicate.clear();
ByteBuffer allocate = ByteBuffer.allocate(duplicate.capacity());
allocate.put(duplicate);
allocate.clear();
return allocate;
}
public static boolean isValidUtf8(ByteString byteString) {
return byteString.isValidUtf8();
}
public static boolean isValidUtf8(byte[] bArr) {
return Utf8.isValidUtf8(bArr);
}
public static byte[] toByteArray(String str) {
return str.getBytes(UTF_8);
}
public static String toStringUtf8(byte[] bArr) {
return new String(bArr, UTF_8);
}
public static int hashEnum(EnumLite enumLite) {
return enumLite.getNumber();
}
public static int hashEnumList(List<? extends EnumLite> list) {
Iterator<? extends EnumLite> it = list.iterator();
int i = 1;
while (it.hasNext()) {
i = (i * 31) + hashEnum(it.next());
}
return i;
}
public static boolean equals(List<byte[]> list, List<byte[]> list2) {
if (list.size() != list2.size()) {
return false;
}
for (int i = 0; i < list.size(); i++) {
if (!Arrays.equals(list.get(i), list2.get(i))) {
return false;
}
}
return true;
}
public static int hashCode(List<byte[]> list) {
Iterator<byte[]> it = list.iterator();
int i = 1;
while (it.hasNext()) {
i = (i * 31) + hashCode(it.next());
}
return i;
}
public static int hashCode(byte[] bArr) {
return hashCode(bArr, 0, bArr.length);
}
public static int hashCode(byte[] bArr, int i, int i2) {
int partialHash = partialHash(i2, bArr, i, i2);
if (partialHash == 0) {
return 1;
}
return partialHash;
}
public static int partialHash(int i, byte[] bArr, int i2, int i3) {
for (int i4 = i2; i4 < i2 + i3; i4++) {
i = (i * 31) + bArr[i4];
}
return i;
}
public static boolean equalsByteBuffer(ByteBuffer byteBuffer, ByteBuffer byteBuffer2) {
if (byteBuffer.capacity() != byteBuffer2.capacity()) {
return false;
}
return byteBuffer.duplicate().clear().equals(byteBuffer2.duplicate().clear());
}
public static boolean equalsByteBuffer(List<ByteBuffer> list, List<ByteBuffer> list2) {
if (list.size() != list2.size()) {
return false;
}
for (int i = 0; i < list.size(); i++) {
if (!equalsByteBuffer(list.get(i), list2.get(i))) {
return false;
}
}
return true;
}
public static int hashCodeByteBuffer(List<ByteBuffer> list) {
Iterator<ByteBuffer> it = list.iterator();
int i = 1;
while (it.hasNext()) {
i = (i * 31) + hashCodeByteBuffer(it.next());
}
return i;
}
public static int hashCodeByteBuffer(ByteBuffer byteBuffer) {
if (byteBuffer.hasArray()) {
int partialHash = partialHash(byteBuffer.capacity(), byteBuffer.array(), byteBuffer.arrayOffset(), byteBuffer.capacity());
if (partialHash == 0) {
return 1;
}
return partialHash;
}
int capacity = byteBuffer.capacity() <= 4096 ? byteBuffer.capacity() : 4096;
byte[] bArr = new byte[capacity];
ByteBuffer duplicate = byteBuffer.duplicate();
duplicate.clear();
int capacity2 = byteBuffer.capacity();
while (duplicate.remaining() > 0) {
int remaining = duplicate.remaining() <= capacity ? duplicate.remaining() : capacity;
duplicate.get(bArr, 0, remaining);
capacity2 = partialHash(capacity2, bArr, 0, remaining);
}
if (capacity2 == 0) {
return 1;
}
return capacity2;
}
public static <T extends MessageLite> T getDefaultInstance(Class<T> cls) {
try {
java.lang.reflect.Method method = cls.getMethod("getDefaultInstance", new Class[0]);
return (T) method.invoke(method, new Object[0]);
} catch (Exception e) {
throw new RuntimeException("Failed to get default instance for " + cls, e);
}
}
public static Object mergeMessage(Object obj, Object obj2) {
return ((MessageLite) obj).toBuilder().mergeFrom((MessageLite) obj2).buildPartial();
}
public static class ListAdapter<F, T> extends AbstractList<T> {
private final Converter<F, T> converter;
private final List<F> fromList;
public interface Converter<F, T> {
T convert(F f);
}
public ListAdapter(List<F> list, Converter<F, T> converter) {
this.fromList = list;
this.converter = converter;
}
@Override // java.util.AbstractList, java.util.List
public T get(int i) {
return (T) this.converter.convert(this.fromList.get(i));
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public int size() {
return this.fromList.size();
}
}
public static class MapAdapter<K, V, RealValue> extends AbstractMap<K, V> {
private final Map<K, RealValue> realMap;
private final Converter<RealValue, V> valueConverter;
public interface Converter<A, B> {
A doBackward(B b);
B doForward(A a);
}
public static <T extends EnumLite> Converter<Integer, T> newEnumConverter(final EnumLiteMap<T> enumLiteMap, final T t) {
return (Converter<Integer, T>) new Converter<Integer, T>() { // from class: androidx.datastore.preferences.protobuf.Internal.MapAdapter.1
/* JADX WARN: Incorrect return type in method signature: (Ljava/lang/Integer;)TT; */
@Override // androidx.datastore.preferences.protobuf.Internal.MapAdapter.Converter
public EnumLite doForward(Integer num) {
EnumLite findValueByNumber = EnumLiteMap.this.findValueByNumber(num.intValue());
return findValueByNumber == null ? t : findValueByNumber;
}
/* JADX WARN: Incorrect types in method signature: (TT;)Ljava/lang/Integer; */
@Override // androidx.datastore.preferences.protobuf.Internal.MapAdapter.Converter
public Integer doBackward(EnumLite enumLite) {
return Integer.valueOf(enumLite.getNumber());
}
};
}
public MapAdapter(Map<K, RealValue> map, Converter<RealValue, V> converter) {
this.realMap = map;
this.valueConverter = converter;
}
@Override // java.util.AbstractMap, java.util.Map
public V get(Object obj) {
RealValue realvalue = this.realMap.get(obj);
if (realvalue == null) {
return null;
}
return this.valueConverter.doForward(realvalue);
}
@Override // java.util.AbstractMap, java.util.Map
public V put(K k, V v) {
Object put = this.realMap.put(k, this.valueConverter.doBackward(v));
if (put == null) {
return null;
}
return (V) this.valueConverter.doForward(put);
}
@Override // java.util.AbstractMap, java.util.Map
public Set<Map.Entry<K, V>> entrySet() {
return new SetAdapter(this.realMap.entrySet());
}
public class SetAdapter extends AbstractSet<Map.Entry<K, V>> {
private final Set<Map.Entry<K, RealValue>> realSet;
public SetAdapter(Set<Map.Entry<K, RealValue>> set) {
this.realSet = set;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
public Iterator<Map.Entry<K, V>> iterator() {
return new IteratorAdapter(this.realSet.iterator());
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
public int size() {
return this.realSet.size();
}
}
public class IteratorAdapter implements Iterator<Map.Entry<K, V>> {
private final Iterator<Map.Entry<K, RealValue>> realIterator;
public IteratorAdapter(Iterator<Map.Entry<K, RealValue>> it) {
this.realIterator = it;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.realIterator.hasNext();
}
@Override // java.util.Iterator
public Map.Entry<K, V> next() {
return new EntryAdapter(this.realIterator.next());
}
@Override // java.util.Iterator
public void remove() {
this.realIterator.remove();
}
}
public class EntryAdapter implements Map.Entry<K, V> {
private final Map.Entry<K, RealValue> realEntry;
public EntryAdapter(Map.Entry<K, RealValue> entry) {
this.realEntry = entry;
}
@Override // java.util.Map.Entry
public K getKey() {
return this.realEntry.getKey();
}
@Override // java.util.Map.Entry
public V getValue() {
return (V) MapAdapter.this.valueConverter.doForward(this.realEntry.getValue());
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Map.Entry
public V setValue(V v) {
Object value = this.realEntry.setValue(MapAdapter.this.valueConverter.doBackward(v));
if (value == null) {
return null;
}
return (V) MapAdapter.this.valueConverter.doForward(value);
}
@Override // java.util.Map.Entry
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof Map.Entry) {
return getKey().equals(((Map.Entry) obj).getKey()) && getValue().equals(getValue());
}
return false;
}
@Override // java.util.Map.Entry
public int hashCode() {
return this.realEntry.hashCode();
}
}
}
}

View File

@@ -0,0 +1,85 @@
package androidx.datastore.preferences.protobuf;
import java.io.IOException;
/* loaded from: classes.dex */
public class InvalidProtocolBufferException extends IOException {
private static final long serialVersionUID = -1616151763072450476L;
private MessageLite unfinishedMessage;
public MessageLite getUnfinishedMessage() {
return this.unfinishedMessage;
}
public InvalidProtocolBufferException setUnfinishedMessage(MessageLite messageLite) {
this.unfinishedMessage = messageLite;
return this;
}
public InvalidProtocolBufferException(String str) {
super(str);
this.unfinishedMessage = null;
}
public InvalidProtocolBufferException(IOException iOException) {
super(iOException.getMessage(), iOException);
this.unfinishedMessage = null;
}
public InvalidProtocolBufferException(String str, IOException iOException) {
super(str, iOException);
this.unfinishedMessage = null;
}
public IOException unwrapIOException() {
return getCause() instanceof IOException ? (IOException) getCause() : this;
}
public static InvalidProtocolBufferException truncatedMessage() {
return new InvalidProtocolBufferException("While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either that the input has been truncated or that an embedded message misreported its own length.");
}
public static InvalidProtocolBufferException negativeSize() {
return new InvalidProtocolBufferException("CodedInputStream encountered an embedded string or message which claimed to have negative size.");
}
public static InvalidProtocolBufferException malformedVarint() {
return new InvalidProtocolBufferException("CodedInputStream encountered a malformed varint.");
}
public static InvalidProtocolBufferException invalidTag() {
return new InvalidProtocolBufferException("Protocol message contained an invalid tag (zero).");
}
public static InvalidProtocolBufferException invalidEndTag() {
return new InvalidProtocolBufferException("Protocol message end-group tag did not match expected tag.");
}
public static InvalidWireTypeException invalidWireType() {
return new InvalidWireTypeException("Protocol message tag had invalid wire type.");
}
public static class InvalidWireTypeException extends InvalidProtocolBufferException {
private static final long serialVersionUID = 3283890091615336259L;
public InvalidWireTypeException(String str) {
super(str);
}
}
public static InvalidProtocolBufferException recursionLimitExceeded() {
return new InvalidProtocolBufferException("Protocol message had too many levels of nesting. May be malicious. Use CodedInputStream.setRecursionLimit() to increase the depth limit.");
}
public static InvalidProtocolBufferException sizeLimitExceeded() {
return new InvalidProtocolBufferException("Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.");
}
public static InvalidProtocolBufferException parseFailure() {
return new InvalidProtocolBufferException("Failed to parse the message.");
}
public static InvalidProtocolBufferException invalidUtf8() {
return new InvalidProtocolBufferException("Protocol message had invalid UTF-8.");
}
}

View File

@@ -0,0 +1,101 @@
package androidx.datastore.preferences.protobuf;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.Iterator;
/* loaded from: classes.dex */
class IterableByteBufferInputStream extends InputStream {
private long currentAddress;
private byte[] currentArray;
private int currentArrayOffset;
private ByteBuffer currentByteBuffer;
private int currentByteBufferPos;
private int currentIndex;
private int dataSize = 0;
private boolean hasArray;
private Iterator<ByteBuffer> iterator;
public IterableByteBufferInputStream(Iterable<ByteBuffer> iterable) {
this.iterator = iterable.iterator();
for (ByteBuffer byteBuffer : iterable) {
this.dataSize++;
}
this.currentIndex = -1;
if (getNextByteBuffer()) {
return;
}
this.currentByteBuffer = Internal.EMPTY_BYTE_BUFFER;
this.currentIndex = 0;
this.currentByteBufferPos = 0;
this.currentAddress = 0L;
}
private boolean getNextByteBuffer() {
this.currentIndex++;
if (!this.iterator.hasNext()) {
return false;
}
ByteBuffer next = this.iterator.next();
this.currentByteBuffer = next;
this.currentByteBufferPos = next.position();
if (this.currentByteBuffer.hasArray()) {
this.hasArray = true;
this.currentArray = this.currentByteBuffer.array();
this.currentArrayOffset = this.currentByteBuffer.arrayOffset();
} else {
this.hasArray = false;
this.currentAddress = UnsafeUtil.addressOffset(this.currentByteBuffer);
this.currentArray = null;
}
return true;
}
private void updateCurrentByteBufferPos(int i) {
int i2 = this.currentByteBufferPos + i;
this.currentByteBufferPos = i2;
if (i2 == this.currentByteBuffer.limit()) {
getNextByteBuffer();
}
}
@Override // java.io.InputStream
public int read() throws IOException {
if (this.currentIndex == this.dataSize) {
return -1;
}
if (this.hasArray) {
int i = this.currentArray[this.currentByteBufferPos + this.currentArrayOffset] & 255;
updateCurrentByteBufferPos(1);
return i;
}
int i2 = UnsafeUtil.getByte(this.currentByteBufferPos + this.currentAddress) & 255;
updateCurrentByteBufferPos(1);
return i2;
}
@Override // java.io.InputStream
public int read(byte[] bArr, int i, int i2) throws IOException {
if (this.currentIndex == this.dataSize) {
return -1;
}
int limit = this.currentByteBuffer.limit();
int i3 = this.currentByteBufferPos;
int i4 = limit - i3;
if (i2 > i4) {
i2 = i4;
}
if (this.hasArray) {
System.arraycopy(this.currentArray, i3 + this.currentArrayOffset, bArr, i, i2);
updateCurrentByteBufferPos(i2);
} else {
int position = this.currentByteBuffer.position();
this.currentByteBuffer.position(this.currentByteBufferPos);
this.currentByteBuffer.get(bArr, i, i2);
this.currentByteBuffer.position(position);
updateCurrentByteBufferPos(i2);
}
return i2;
}
}

View File

@@ -0,0 +1,84 @@
package androidx.datastore.preferences.protobuf;
/* JADX WARN: Enum visitor error
jadx.core.utils.exceptions.JadxRuntimeException: Init of enum field 'INT' uses external variables
at jadx.core.dex.visitors.EnumVisitor.createEnumFieldByConstructor(EnumVisitor.java:451)
at jadx.core.dex.visitors.EnumVisitor.processEnumFieldByRegister(EnumVisitor.java:395)
at jadx.core.dex.visitors.EnumVisitor.extractEnumFieldsFromFilledArray(EnumVisitor.java:324)
at jadx.core.dex.visitors.EnumVisitor.extractEnumFieldsFromInsn(EnumVisitor.java:262)
at jadx.core.dex.visitors.EnumVisitor.convertToEnum(EnumVisitor.java:151)
at jadx.core.dex.visitors.EnumVisitor.visit(EnumVisitor.java:100)
*/
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* loaded from: classes.dex */
public final class JavaType {
private static final /* synthetic */ JavaType[] $VALUES;
public static final JavaType BOOLEAN;
public static final JavaType BYTE_STRING;
public static final JavaType DOUBLE;
public static final JavaType ENUM;
public static final JavaType FLOAT;
public static final JavaType INT;
public static final JavaType LONG;
public static final JavaType MESSAGE;
public static final JavaType STRING;
public static final JavaType VOID;
private final Class<?> boxedType;
private final Object defaultDefault;
private final Class<?> type;
public Class<?> getBoxedType() {
return this.boxedType;
}
public Object getDefaultDefault() {
return this.defaultDefault;
}
public Class<?> getType() {
return this.type;
}
public static JavaType valueOf(String str) {
return (JavaType) java.lang.Enum.valueOf(JavaType.class, str);
}
public static JavaType[] values() {
return (JavaType[]) $VALUES.clone();
}
static {
JavaType javaType = new JavaType("VOID", 0, Void.class, Void.class, null);
VOID = javaType;
Class cls = Integer.TYPE;
JavaType javaType2 = new JavaType("INT", 1, cls, Integer.class, 0);
INT = javaType2;
JavaType javaType3 = new JavaType("LONG", 2, Long.TYPE, Long.class, 0L);
LONG = javaType3;
JavaType javaType4 = new JavaType("FLOAT", 3, Float.TYPE, Float.class, Float.valueOf(0.0f));
FLOAT = javaType4;
JavaType javaType5 = new JavaType("DOUBLE", 4, Double.TYPE, Double.class, Double.valueOf(0.0d));
DOUBLE = javaType5;
JavaType javaType6 = new JavaType("BOOLEAN", 5, Boolean.TYPE, Boolean.class, Boolean.FALSE);
BOOLEAN = javaType6;
JavaType javaType7 = new JavaType("STRING", 6, String.class, String.class, "");
STRING = javaType7;
JavaType javaType8 = new JavaType("BYTE_STRING", 7, ByteString.class, ByteString.class, ByteString.EMPTY);
BYTE_STRING = javaType8;
JavaType javaType9 = new JavaType("ENUM", 8, cls, Integer.class, null);
ENUM = javaType9;
JavaType javaType10 = new JavaType("MESSAGE", 9, Object.class, Object.class, null);
MESSAGE = javaType10;
$VALUES = new JavaType[]{javaType, javaType2, javaType3, javaType4, javaType5, javaType6, javaType7, javaType8, javaType9, javaType10};
}
private JavaType(String str, int i, Class cls, Class cls2, Object obj) {
this.type = cls;
this.boxedType = cls2;
this.defaultDefault = obj;
}
public boolean isValidType(Class<?> cls) {
return this.type.isAssignableFrom(cls);
}
}

View File

@@ -0,0 +1,95 @@
package androidx.datastore.preferences.protobuf;
import java.util.Iterator;
import java.util.Map;
/* loaded from: classes.dex */
public class LazyField extends LazyFieldLite {
private final MessageLite defaultInstance;
public LazyField(MessageLite messageLite, ExtensionRegistryLite extensionRegistryLite, ByteString byteString) {
super(extensionRegistryLite, byteString);
this.defaultInstance = messageLite;
}
@Override // androidx.datastore.preferences.protobuf.LazyFieldLite
public boolean containsDefaultInstance() {
return super.containsDefaultInstance() || this.value == this.defaultInstance;
}
public MessageLite getValue() {
return getValue(this.defaultInstance);
}
@Override // androidx.datastore.preferences.protobuf.LazyFieldLite
public int hashCode() {
return getValue().hashCode();
}
@Override // androidx.datastore.preferences.protobuf.LazyFieldLite
public boolean equals(Object obj) {
return getValue().equals(obj);
}
public String toString() {
return getValue().toString();
}
public static class LazyEntry<K> implements Map.Entry<K, Object> {
private Map.Entry<K, LazyField> entry;
private LazyEntry(Map.Entry<K, LazyField> entry) {
this.entry = entry;
}
@Override // java.util.Map.Entry
public K getKey() {
return this.entry.getKey();
}
@Override // java.util.Map.Entry
public Object getValue() {
LazyField value = this.entry.getValue();
if (value == null) {
return null;
}
return value.getValue();
}
public LazyField getField() {
return this.entry.getValue();
}
@Override // java.util.Map.Entry
public Object setValue(Object obj) {
if (!(obj instanceof MessageLite)) {
throw new IllegalArgumentException("LazyField now only used for MessageSet, and the value of MessageSet must be an instance of MessageLite");
}
return this.entry.getValue().setValue((MessageLite) obj);
}
}
public static class LazyIterator<K> implements Iterator<Map.Entry<K, Object>> {
private Iterator<Map.Entry<K, Object>> iterator;
public LazyIterator(Iterator<Map.Entry<K, Object>> it) {
this.iterator = it;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.iterator.hasNext();
}
@Override // java.util.Iterator
public Map.Entry<K, Object> next() {
Map.Entry<K, Object> next = this.iterator.next();
return next.getValue() instanceof LazyField ? new LazyEntry(next) : next;
}
@Override // java.util.Iterator
public void remove() {
this.iterator.remove();
}
}
}

View File

@@ -0,0 +1,236 @@
package androidx.datastore.preferences.protobuf;
import java.io.IOException;
/* loaded from: classes.dex */
public class LazyFieldLite {
private static final ExtensionRegistryLite EMPTY_REGISTRY = ExtensionRegistryLite.getEmptyRegistry();
private ByteString delayedBytes;
private ExtensionRegistryLite extensionRegistry;
private volatile ByteString memoizedBytes;
protected volatile MessageLite value;
public void clear() {
this.delayedBytes = null;
this.value = null;
this.memoizedBytes = null;
}
public int hashCode() {
return 1;
}
public MessageLite setValue(MessageLite messageLite) {
MessageLite messageLite2 = this.value;
this.delayedBytes = null;
this.memoizedBytes = null;
this.value = messageLite;
return messageLite2;
}
public LazyFieldLite(ExtensionRegistryLite extensionRegistryLite, ByteString byteString) {
checkArguments(extensionRegistryLite, byteString);
this.extensionRegistry = extensionRegistryLite;
this.delayedBytes = byteString;
}
public LazyFieldLite() {
}
public static LazyFieldLite fromValue(MessageLite messageLite) {
LazyFieldLite lazyFieldLite = new LazyFieldLite();
lazyFieldLite.setValue(messageLite);
return lazyFieldLite;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof LazyFieldLite)) {
return false;
}
LazyFieldLite lazyFieldLite = (LazyFieldLite) obj;
MessageLite messageLite = this.value;
MessageLite messageLite2 = lazyFieldLite.value;
if (messageLite == null && messageLite2 == null) {
return toByteString().equals(lazyFieldLite.toByteString());
}
if (messageLite != null && messageLite2 != null) {
return messageLite.equals(messageLite2);
}
if (messageLite != null) {
return messageLite.equals(lazyFieldLite.getValue(messageLite.getDefaultInstanceForType()));
}
return getValue(messageLite2.getDefaultInstanceForType()).equals(messageLite2);
}
public boolean containsDefaultInstance() {
ByteString byteString;
ByteString byteString2 = this.memoizedBytes;
ByteString byteString3 = ByteString.EMPTY;
return byteString2 == byteString3 || (this.value == null && ((byteString = this.delayedBytes) == null || byteString == byteString3));
}
public void set(LazyFieldLite lazyFieldLite) {
this.delayedBytes = lazyFieldLite.delayedBytes;
this.value = lazyFieldLite.value;
this.memoizedBytes = lazyFieldLite.memoizedBytes;
ExtensionRegistryLite extensionRegistryLite = lazyFieldLite.extensionRegistry;
if (extensionRegistryLite != null) {
this.extensionRegistry = extensionRegistryLite;
}
}
public MessageLite getValue(MessageLite messageLite) {
ensureInitialized(messageLite);
return this.value;
}
public void merge(LazyFieldLite lazyFieldLite) {
ByteString byteString;
if (lazyFieldLite.containsDefaultInstance()) {
return;
}
if (containsDefaultInstance()) {
set(lazyFieldLite);
return;
}
if (this.extensionRegistry == null) {
this.extensionRegistry = lazyFieldLite.extensionRegistry;
}
ByteString byteString2 = this.delayedBytes;
if (byteString2 != null && (byteString = lazyFieldLite.delayedBytes) != null) {
this.delayedBytes = byteString2.concat(byteString);
return;
}
if (this.value == null && lazyFieldLite.value != null) {
setValue(mergeValueAndBytes(lazyFieldLite.value, this.delayedBytes, this.extensionRegistry));
} else if (this.value != null && lazyFieldLite.value == null) {
setValue(mergeValueAndBytes(this.value, lazyFieldLite.delayedBytes, lazyFieldLite.extensionRegistry));
} else {
setValue(this.value.toBuilder().mergeFrom(lazyFieldLite.value).build());
}
}
public void mergeFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
if (containsDefaultInstance()) {
setByteString(codedInputStream.readBytes(), extensionRegistryLite);
return;
}
if (this.extensionRegistry == null) {
this.extensionRegistry = extensionRegistryLite;
}
ByteString byteString = this.delayedBytes;
if (byteString != null) {
setByteString(byteString.concat(codedInputStream.readBytes()), this.extensionRegistry);
} else {
try {
setValue(this.value.toBuilder().mergeFrom(codedInputStream, extensionRegistryLite).build());
} catch (InvalidProtocolBufferException unused) {
}
}
}
private static MessageLite mergeValueAndBytes(MessageLite messageLite, ByteString byteString, ExtensionRegistryLite extensionRegistryLite) {
try {
return messageLite.toBuilder().mergeFrom(byteString, extensionRegistryLite).build();
} catch (InvalidProtocolBufferException unused) {
return messageLite;
}
}
public void setByteString(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) {
checkArguments(extensionRegistryLite, byteString);
this.delayedBytes = byteString;
this.extensionRegistry = extensionRegistryLite;
this.value = null;
this.memoizedBytes = null;
}
public int getSerializedSize() {
if (this.memoizedBytes != null) {
return this.memoizedBytes.size();
}
ByteString byteString = this.delayedBytes;
if (byteString != null) {
return byteString.size();
}
if (this.value != null) {
return this.value.getSerializedSize();
}
return 0;
}
public ByteString toByteString() {
if (this.memoizedBytes != null) {
return this.memoizedBytes;
}
ByteString byteString = this.delayedBytes;
if (byteString != null) {
return byteString;
}
synchronized (this) {
try {
if (this.memoizedBytes != null) {
return this.memoizedBytes;
}
if (this.value == null) {
this.memoizedBytes = ByteString.EMPTY;
} else {
this.memoizedBytes = this.value.toByteString();
}
return this.memoizedBytes;
} catch (Throwable th) {
throw th;
}
}
}
public void writeTo(Writer writer, int i) throws IOException {
if (this.memoizedBytes != null) {
writer.writeBytes(i, this.memoizedBytes);
return;
}
ByteString byteString = this.delayedBytes;
if (byteString != null) {
writer.writeBytes(i, byteString);
} else if (this.value != null) {
writer.writeMessage(i, this.value);
} else {
writer.writeBytes(i, ByteString.EMPTY);
}
}
public void ensureInitialized(MessageLite messageLite) {
if (this.value != null) {
return;
}
synchronized (this) {
if (this.value != null) {
return;
}
try {
if (this.delayedBytes != null) {
this.value = messageLite.getParserForType().parseFrom(this.delayedBytes, this.extensionRegistry);
this.memoizedBytes = this.delayedBytes;
} else {
this.value = messageLite;
this.memoizedBytes = ByteString.EMPTY;
}
} catch (InvalidProtocolBufferException unused) {
this.value = messageLite;
this.memoizedBytes = ByteString.EMPTY;
}
}
}
private static void checkArguments(ExtensionRegistryLite extensionRegistryLite, ByteString byteString) {
if (extensionRegistryLite == null) {
throw new NullPointerException("found null ExtensionRegistry");
}
if (byteString == null) {
throw new NullPointerException("found null ByteString");
}
}
}

View File

@@ -0,0 +1,393 @@
package androidx.datastore.preferences.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: classes.dex */
public class LazyStringArrayList extends AbstractProtobufList<String> 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 // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public /* bridge */ /* synthetic */ boolean equals(Object obj) {
return super.equals(obj);
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public /* bridge */ /* synthetic */ int hashCode() {
return super.hashCode();
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, androidx.datastore.preferences.protobuf.Internal.ProtobufList
public /* bridge */ /* synthetic */ boolean isModifiable() {
return super.isModifiable();
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public /* bridge */ /* synthetic */ boolean remove(Object obj) {
return super.remove(obj);
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public /* bridge */ /* synthetic */ boolean removeAll(Collection collection) {
return super.removeAll(collection);
}
@Override // androidx.datastore.preferences.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 // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.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 // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public String set(int i, String str) {
ensureIsMutable();
return asString(this.list.set(i, str));
}
@Override // androidx.datastore.preferences.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 // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean addAll(Collection<? extends String> collection) {
return addAll(size(), collection);
}
@Override // androidx.datastore.preferences.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 // androidx.datastore.preferences.protobuf.LazyStringList
public boolean addAllByteString(Collection<? extends ByteString> collection) {
ensureIsMutable();
boolean addAll = this.list.addAll(collection);
((AbstractList) this).modCount++;
return addAll;
}
@Override // androidx.datastore.preferences.protobuf.LazyStringList
public boolean addAllByteArray(Collection<byte[]> collection) {
ensureIsMutable();
boolean addAll = this.list.addAll(collection);
((AbstractList) this).modCount++;
return addAll;
}
@Override // androidx.datastore.preferences.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 // androidx.datastore.preferences.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 // androidx.datastore.preferences.protobuf.LazyStringList
public void add(ByteString byteString) {
ensureIsMutable();
this.list.add(byteString);
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.LazyStringList
public void add(byte[] bArr) {
ensureIsMutable();
this.list.add(bArr);
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.LazyStringList
public Object getRaw(int i) {
return this.list.get(i);
}
@Override // androidx.datastore.preferences.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 // androidx.datastore.preferences.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 // androidx.datastore.preferences.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 // androidx.datastore.preferences.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 // androidx.datastore.preferences.protobuf.LazyStringList
public List<?> getUnderlyingElements() {
return Collections.unmodifiableList(this.list);
}
@Override // androidx.datastore.preferences.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<byte[]> 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 // androidx.datastore.preferences.protobuf.LazyStringList
public List<byte[]> asByteArrayList() {
return new ByteArrayListView(this);
}
public static class ByteStringListView extends AbstractList<ByteString> 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 // androidx.datastore.preferences.protobuf.ProtocolStringList
public List<ByteString> asByteStringList() {
return new ByteStringListView(this);
}
@Override // androidx.datastore.preferences.protobuf.LazyStringList
public LazyStringList getUnmodifiableView() {
return isModifiable() ? new UnmodifiableLazyStringList(this) : this;
}
}

View File

@@ -0,0 +1,33 @@
package androidx.datastore.preferences.protobuf;
import java.util.Collection;
import java.util.List;
/* loaded from: classes.dex */
public interface LazyStringList extends ProtocolStringList {
void add(ByteString byteString);
void add(byte[] bArr);
boolean addAllByteArray(Collection<byte[]> collection);
boolean addAllByteString(Collection<? extends ByteString> collection);
List<byte[]> asByteArrayList();
byte[] getByteArray(int i);
ByteString getByteString(int i);
Object getRaw(int i);
List<?> getUnderlyingElements();
LazyStringList getUnmodifiableView();
void mergeFrom(LazyStringList lazyStringList);
void set(int i, ByteString byteString);
void set(int i, byte[] bArr);
}

View File

@@ -0,0 +1,175 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
abstract class ListFieldSchema {
private static final ListFieldSchema FULL_INSTANCE;
private static final ListFieldSchema LITE_INSTANCE;
public static ListFieldSchema full() {
return FULL_INSTANCE;
}
public static ListFieldSchema lite() {
return LITE_INSTANCE;
}
public abstract void makeImmutableListAt(Object obj, long j);
public abstract <L> void mergeListsAt(Object obj, Object obj2, long j);
public abstract <L> List<L> mutableListAt(Object obj, long j);
private ListFieldSchema() {
}
static {
FULL_INSTANCE = new ListFieldSchemaFull();
LITE_INSTANCE = new ListFieldSchemaLite();
}
public static final class ListFieldSchemaFull extends ListFieldSchema {
private static final Class<?> UNMODIFIABLE_LIST_CLASS = Collections.unmodifiableList(Collections.emptyList()).getClass();
private ListFieldSchemaFull() {
super();
}
@Override // androidx.datastore.preferences.protobuf.ListFieldSchema
public <L> List<L> mutableListAt(Object obj, long j) {
return mutableListAt(obj, j, 10);
}
@Override // androidx.datastore.preferences.protobuf.ListFieldSchema
public void makeImmutableListAt(Object obj, long j) {
Object unmodifiableList;
List list = (List) UnsafeUtil.getObject(obj, j);
if (list instanceof LazyStringList) {
unmodifiableList = ((LazyStringList) list).getUnmodifiableView();
} else {
if (UNMODIFIABLE_LIST_CLASS.isAssignableFrom(list.getClass())) {
return;
}
if ((list instanceof PrimitiveNonBoxingCollection) && (list instanceof Internal.ProtobufList)) {
Internal.ProtobufList protobufList = (Internal.ProtobufList) list;
if (protobufList.isModifiable()) {
protobufList.makeImmutable();
return;
}
return;
}
unmodifiableList = Collections.unmodifiableList(list);
}
UnsafeUtil.putObject(obj, j, unmodifiableList);
}
/* JADX WARN: Multi-variable type inference failed */
private static <L> List<L> mutableListAt(Object obj, long j, int i) {
LazyStringArrayList lazyStringArrayList;
List<L> arrayList;
List<L> list = getList(obj, j);
if (list.isEmpty()) {
if (list instanceof LazyStringList) {
arrayList = new LazyStringArrayList(i);
} else if ((list instanceof PrimitiveNonBoxingCollection) && (list instanceof Internal.ProtobufList)) {
arrayList = ((Internal.ProtobufList) list).mutableCopyWithCapacity2(i);
} else {
arrayList = new ArrayList<>(i);
}
UnsafeUtil.putObject(obj, j, arrayList);
return arrayList;
}
if (UNMODIFIABLE_LIST_CLASS.isAssignableFrom(list.getClass())) {
ArrayList arrayList2 = new ArrayList(list.size() + i);
arrayList2.addAll(list);
UnsafeUtil.putObject(obj, j, arrayList2);
lazyStringArrayList = arrayList2;
} else if (list instanceof UnmodifiableLazyStringList) {
LazyStringArrayList lazyStringArrayList2 = new LazyStringArrayList(list.size() + i);
lazyStringArrayList2.addAll((UnmodifiableLazyStringList) list);
UnsafeUtil.putObject(obj, j, lazyStringArrayList2);
lazyStringArrayList = lazyStringArrayList2;
} else {
if (!(list instanceof PrimitiveNonBoxingCollection) || !(list instanceof Internal.ProtobufList)) {
return list;
}
Internal.ProtobufList protobufList = (Internal.ProtobufList) list;
if (protobufList.isModifiable()) {
return list;
}
Internal.ProtobufList mutableCopyWithCapacity2 = protobufList.mutableCopyWithCapacity2(list.size() + i);
UnsafeUtil.putObject(obj, j, mutableCopyWithCapacity2);
return mutableCopyWithCapacity2;
}
return lazyStringArrayList;
}
@Override // androidx.datastore.preferences.protobuf.ListFieldSchema
public <E> void mergeListsAt(Object obj, Object obj2, long j) {
List list = getList(obj2, j);
List mutableListAt = mutableListAt(obj, j, list.size());
int size = mutableListAt.size();
int size2 = list.size();
if (size > 0 && size2 > 0) {
mutableListAt.addAll(list);
}
if (size > 0) {
list = mutableListAt;
}
UnsafeUtil.putObject(obj, j, list);
}
public static <E> List<E> getList(Object obj, long j) {
return (List) UnsafeUtil.getObject(obj, j);
}
}
public static final class ListFieldSchemaLite extends ListFieldSchema {
private ListFieldSchemaLite() {
super();
}
@Override // androidx.datastore.preferences.protobuf.ListFieldSchema
public <L> List<L> mutableListAt(Object obj, long j) {
Internal.ProtobufList protobufList = getProtobufList(obj, j);
if (protobufList.isModifiable()) {
return protobufList;
}
int size = protobufList.size();
Internal.ProtobufList mutableCopyWithCapacity2 = protobufList.mutableCopyWithCapacity2(size == 0 ? 10 : size * 2);
UnsafeUtil.putObject(obj, j, mutableCopyWithCapacity2);
return mutableCopyWithCapacity2;
}
@Override // androidx.datastore.preferences.protobuf.ListFieldSchema
public void makeImmutableListAt(Object obj, long j) {
getProtobufList(obj, j).makeImmutable();
}
@Override // androidx.datastore.preferences.protobuf.ListFieldSchema
public <E> void mergeListsAt(Object obj, Object obj2, long j) {
Internal.ProtobufList protobufList = getProtobufList(obj, j);
Internal.ProtobufList protobufList2 = getProtobufList(obj2, j);
int size = protobufList.size();
int size2 = protobufList2.size();
if (size > 0 && size2 > 0) {
if (!protobufList.isModifiable()) {
protobufList = protobufList.mutableCopyWithCapacity2(size2 + size);
}
protobufList.addAll(protobufList2);
}
if (size > 0) {
protobufList2 = protobufList;
}
UnsafeUtil.putObject(obj, j, protobufList2);
}
public static <E> Internal.ProtobufList<E> getProtobufList(Object obj, long j) {
return (Internal.ProtobufList) UnsafeUtil.getObject(obj, j);
}
}
}

View File

@@ -0,0 +1,330 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.GeneratedMessageLite;
import androidx.datastore.preferences.protobuf.Internal;
import androidx.datastore.preferences.protobuf.Value;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class ListValue extends GeneratedMessageLite<ListValue, Builder> implements ListValueOrBuilder {
private static final ListValue DEFAULT_INSTANCE;
private static volatile Parser<ListValue> PARSER = null;
public static final int VALUES_FIELD_NUMBER = 1;
private Internal.ProtobufList<Value> values_ = GeneratedMessageLite.emptyProtobufList();
public static ListValue getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@Override // androidx.datastore.preferences.protobuf.ListValueOrBuilder
public List<Value> getValuesList() {
return this.values_;
}
public List<? extends ValueOrBuilder> getValuesOrBuilderList() {
return this.values_;
}
private ListValue() {
}
@Override // androidx.datastore.preferences.protobuf.ListValueOrBuilder
public int getValuesCount() {
return this.values_.size();
}
@Override // androidx.datastore.preferences.protobuf.ListValueOrBuilder
public Value getValues(int i) {
return this.values_.get(i);
}
public ValueOrBuilder getValuesOrBuilder(int i) {
return this.values_.get(i);
}
private void ensureValuesIsMutable() {
if (this.values_.isModifiable()) {
return;
}
this.values_ = GeneratedMessageLite.mutableCopy(this.values_);
}
/* JADX INFO: Access modifiers changed from: private */
public void setValues(int i, Value value) {
value.getClass();
ensureValuesIsMutable();
this.values_.set(i, value);
}
/* JADX INFO: Access modifiers changed from: private */
public void setValues(int i, Value.Builder builder) {
ensureValuesIsMutable();
this.values_.set(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addValues(Value value) {
value.getClass();
ensureValuesIsMutable();
this.values_.add(value);
}
/* JADX INFO: Access modifiers changed from: private */
public void addValues(int i, Value value) {
value.getClass();
ensureValuesIsMutable();
this.values_.add(i, value);
}
/* JADX INFO: Access modifiers changed from: private */
public void addValues(Value.Builder builder) {
ensureValuesIsMutable();
this.values_.add(builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addValues(int i, Value.Builder builder) {
ensureValuesIsMutable();
this.values_.add(i, builder.build());
}
/* JADX INFO: Access modifiers changed from: private */
public void addAllValues(Iterable<? extends Value> iterable) {
ensureValuesIsMutable();
AbstractMessageLite.addAll((Iterable) iterable, (List) this.values_);
}
/* JADX INFO: Access modifiers changed from: private */
public void clearValues() {
this.values_ = GeneratedMessageLite.emptyProtobufList();
}
/* JADX INFO: Access modifiers changed from: private */
public void removeValues(int i) {
ensureValuesIsMutable();
this.values_.remove(i);
}
public static ListValue parseFrom(ByteBuffer byteBuffer) throws InvalidProtocolBufferException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer);
}
public static ListValue parseFrom(ByteBuffer byteBuffer, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteBuffer, extensionRegistryLite);
}
public static ListValue parseFrom(ByteString byteString) throws InvalidProtocolBufferException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString);
}
public static ListValue parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, byteString, extensionRegistryLite);
}
public static ListValue parseFrom(byte[] bArr) throws InvalidProtocolBufferException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr);
}
public static ListValue parseFrom(byte[] bArr, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, bArr, extensionRegistryLite);
}
public static ListValue parseFrom(InputStream inputStream) throws IOException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream);
}
public static ListValue parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static ListValue parseDelimitedFrom(InputStream inputStream) throws IOException {
return (ListValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream);
}
public static ListValue parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (ListValue) GeneratedMessageLite.parseDelimitedFrom(DEFAULT_INSTANCE, inputStream, extensionRegistryLite);
}
public static ListValue parseFrom(CodedInputStream codedInputStream) throws IOException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream);
}
public static ListValue parseFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return (ListValue) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, codedInputStream, extensionRegistryLite);
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(ListValue listValue) {
return DEFAULT_INSTANCE.createBuilder(listValue);
}
public static final class Builder extends GeneratedMessageLite.Builder<ListValue, Builder> implements ListValueOrBuilder {
public /* synthetic */ Builder(AnonymousClass1 anonymousClass1) {
this();
}
private Builder() {
super(ListValue.DEFAULT_INSTANCE);
}
@Override // androidx.datastore.preferences.protobuf.ListValueOrBuilder
public List<Value> getValuesList() {
return Collections.unmodifiableList(((ListValue) this.instance).getValuesList());
}
@Override // androidx.datastore.preferences.protobuf.ListValueOrBuilder
public int getValuesCount() {
return ((ListValue) this.instance).getValuesCount();
}
@Override // androidx.datastore.preferences.protobuf.ListValueOrBuilder
public Value getValues(int i) {
return ((ListValue) this.instance).getValues(i);
}
public Builder setValues(int i, Value value) {
copyOnWrite();
((ListValue) this.instance).setValues(i, value);
return this;
}
public Builder setValues(int i, Value.Builder builder) {
copyOnWrite();
((ListValue) this.instance).setValues(i, builder);
return this;
}
public Builder addValues(Value value) {
copyOnWrite();
((ListValue) this.instance).addValues(value);
return this;
}
public Builder addValues(int i, Value value) {
copyOnWrite();
((ListValue) this.instance).addValues(i, value);
return this;
}
public Builder addValues(Value.Builder builder) {
copyOnWrite();
((ListValue) this.instance).addValues(builder);
return this;
}
public Builder addValues(int i, Value.Builder builder) {
copyOnWrite();
((ListValue) this.instance).addValues(i, builder);
return this;
}
public Builder addAllValues(Iterable<? extends Value> iterable) {
copyOnWrite();
((ListValue) this.instance).addAllValues(iterable);
return this;
}
public Builder clearValues() {
copyOnWrite();
((ListValue) this.instance).clearValues();
return this;
}
public Builder removeValues(int i) {
copyOnWrite();
((ListValue) this.instance).removeValues(i);
return this;
}
}
/* renamed from: androidx.datastore.preferences.protobuf.ListValue$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke;
static {
int[] iArr = new int[GeneratedMessageLite.MethodToInvoke.values().length];
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke = iArr;
try {
iArr[GeneratedMessageLite.MethodToInvoke.NEW_MUTABLE_INSTANCE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.NEW_BUILDER.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.BUILD_MESSAGE_INFO.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_DEFAULT_INSTANCE.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_PARSER.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.GET_MEMOIZED_IS_INITIALIZED.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[GeneratedMessageLite.MethodToInvoke.SET_MEMOIZED_IS_INITIALIZED.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
@Override // androidx.datastore.preferences.protobuf.GeneratedMessageLite
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke methodToInvoke, Object obj, Object obj2) {
AnonymousClass1 anonymousClass1 = null;
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$GeneratedMessageLite$MethodToInvoke[methodToInvoke.ordinal()]) {
case 1:
return new ListValue();
case 2:
return new Builder(anonymousClass1);
case 3:
return GeneratedMessageLite.newMessageInfo(DEFAULT_INSTANCE, "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b", new Object[]{"values_", Value.class});
case 4:
return DEFAULT_INSTANCE;
case 5:
Parser<ListValue> parser = PARSER;
if (parser == null) {
synchronized (ListValue.class) {
try {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
} finally {
}
}
}
return parser;
case 6:
return (byte) 1;
case 7:
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
ListValue listValue = new ListValue();
DEFAULT_INSTANCE = listValue;
GeneratedMessageLite.registerDefaultInstance(ListValue.class, listValue);
}
public static Parser<ListValue> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}

View File

@@ -0,0 +1,12 @@
package androidx.datastore.preferences.protobuf;
import java.util.List;
/* loaded from: classes.dex */
public interface ListValueOrBuilder extends MessageLiteOrBuilder {
Value getValues(int i);
int getValuesCount();
List<Value> getValuesList();
}

View File

@@ -0,0 +1,228 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
import java.util.AbstractList;
import java.util.Arrays;
import java.util.Collection;
import java.util.RandomAccess;
/* loaded from: classes.dex */
final class LongArrayList extends AbstractProtobufList<Long> implements Internal.LongList, RandomAccess, PrimitiveNonBoxingCollection {
private static final LongArrayList EMPTY_LIST;
private long[] array;
private int size;
public static LongArrayList emptyList() {
return EMPTY_LIST;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public int size() {
return this.size;
}
static {
LongArrayList longArrayList = new LongArrayList(new long[0], 0);
EMPTY_LIST = longArrayList;
longArrayList.makeImmutable();
}
public LongArrayList() {
this(new long[10], 0);
}
private LongArrayList(long[] jArr, int i) {
this.array = jArr;
this.size = i;
}
@Override // java.util.AbstractList
public void removeRange(int i, int i2) {
ensureIsMutable();
if (i2 < i) {
throw new IndexOutOfBoundsException("toIndex < fromIndex");
}
long[] jArr = this.array;
System.arraycopy(jArr, i2, jArr, i, this.size - i2);
this.size -= i2 - i;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof LongArrayList)) {
return super.equals(obj);
}
LongArrayList longArrayList = (LongArrayList) obj;
if (this.size != longArrayList.size) {
return false;
}
long[] jArr = longArrayList.array;
for (int i = 0; i < this.size; i++) {
if (this.array[i] != jArr[i]) {
return false;
}
}
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.Collection, java.util.List
public int hashCode() {
int i = 1;
for (int i2 = 0; i2 < this.size; i2++) {
i = (i * 31) + Internal.hashLong(this.array[i2]);
}
return i;
}
@Override // androidx.datastore.preferences.protobuf.Internal.ProtobufList, androidx.datastore.preferences.protobuf.Internal.BooleanList
/* renamed from: mutableCopyWithCapacity */
public Internal.ProtobufList<Long> mutableCopyWithCapacity2(int i) {
if (i < this.size) {
throw new IllegalArgumentException();
}
return new LongArrayList(Arrays.copyOf(this.array, i), this.size);
}
@Override // java.util.AbstractList, java.util.List
public Long get(int i) {
return Long.valueOf(getLong(i));
}
@Override // androidx.datastore.preferences.protobuf.Internal.LongList
public long getLong(int i) {
ensureIndexInRange(i);
return this.array[i];
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Long set(int i, Long l) {
return Long.valueOf(setLong(i, l.longValue()));
}
@Override // androidx.datastore.preferences.protobuf.Internal.LongList
public long setLong(int i, long j) {
ensureIsMutable();
ensureIndexInRange(i);
long[] jArr = this.array;
long j2 = jArr[i];
jArr[i] = j;
return j2;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean add(Long l) {
addLong(l.longValue());
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public void add(int i, Long l) {
addLong(i, l.longValue());
}
@Override // androidx.datastore.preferences.protobuf.Internal.LongList
public void addLong(long j) {
ensureIsMutable();
int i = this.size;
long[] jArr = this.array;
if (i == jArr.length) {
long[] jArr2 = new long[((i * 3) / 2) + 1];
System.arraycopy(jArr, 0, jArr2, 0, i);
this.array = jArr2;
}
long[] jArr3 = this.array;
int i2 = this.size;
this.size = i2 + 1;
jArr3[i2] = j;
}
private void addLong(int i, long j) {
int i2;
ensureIsMutable();
if (i < 0 || i > (i2 = this.size)) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
long[] jArr = this.array;
if (i2 < jArr.length) {
System.arraycopy(jArr, i, jArr, i + 1, i2 - i);
} else {
long[] jArr2 = new long[((i2 * 3) / 2) + 1];
System.arraycopy(jArr, 0, jArr2, 0, i);
System.arraycopy(this.array, i, jArr2, i + 1, this.size - i);
this.array = jArr2;
}
this.array[i] = j;
this.size++;
((AbstractList) this).modCount++;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean addAll(Collection<? extends Long> collection) {
ensureIsMutable();
Internal.checkNotNull(collection);
if (!(collection instanceof LongArrayList)) {
return super.addAll(collection);
}
LongArrayList longArrayList = (LongArrayList) collection;
int i = longArrayList.size;
if (i == 0) {
return false;
}
int i2 = this.size;
if (Integer.MAX_VALUE - i2 < i) {
throw new OutOfMemoryError();
}
int i3 = i2 + i;
long[] jArr = this.array;
if (i3 > jArr.length) {
this.array = Arrays.copyOf(jArr, i3);
}
System.arraycopy(longArrayList.array, 0, this.array, this.size, longArrayList.size);
this.size = i3;
((AbstractList) this).modCount++;
return true;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractCollection, java.util.Collection, java.util.List
public boolean remove(Object obj) {
ensureIsMutable();
for (int i = 0; i < this.size; i++) {
if (obj.equals(Long.valueOf(this.array[i]))) {
long[] jArr = this.array;
System.arraycopy(jArr, i + 1, jArr, i, (this.size - i) - 1);
this.size--;
((AbstractList) this).modCount++;
return true;
}
}
return false;
}
@Override // androidx.datastore.preferences.protobuf.AbstractProtobufList, java.util.AbstractList, java.util.List
public Long remove(int i) {
ensureIsMutable();
ensureIndexInRange(i);
long[] jArr = this.array;
long j = jArr[i];
if (i < this.size - 1) {
System.arraycopy(jArr, i + 1, jArr, i, (r3 - i) - 1);
}
this.size--;
((AbstractList) this).modCount++;
return Long.valueOf(j);
}
private void ensureIndexInRange(int i) {
if (i < 0 || i >= this.size) {
throw new IndexOutOfBoundsException(makeOutOfBoundsExceptionMessage(i));
}
}
private String makeOutOfBoundsExceptionMessage(int i) {
return "Index:" + i + ", Size:" + this.size;
}
}

View File

@@ -0,0 +1,95 @@
package androidx.datastore.preferences.protobuf;
/* loaded from: classes.dex */
final class ManifestSchemaFactory implements SchemaFactory {
private static final MessageInfoFactory EMPTY_FACTORY = new MessageInfoFactory() { // from class: androidx.datastore.preferences.protobuf.ManifestSchemaFactory.1
@Override // androidx.datastore.preferences.protobuf.MessageInfoFactory
public boolean isSupported(Class<?> cls) {
return false;
}
@Override // androidx.datastore.preferences.protobuf.MessageInfoFactory
public MessageInfo messageInfoFor(Class<?> cls) {
throw new IllegalStateException("This should never be called.");
}
};
private final MessageInfoFactory messageInfoFactory;
public ManifestSchemaFactory() {
this(getDefaultMessageInfoFactory());
}
private ManifestSchemaFactory(MessageInfoFactory messageInfoFactory) {
this.messageInfoFactory = (MessageInfoFactory) Internal.checkNotNull(messageInfoFactory, "messageInfoFactory");
}
@Override // androidx.datastore.preferences.protobuf.SchemaFactory
public <T> Schema<T> createSchema(Class<T> cls) {
SchemaUtil.requireGeneratedMessage(cls);
MessageInfo messageInfoFor = this.messageInfoFactory.messageInfoFor(cls);
if (messageInfoFor.isMessageSetWireFormat()) {
if (GeneratedMessageLite.class.isAssignableFrom(cls)) {
return MessageSetSchema.newSchema(SchemaUtil.unknownFieldSetLiteSchema(), ExtensionSchemas.lite(), messageInfoFor.getDefaultInstance());
}
return MessageSetSchema.newSchema(SchemaUtil.proto2UnknownFieldSetSchema(), ExtensionSchemas.full(), messageInfoFor.getDefaultInstance());
}
return newSchema(cls, messageInfoFor);
}
private static <T> Schema<T> newSchema(Class<T> cls, MessageInfo messageInfo) {
if (GeneratedMessageLite.class.isAssignableFrom(cls)) {
if (isProto2(messageInfo)) {
return MessageSchema.newSchema(cls, messageInfo, NewInstanceSchemas.lite(), ListFieldSchema.lite(), SchemaUtil.unknownFieldSetLiteSchema(), ExtensionSchemas.lite(), MapFieldSchemas.lite());
}
return MessageSchema.newSchema(cls, messageInfo, NewInstanceSchemas.lite(), ListFieldSchema.lite(), SchemaUtil.unknownFieldSetLiteSchema(), null, MapFieldSchemas.lite());
}
if (isProto2(messageInfo)) {
return MessageSchema.newSchema(cls, messageInfo, NewInstanceSchemas.full(), ListFieldSchema.full(), SchemaUtil.proto2UnknownFieldSetSchema(), ExtensionSchemas.full(), MapFieldSchemas.full());
}
return MessageSchema.newSchema(cls, messageInfo, NewInstanceSchemas.full(), ListFieldSchema.full(), SchemaUtil.proto3UnknownFieldSetSchema(), null, MapFieldSchemas.full());
}
private static boolean isProto2(MessageInfo messageInfo) {
return messageInfo.getSyntax() == ProtoSyntax.PROTO2;
}
private static MessageInfoFactory getDefaultMessageInfoFactory() {
return new CompositeMessageInfoFactory(GeneratedMessageInfoFactory.getInstance(), getDescriptorMessageInfoFactory());
}
public static class CompositeMessageInfoFactory implements MessageInfoFactory {
private MessageInfoFactory[] factories;
public CompositeMessageInfoFactory(MessageInfoFactory... messageInfoFactoryArr) {
this.factories = messageInfoFactoryArr;
}
@Override // androidx.datastore.preferences.protobuf.MessageInfoFactory
public boolean isSupported(Class<?> cls) {
for (MessageInfoFactory messageInfoFactory : this.factories) {
if (messageInfoFactory.isSupported(cls)) {
return true;
}
}
return false;
}
@Override // androidx.datastore.preferences.protobuf.MessageInfoFactory
public MessageInfo messageInfoFor(Class<?> cls) {
for (MessageInfoFactory messageInfoFactory : this.factories) {
if (messageInfoFactory.isSupported(cls)) {
return messageInfoFactory.messageInfoFor(cls);
}
}
throw new UnsupportedOperationException("No factory is available for message type: " + cls.getName());
}
}
private static MessageInfoFactory getDescriptorMessageInfoFactory() {
try {
return (MessageInfoFactory) Class.forName("androidx.datastore.preferences.protobuf.DescriptorMessageInfoFactory").getDeclaredMethod("getInstance", new Class[0]).invoke(null, new Object[0]);
} catch (Exception unused) {
return EMPTY_FACTORY;
}
}
}

View File

@@ -0,0 +1,162 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.MessageLite;
import androidx.datastore.preferences.protobuf.WireFormat;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.Map;
/* loaded from: classes.dex */
public class MapEntryLite<K, V> {
private static final int KEY_FIELD_NUMBER = 1;
private static final int VALUE_FIELD_NUMBER = 2;
private final K key;
private final Metadata<K, V> metadata;
private final V value;
public K getKey() {
return this.key;
}
public Metadata<K, V> getMetadata() {
return this.metadata;
}
public V getValue() {
return this.value;
}
public static class Metadata<K, V> {
public final K defaultKey;
public final V defaultValue;
public final WireFormat.FieldType keyType;
public final WireFormat.FieldType valueType;
public Metadata(WireFormat.FieldType fieldType, K k, WireFormat.FieldType fieldType2, V v) {
this.keyType = fieldType;
this.defaultKey = k;
this.valueType = fieldType2;
this.defaultValue = v;
}
}
private MapEntryLite(WireFormat.FieldType fieldType, K k, WireFormat.FieldType fieldType2, V v) {
this.metadata = new Metadata<>(fieldType, k, fieldType2, v);
this.key = k;
this.value = v;
}
private MapEntryLite(Metadata<K, V> metadata, K k, V v) {
this.metadata = metadata;
this.key = k;
this.value = v;
}
public static <K, V> MapEntryLite<K, V> newDefaultInstance(WireFormat.FieldType fieldType, K k, WireFormat.FieldType fieldType2, V v) {
return new MapEntryLite<>(fieldType, k, fieldType2, v);
}
public static <K, V> void writeTo(CodedOutputStream codedOutputStream, Metadata<K, V> metadata, K k, V v) throws IOException {
FieldSet.writeElement(codedOutputStream, metadata.keyType, 1, k);
FieldSet.writeElement(codedOutputStream, metadata.valueType, 2, v);
}
public static <K, V> int computeSerializedSize(Metadata<K, V> metadata, K k, V v) {
return FieldSet.computeElementSize(metadata.keyType, 1, k) + FieldSet.computeElementSize(metadata.valueType, 2, v);
}
/* renamed from: androidx.datastore.preferences.protobuf.MapEntryLite$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$FieldType;
static {
int[] iArr = new int[WireFormat.FieldType.values().length];
$SwitchMap$com$google$protobuf$WireFormat$FieldType = iArr;
try {
iArr[WireFormat.FieldType.MESSAGE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.ENUM.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.GROUP.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
public static <T> T parseField(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite, WireFormat.FieldType fieldType, T t) throws IOException {
int i = AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[fieldType.ordinal()];
if (i == 1) {
MessageLite.Builder builder = ((MessageLite) t).toBuilder();
codedInputStream.readMessage(builder, extensionRegistryLite);
return (T) builder.buildPartial();
}
if (i == 2) {
return (T) Integer.valueOf(codedInputStream.readEnum());
}
if (i == 3) {
throw new RuntimeException("Groups are not allowed in maps.");
}
return (T) FieldSet.readPrimitiveField(codedInputStream, fieldType, true);
}
public void serializeTo(CodedOutputStream codedOutputStream, int i, K k, V v) throws IOException {
codedOutputStream.writeTag(i, 2);
codedOutputStream.writeUInt32NoTag(computeSerializedSize(this.metadata, k, v));
writeTo(codedOutputStream, this.metadata, k, v);
}
public int computeMessageSize(int i, K k, V v) {
return CodedOutputStream.computeTagSize(i) + CodedOutputStream.computeLengthDelimitedFieldSize(computeSerializedSize(this.metadata, k, v));
}
public Map.Entry<K, V> parseEntry(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws IOException {
return parseEntry(byteString.newCodedInput(), this.metadata, extensionRegistryLite);
}
public static <K, V> Map.Entry<K, V> parseEntry(CodedInputStream codedInputStream, Metadata<K, V> metadata, ExtensionRegistryLite extensionRegistryLite) throws IOException {
Object obj = metadata.defaultKey;
Object obj2 = metadata.defaultValue;
while (true) {
int readTag = codedInputStream.readTag();
if (readTag == 0) {
break;
}
if (readTag == WireFormat.makeTag(1, metadata.keyType.getWireType())) {
obj = parseField(codedInputStream, extensionRegistryLite, metadata.keyType, obj);
} else if (readTag == WireFormat.makeTag(2, metadata.valueType.getWireType())) {
obj2 = parseField(codedInputStream, extensionRegistryLite, metadata.valueType, obj2);
} else if (!codedInputStream.skipField(readTag)) {
break;
}
}
return new AbstractMap.SimpleImmutableEntry(obj, obj2);
}
/* JADX WARN: Multi-variable type inference failed */
public void parseInto(MapFieldLite<K, V> mapFieldLite, CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException {
int pushLimit = codedInputStream.pushLimit(codedInputStream.readRawVarint32());
Metadata<K, V> metadata = this.metadata;
Object obj = metadata.defaultKey;
Object obj2 = metadata.defaultValue;
while (true) {
int readTag = codedInputStream.readTag();
if (readTag == 0) {
break;
}
if (readTag == WireFormat.makeTag(1, this.metadata.keyType.getWireType())) {
obj = parseField(codedInputStream, extensionRegistryLite, this.metadata.keyType, obj);
} else if (readTag == WireFormat.makeTag(2, this.metadata.valueType.getWireType())) {
obj2 = parseField(codedInputStream, extensionRegistryLite, this.metadata.valueType, obj2);
} else if (!codedInputStream.skipField(readTag)) {
break;
}
}
codedInputStream.checkLastTagWas(0);
codedInputStream.popLimit(pushLimit);
mapFieldLite.put(obj, obj2);
}
}

View File

@@ -0,0 +1,169 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.Internal;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
/* loaded from: classes.dex */
public final class MapFieldLite<K, V> extends LinkedHashMap<K, V> {
private static final MapFieldLite EMPTY_MAP_FIELD;
private boolean isMutable;
public static <K, V> MapFieldLite<K, V> emptyMapField() {
return EMPTY_MAP_FIELD;
}
public boolean isMutable() {
return this.isMutable;
}
public void makeImmutable() {
this.isMutable = false;
}
private MapFieldLite() {
this.isMutable = true;
}
private MapFieldLite(Map<K, V> map) {
super(map);
this.isMutable = true;
}
static {
MapFieldLite mapFieldLite = new MapFieldLite();
EMPTY_MAP_FIELD = mapFieldLite;
mapFieldLite.makeImmutable();
}
public void mergeFrom(MapFieldLite<K, V> mapFieldLite) {
ensureMutable();
if (mapFieldLite.isEmpty()) {
return;
}
putAll(mapFieldLite);
}
@Override // java.util.LinkedHashMap, java.util.HashMap, java.util.AbstractMap, java.util.Map
public Set<Map.Entry<K, V>> entrySet() {
return isEmpty() ? Collections.emptySet() : super.entrySet();
}
@Override // java.util.LinkedHashMap, java.util.HashMap, java.util.AbstractMap, java.util.Map
public void clear() {
ensureMutable();
super.clear();
}
@Override // java.util.HashMap, java.util.AbstractMap, java.util.Map
public V put(K k, V v) {
ensureMutable();
Internal.checkNotNull(k);
Internal.checkNotNull(v);
return (V) super.put(k, v);
}
public V put(Map.Entry<K, V> entry) {
return put(entry.getKey(), entry.getValue());
}
@Override // java.util.HashMap, java.util.AbstractMap, java.util.Map
public void putAll(Map<? extends K, ? extends V> map) {
ensureMutable();
checkForNullKeysAndValues(map);
super.putAll(map);
}
@Override // java.util.HashMap, java.util.AbstractMap, java.util.Map
public V remove(Object obj) {
ensureMutable();
return (V) super.remove(obj);
}
private static void checkForNullKeysAndValues(Map<?, ?> map) {
for (Object obj : map.keySet()) {
Internal.checkNotNull(obj);
Internal.checkNotNull(map.get(obj));
}
}
private static boolean equals(Object obj, Object obj2) {
if ((obj instanceof byte[]) && (obj2 instanceof byte[])) {
return Arrays.equals((byte[]) obj, (byte[]) obj2);
}
return obj.equals(obj2);
}
public static <K, V> boolean equals(Map<K, V> map, Map<K, V> map2) {
if (map == map2) {
return true;
}
if (map.size() != map2.size()) {
return false;
}
for (Map.Entry<K, V> entry : map.entrySet()) {
if (!map2.containsKey(entry.getKey()) || !equals(entry.getValue(), map2.get(entry.getKey()))) {
return false;
}
}
return true;
}
@Override // java.util.AbstractMap, java.util.Map
public boolean equals(Object obj) {
return (obj instanceof Map) && equals((Map) this, (Map) obj);
}
private static int calculateHashCodeForObject(Object obj) {
if (obj instanceof byte[]) {
return Internal.hashCode((byte[]) obj);
}
if (obj instanceof Internal.EnumLite) {
throw new UnsupportedOperationException();
}
return obj.hashCode();
}
public static <K, V> int calculateHashCodeForMap(Map<K, V> map) {
int i = 0;
for (Map.Entry<K, V> entry : map.entrySet()) {
i += calculateHashCodeForObject(entry.getValue()) ^ calculateHashCodeForObject(entry.getKey());
}
return i;
}
@Override // java.util.AbstractMap, java.util.Map
public int hashCode() {
return calculateHashCodeForMap(this);
}
private static Object copy(Object obj) {
if (!(obj instanceof byte[])) {
return obj;
}
byte[] bArr = (byte[]) obj;
return Arrays.copyOf(bArr, bArr.length);
}
/* JADX WARN: Multi-variable type inference failed */
public static <K, V> Map<K, V> copy(Map<K, V> map) {
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (Map.Entry<K, V> entry : map.entrySet()) {
linkedHashMap.put(entry.getKey(), copy(entry.getValue()));
}
return linkedHashMap;
}
public MapFieldLite<K, V> mutableCopy() {
return isEmpty() ? new MapFieldLite<>() : new MapFieldLite<>(this);
}
private void ensureMutable() {
if (!isMutable()) {
throw new UnsupportedOperationException();
}
}
}

View File

@@ -0,0 +1,23 @@
package androidx.datastore.preferences.protobuf;
import androidx.datastore.preferences.protobuf.MapEntryLite;
import java.util.Map;
/* loaded from: classes.dex */
interface MapFieldSchema {
Map<?, ?> forMapData(Object obj);
MapEntryLite.Metadata<?, ?> forMapMetadata(Object obj);
Map<?, ?> forMutableMapData(Object obj);
int getSerializedSize(int i, Object obj, Object obj2);
boolean isImmutable(Object obj);
Object mergeFrom(Object obj, Object obj2);
Object newMapField(Object obj);
Object toImmutable(Object obj);
}

Some files were not shown because too many files have changed in this diff Show More