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


package com.xiaomi.mipush.sdk;

import android.content.Context;
import com.xiaomi.channel.commonutils.logger.b;
import com.xiaomi.push.as;
import com.xiaomi.push.ef;
import com.xiaomi.push.y;
import java.io.File;
import java.util.HashMap;

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

    /* renamed from: a  reason: collision with root package name */
    final /* synthetic */ Context f6581a;

    /* renamed from: a  reason: collision with other field name */
    final /* synthetic */ boolean f680a;

    w(Context context, boolean z) {
        this.f6581a = context;
        this.f680a = z;
    }

    /* JADX WARNING: Removed duplicated region for block: B:25:0x0095  */
    /* JADX WARNING: Removed duplicated region for block: B:29:? A[ADDED_TO_REGION, RETURN, SYNTHETIC] */
    public void run() {
        File file;
        Throwable th;
        String str;
        try {
            HashMap<String, String> a2 = ak.a(this.f6581a, "");
            if (this.f680a) {
                str = this.f6581a.getFilesDir().getAbsolutePath();
            } else {
                str = this.f6581a.getExternalFilesDir(null).getAbsolutePath() + ef.f856a;
            }
            File logFile = Logger.getLogFile(str);
            if (logFile == null) {
                b.m3008a("log file null");
                return;
            }
            file = new File(str, this.f6581a.getPackageName() + ".zip");
            try {
                y.a(file, logFile);
                if (file.exists()) {
                    as.a((this.f680a ? "https://api.xmpush.xiaomi.com/upload/xmsf_log?file=" : "https://api.xmpush.xiaomi.com/upload/app_log?file=") + file.getName(), a2, file, "file");
                } else {
                    b.m3008a("zip log file failed");
                }
            } catch (Throwable th2) {
                th = th2;
                b.a(th);
                if (file == null) {
                    return;
                }
            }
            if (file == null && file.exists()) {
                file.delete();
            }
        } catch (Throwable th3) {
            th = th3;
            file = null;
            b.a(th);
            if (file == null) {
            }
        }
    }
}