41 lines
1.6 KiB
Java
41 lines
1.6 KiB
Java
package com.google.android.gms.internal.firebase_ml;
|
|
|
|
import com.google.android.gms.common.internal.Preconditions;
|
|
import com.google.android.gms.internal.firebase_ml.zzmd;
|
|
import com.google.android.gms.tasks.Task;
|
|
import com.google.firebase.FirebaseApp;
|
|
import com.google.firebase.ml.vision.common.FirebaseVisionImage;
|
|
import com.google.firebase.ml.vision.text.FirebaseVisionText;
|
|
import java.io.Closeable;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class zzqi extends zzpw<FirebaseVisionText> implements Closeable {
|
|
private static final Map<String, zzqi> zzax = new HashMap();
|
|
|
|
public static zzqi zzj(FirebaseApp firebaseApp) {
|
|
zzqi zzqiVar;
|
|
synchronized (zzqi.class) {
|
|
Preconditions.checkNotNull(firebaseApp, "FirebaseApp can not be null.");
|
|
Preconditions.checkNotNull(firebaseApp.getPersistenceKey(), "Firebase app name must not be null");
|
|
Map<String, zzqi> map = zzax;
|
|
zzqiVar = map.get(firebaseApp.getPersistenceKey());
|
|
if (zzqiVar == null) {
|
|
zzqiVar = new zzqi(firebaseApp);
|
|
map.put(firebaseApp.getPersistenceKey(), zzqiVar);
|
|
}
|
|
}
|
|
return zzqiVar;
|
|
}
|
|
|
|
private zzqi(FirebaseApp firebaseApp) {
|
|
super(firebaseApp, new zzqj(firebaseApp));
|
|
zznu.zza(firebaseApp, 1).zza(zzmd.zzq.zzjx().zzb(zzmd.zzab.zzlf()), zzmn.ON_DEVICE_TEXT_CREATE);
|
|
}
|
|
|
|
public final Task<FirebaseVisionText> processImage(FirebaseVisionImage firebaseVisionImage) {
|
|
return super.zza(firebaseVisionImage, false, true);
|
|
}
|
|
}
|