70 lines
2.1 KiB
Java
70 lines
2.1 KiB
Java
package c.o.a;
|
|
|
|
import android.os.Handler;
|
|
import java.io.BufferedOutputStream;
|
|
import java.io.File;
|
|
import java.io.FileOutputStream;
|
|
import java.io.IOException;
|
|
/* compiled from: CameraUtils */
|
|
public final class d implements Runnable {
|
|
public final /* synthetic */ byte[] i;
|
|
public final /* synthetic */ File j;
|
|
public final /* synthetic */ Handler k;
|
|
public final /* synthetic */ k l;
|
|
|
|
/* compiled from: CameraUtils */
|
|
public class a implements Runnable {
|
|
public final /* synthetic */ File i;
|
|
|
|
public a(File file) {
|
|
this.i = file;
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
d.this.l.a(this.i);
|
|
}
|
|
}
|
|
|
|
public d(byte[] bArr, File file, Handler handler, k kVar) {
|
|
this.i = bArr;
|
|
this.j = file;
|
|
this.k = handler;
|
|
this.l = kVar;
|
|
}
|
|
|
|
/* JADX WARNING: Code restructure failed: missing block: B:13:0x0029, code lost:
|
|
r1 = move-exception;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:15:?, code lost:
|
|
r2.close();
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:16:0x002e, code lost:
|
|
r2 = move-exception;
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:17:0x002f, code lost:
|
|
r0.addSuppressed(r2);
|
|
*/
|
|
/* JADX WARNING: Code restructure failed: missing block: B:18:0x0032, code lost:
|
|
throw r1;
|
|
*/
|
|
@Override // java.lang.Runnable
|
|
public void run() {
|
|
byte[] bArr = this.i;
|
|
File file = this.j;
|
|
if (!file.exists() || file.delete()) {
|
|
try {
|
|
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(file));
|
|
bufferedOutputStream.write(bArr);
|
|
bufferedOutputStream.flush();
|
|
bufferedOutputStream.close();
|
|
} catch (IOException e) {
|
|
e.a.a(3, "writeToFile:", "could not write file.", e);
|
|
}
|
|
this.k.post(new a(file));
|
|
}
|
|
file = null;
|
|
this.k.post(new a(file));
|
|
}
|
|
}
|