package o; import com.google.gson.Gson; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.lang.Enum; /* renamed from: o.fRx, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C13141fRx implements TypeAdapterFactory { private final Class b; private final T c; public C13141fRx(Class cls, T t) { this.b = cls; this.c = t; } @Override // com.google.gson.TypeAdapterFactory public final TypeAdapter create(Gson gson, TypeToken typeToken) { if (this.b.isAssignableFrom(typeToken.getRawType())) { return new fRA(new TypeAdapter(this, gson.getDelegateAdapter(this, typeToken)) { // from class: o.fRx.1 private TypeAdapter a; private C13141fRx b; { this.b = this; this.a = r2; } @Override // com.google.gson.TypeAdapter public final void write(JsonWriter jsonWriter, T t) throws IOException { this.a.write(jsonWriter, t); } @Override // com.google.gson.TypeAdapter /* renamed from: read */ public final T read2(JsonReader jsonReader) throws IOException { T t = (T) this.a.read2(jsonReader); return t == null ? (T) this.b.c : t; } }); } return null; } }