package com.google.android.gms.internal.firebase_ml; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.tasks.Task; import com.google.firebase.FirebaseApp; import com.google.firebase.ml.vision.common.FirebaseVisionImage; import java.io.Closeable; import java.io.IOException; /* loaded from: classes2.dex */ public class zzpw implements Closeable { private final zznq zzasm; private final zznm zzaxo; public zzpw(FirebaseApp firebaseApp, zznm zznmVar) { Preconditions.checkNotNull(firebaseApp, "FirebaseApp must not be null"); Preconditions.checkNotNull(firebaseApp.getPersistenceKey(), "Firebase app name must not be null"); this.zzaxo = zznmVar; zznq zza = zznq.zza(firebaseApp); this.zzasm = zza; zza.zza(zznmVar); } public final Task zza(FirebaseVisionImage firebaseVisionImage, boolean z, boolean z2) { Preconditions.checkNotNull(firebaseVisionImage, "FirebaseVisionImage can not be null"); return this.zzasm.zza((zznm>) this.zzaxo, (zznm) new zzpz(firebaseVisionImage.zza(z, z2))); } @Override // java.io.Closeable, java.lang.AutoCloseable public void close() throws IOException { this.zzasm.zzb(this.zzaxo); } }