discord-jadx/app/src/main/java/b/f/j/p/b.java

95 lines
2.1 KiB
Java
Raw Normal View History

2021-12-17 21:59:34 +00:00
package b.f.j.p;
2021-07-24 02:37:17 +00:00
import android.util.Log;
import androidx.core.os.EnvironmentCompat;
2021-12-17 21:59:34 +00:00
import b.d.b.a.a;
2021-07-24 02:37:17 +00:00
import java.io.PrintWriter;
import java.io.StringWriter;
2022-03-07 09:34:54 +00:00
/* compiled from: BaseConsumer.java */
2022-04-04 09:20:14 +00:00
/* loaded from: classes3.dex */
2021-07-24 02:37:17 +00:00
public abstract class b<T> implements l<T> {
public boolean a = false;
public static boolean e(int i) {
return (i & 1) == 1;
}
public static boolean f(int i) {
return !e(i);
}
public static boolean l(int i, int i2) {
return (i & i2) != 0;
}
public static boolean m(int i, int i2) {
return (i & i2) == i2;
}
2021-12-17 21:59:34 +00:00
@Override // b.f.j.p.l
2021-07-24 02:37:17 +00:00
public synchronized void a(float f) {
if (!this.a) {
try {
j(f);
} catch (Exception e) {
k(e);
}
}
}
2021-12-17 21:59:34 +00:00
@Override // b.f.j.p.l
2021-07-24 02:37:17 +00:00
public synchronized void b(T t, int i) {
if (!this.a) {
this.a = e(i);
try {
i(t, i);
} catch (Exception e) {
k(e);
}
}
}
2021-12-17 21:59:34 +00:00
@Override // b.f.j.p.l
2021-07-24 02:37:17 +00:00
public synchronized void c(Throwable th) {
if (!this.a) {
this.a = true;
try {
h(th);
} catch (Exception e) {
k(e);
}
}
}
2021-12-17 21:59:34 +00:00
@Override // b.f.j.p.l
2021-07-24 02:37:17 +00:00
public synchronized void d() {
if (!this.a) {
this.a = true;
try {
g();
} catch (Exception e) {
k(e);
}
}
}
public abstract void g();
public abstract void h(Throwable th);
public abstract void i(T t, int i);
public abstract void j(float f);
public void k(Exception exc) {
2021-11-05 06:48:17 +00:00
String w = a.w(EnvironmentCompat.MEDIA_UNKNOWN, ":", getClass().getSimpleName());
2021-07-24 02:37:17 +00:00
StringBuilder sb = new StringBuilder();
sb.append("unhandled exception");
sb.append('\n');
StringWriter stringWriter = new StringWriter();
exc.printStackTrace(new PrintWriter(stringWriter));
sb.append(stringWriter.toString());
2021-11-05 06:48:17 +00:00
Log.println(6, w, sb.toString());
2021-07-24 02:37:17 +00:00
}
}