what-the-bank/sources/com/google/firebase/crashlytics/internal/ndk/NativeFileUtils.java

37 lines
1.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.crashlytics.internal.ndk;
import android.content.Context;
import com.google.firebase.crashlytics.internal.common.CommonUtils;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class NativeFileUtils {
private NativeFileUtils() {
}
public static byte[] binaryImagesJsonFromMapsFile(File file, Context context) throws IOException {
BufferedReader bufferedReader;
if (file == null || !file.exists()) {
return new byte[0];
}
try {
bufferedReader = new BufferedReader(new FileReader(file));
try {
byte[] convert = new BinaryImagesConverter(context, new Sha1FileIdStrategy()).convert(bufferedReader);
CommonUtils.closeQuietly(bufferedReader);
return convert;
} catch (Throwable th) {
th = th;
CommonUtils.closeQuietly(bufferedReader);
throw th;
}
} catch (Throwable th2) {
th = th2;
bufferedReader = null;
}
}
}