package com.xiaomi.mipush.sdk; import com.meizu.cloud.pushsdk.constants.PushConstants; import com.netease.nimlib.jsbridge.interfaces.IJavaReplyToJsFileInfo; import com.xiaomi.channel.commonutils.logger.b; import com.xiaomi.push.az; import com.xiaomi.push.y; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; /* access modifiers changed from: package-private */ public class w implements Runnable { final /* synthetic */ v a; w(v vVar) { this.a = vVar; } /* JADX WARNING: Removed duplicated region for block: B:34:0x0107 A[SYNTHETIC] */ public void run() { File file; IOException e; File file2 = null; try { ArrayList<File> a2 = s.a(v.a(this.a)).a(); if (a2 != null) { if (a2.size() >= 1) { HashMap<String, String> a3 = ai.a(v.a(this.a), "C100000"); int i = 0; while (i < a2.size()) { File file3 = a2.get(i); String a4 = s.a(v.a(this.a)).a(file3); file = new File(v.a(this.a).getFilesDir() + "/crash" + "/" + file3.getName() + ".zip"); try { y.a(file, file3); if (file.exists()) { az.a("https://api.xmpush.xiaomi.com/upload/crash_log?file=" + file.getName(), a3, file, IJavaReplyToJsFileInfo.RESPONSE_FILE_INFO); file3.renameTo(new File(v.a(this.a).getFilesDir() + "/crash", a4 + Constants.COLON_SEPARATOR + PushConstants.PUSH_TYPE_NOTIFY)); v.a(this.a); } else { b.m4a("zip crash file failed"); } i++; file2 = file; } catch (IOException e2) { e = e2; b.a(e); file2 = file; b.m4a("delete zip crash file failed"); synchronized (v.a()) { } } catch (Throwable unused) { file2 = file; b.m4a("delete zip crash file failed"); synchronized (v.a()) { } } } if (file2 != null && file2.exists() && !file2.delete()) { b.m4a("delete zip crash file failed"); } synchronized (v.a()) { v.a().notifyAll(); } return; } } b.m4a("no crash file to upload"); } catch (IOException e3) { file = null; e = e3; b.a(e); file2 = file; } catch (Throwable unused2) { } } }