Rabbit-R1/switch port/java/sources/com/airbnb/lottie/parser/ShapeTrimPathParser.java

46 lines
2 KiB
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package com.airbnb.lottie.parser;
import androidx.media3.exoplayer.upstream.CmcdHeadersFactory;
import com.airbnb.lottie.LottieComposition;
import com.airbnb.lottie.model.animatable.AnimatableFloatValue;
import com.airbnb.lottie.model.content.ShapeTrimPath;
import com.airbnb.lottie.parser.moshi.JsonReader;
import java.io.IOException;
/* loaded from: classes2.dex */
class ShapeTrimPathParser {
private static final JsonReader.Options NAMES = JsonReader.Options.of(CmcdHeadersFactory.STREAMING_FORMAT_SS, "e", "o", "nm", "m", "hd");
private ShapeTrimPathParser() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public static ShapeTrimPath parse(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException {
String str = null;
ShapeTrimPath.Type type = null;
AnimatableFloatValue animatableFloatValue = null;
AnimatableFloatValue animatableFloatValue2 = null;
AnimatableFloatValue animatableFloatValue3 = null;
boolean z = false;
while (jsonReader.hasNext()) {
int selectName = jsonReader.selectName(NAMES);
if (selectName == 0) {
animatableFloatValue = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
} else if (selectName == 1) {
animatableFloatValue2 = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
} else if (selectName == 2) {
animatableFloatValue3 = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
} else if (selectName == 3) {
str = jsonReader.nextString();
} else if (selectName == 4) {
type = ShapeTrimPath.Type.forId(jsonReader.nextInt());
} else if (selectName == 5) {
z = jsonReader.nextBoolean();
} else {
jsonReader.skipValue();
}
}
return new ShapeTrimPath(str, type, animatableFloatValue, animatableFloatValue2, animatableFloatValue3, z);
}
}