apk(点击下载) / u.java


package com.xiaomi.mipush.sdk;

import android.content.Context;
import com.netease.nimlib.jsbridge.interfaces.IJavaReplyToJsFileInfo;
import com.xiaomi.channel.commonutils.logger.b;
import com.xiaomi.push.Cdo;
import com.xiaomi.push.az;
import com.xiaomi.push.y;
import java.io.File;
import java.util.HashMap;

/* access modifiers changed from: package-private */
public final class u implements Runnable {
    final /* synthetic */ Context a;

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

    u(Context context, boolean z) {
        this.a = context;
        this.f72a = z;
    }

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