package com.facetec.sdk; import java.io.IOException; /* loaded from: classes.dex */ public final class fr extends ek { private final fv b; private final ee c; private dx d; private final eg e; private ek j; private final fr.d h = new d(this, 0); private final en a = null; public fr(eg egVar, ee eeVar, dx dxVar, fv fvVar) { this.e = egVar; this.c = eeVar; this.d = dxVar; this.b = fvVar; } @Override // com.facetec.sdk.ek public final T a(fu fuVar) throws IOException { if (this.c == null) { return c().a(fuVar); } if (fd.e(fuVar).h()) { return null; } ee eeVar = this.c; this.b.b(); return eeVar.a(); } @Override // com.facetec.sdk.ek public final void b(ga gaVar, T t) throws IOException { eg egVar = this.e; if (egVar == null) { c().b(gaVar, t); } else if (t == null) { gaVar.h(); } else { this.b.b(); fd.c(egVar.b(), gaVar); } } private ek c() { ek ekVar = this.j; if (ekVar != null) { return ekVar; } ek c = this.d.c(this.a, this.b); this.j = c; return c; } /* loaded from: classes.dex */ final class d { private fr e; private d(fr frVar) { this.e = frVar; } /* synthetic */ d(fr frVar, byte b) { this(frVar); } } }