嘿嘿连载.apk(点击下载) / y.java


package com.xiaomi.mipush.sdk;

import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.xiaomi.channel.commonutils.logger.b;
import com.xiaomi.push.as;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;

/* access modifiers changed from: package-private */
public class y implements Runnable {

    /* renamed from: a  reason: collision with root package name */
    final /* synthetic */ x f6583a;

    y(x xVar) {
        this.f6583a = xVar;
    }

    /* 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 = u.a(x.a(this.f6583a)).a();
            if (a2 != null) {
                if (a2.size() >= 1) {
                    HashMap<String, String> a3 = ak.a(x.a(this.f6583a), "C100000");
                    int i = 0;
                    while (i < a2.size()) {
                        File file3 = a2.get(i);
                        String a4 = u.a(x.a(this.f6583a)).a(file3);
                        file = new File(x.a(this.f6583a).getFilesDir() + "/crash" + "/" + file3.getName() + ".zip");
                        try {
                            com.xiaomi.push.y.a(file, file3);
                            if (file.exists()) {
                                as.a("https://api.xmpush.xiaomi.com/upload/crash_log?file=" + file.getName(), a3, file, "file");
                                file3.renameTo(new File(x.a(this.f6583a).getFilesDir() + "/crash", a4 + Constants.COLON_SEPARATOR + PushConstants.PUSH_TYPE_NOTIFY));
                                x.a(this.f6583a);
                            } else {
                                b.m3008a("zip crash file failed");
                            }
                            i++;
                            file2 = file;
                        } catch (IOException e2) {
                            e = e2;
                            b.a(e);
                            file2 = file;
                            b.m3008a("delete zip crash file failed");
                            synchronized (x.a()) {
                            }
                        } catch (Throwable unused) {
                            file2 = file;
                            b.m3008a("delete zip crash file failed");
                            synchronized (x.a()) {
                            }
                        }
                    }
                    if (file2 != null && file2.exists() && !file2.delete()) {
                        b.m3008a("delete zip crash file failed");
                    }
                    synchronized (x.a()) {
                        x.a().notifyAll();
                    }
                    return;
                }
            }
            b.m3008a("no crash file to upload");
        } catch (IOException e3) {
            file = null;
            e = e3;
            b.a(e);
            file2 = file;
        } catch (Throwable unused2) {
        }
    }
}