package e.c.b.a;

import e.c.b.b.b;
import java.lang.Thread;

/* JADX INFO: compiled from: BaseThread.java */
/* JADX INFO: loaded from: classes.dex */
public class a extends Thread {
    protected boolean b;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    protected Thread f748e;

    /* JADX INFO: renamed from: e.c.b.a.a$a, reason: collision with other inner class name */
    /* JADX INFO: compiled from: BaseThread.java */
    class C0029a implements Thread.UncaughtExceptionHandler {
        C0029a() {
        }

        @Override // java.lang.Thread.UncaughtExceptionHandler
        public void uncaughtException(Thread thread, Throwable th) {
            b.c("BaseThread", "Got uncaughtException: thread id=[%d], name=[%s], msg=%s", Long.valueOf(a.this.getId()), a.this.getName(), a.this.b(th));
        }
    }

    public a() {
        setUncaughtExceptionHandler(new C0029a());
    }

    /* JADX INFO: Access modifiers changed from: private */
    public String b(Throwable th) {
        return e.c.b.b.a.a(th);
    }

    public void c() {
        b.g("BaseThread", "stopThread");
        this.b = false;
        Thread thread = this.f748e;
        if (thread != null) {
            thread.interrupt();
            this.f748e = null;
        }
    }

    @Override // java.lang.Thread, java.lang.Runnable
    public void run() {
        this.b = true;
        this.f748e = Thread.currentThread();
    }
}
