- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
34 lines
1.3 KiB
Java
34 lines
1.3 KiB
Java
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);
|
|
}
|
|
}
|
|
}
|
|
}
|