package o; import com.google.gson.Gson; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import o.LhO; import org.jmrtd.cbeff.ISO781611; /* loaded from: classes.dex */ public final class nqa extends TypeAdapter implements HJa { private Gson c; private PYE d; private InterfaceC15734iCu e; public nqa(Gson gson, InterfaceC15734iCu interfaceC15734iCu, PYE pye) { this.c = gson; this.e = interfaceC15734iCu; this.d = pye; } @Override // com.google.gson.TypeAdapter public final void write(JsonWriter jsonWriter, Object obj) throws IOException { if (obj == null) { jsonWriter.nullValue(); } else { this.d.d(jsonWriter, obj == LhO.RVV.IMAGE ? 60 : obj == LhO.RVV.TEXT ? ISO781611.CREATION_DATE_AND_TIME_TAG : -1); } } @Override // com.google.gson.TypeAdapter /* renamed from: read */ public final Object read2(JsonReader jsonReader) throws IOException { int a = this.e.a(jsonReader); if (a == 207) { return LhO.RVV.TEXT; } if (a != 468) { return null; } return LhO.RVV.IMAGE; } }