what-the-bank/sources/com/google/android/gms/internal/firebase_ml/zzot.java

49 lines
1.8 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.firebase_ml;
import com.google.android.gms.common.internal.GmsLogger;
import com.google.firebase.FirebaseApp;
import com.google.firebase.ml.common.FirebaseMLException;
import java.io.File;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public final class zzot implements zzoh {
private final FirebaseApp zzapo;
private final String zzaqg;
/* JADX INFO: Access modifiers changed from: package-private */
public zzot(FirebaseApp firebaseApp, String str) {
this.zzapo = firebaseApp;
this.zzaqg = str;
}
@Override // com.google.android.gms.internal.firebase_ml.zzoh
public final void zzlt() {
}
@Override // com.google.android.gms.internal.firebase_ml.zzoh
public final File zza(File file) throws FirebaseMLException {
GmsLogger gmsLogger;
GmsLogger gmsLogger2;
GmsLogger gmsLogger3;
File zzb = zzoq.zzb(this.zzapo, this.zzaqg, zzok.TRANSLATE);
File file2 = new File(zzb, String.valueOf(zzoq.zzd(zzb) + 1));
if (file.renameTo(file2)) {
gmsLogger3 = zzoq.zzaoz;
gmsLogger3.d("RemoteModelFileManager", "Rename to serving model successfully");
file2.setExecutable(false);
file2.setWritable(false);
return file2;
}
gmsLogger = zzoq.zzaoz;
gmsLogger.d("RemoteModelFileManager", "Rename to serving model failed, remove the temp file.");
if (file.delete()) {
return null;
}
gmsLogger2 = zzoq.zzaoz;
String valueOf = String.valueOf(file.getAbsolutePath());
gmsLogger2.d("RemoteModelFileManager", valueOf.length() != 0 ? "Failed to delete the temp file: ".concat(valueOf) : new String("Failed to delete the temp file: "));
return null;
}
}