discord-jadx/app/src/main/java/c/i/a/f/e/h/j/k.java

92 lines
2.5 KiB
Java

package c.i.a.f.e.h.j;
import android.os.Looper;
import android.os.Message;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.airbnb.lottie.parser.AnimatableValueParser;
/* compiled from: com.google.android.gms:play-services-base@@17.3.0 */
public final class k<L> {
public final c a;
@Nullable
public volatile L b;
@Nullable
/* renamed from: c reason: collision with root package name */
public volatile a<L> f1042c;
/* compiled from: com.google.android.gms:play-services-base@@17.3.0 */
public static final class a<L> {
public final L a;
public final String b;
public a(L l, String str) {
this.a = l;
this.b = str;
}
public final boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof a)) {
return false;
}
a aVar = (a) obj;
return this.a == aVar.a && this.b.equals(aVar.b);
}
public final int hashCode() {
return this.b.hashCode() + (System.identityHashCode(this.a) * 31);
}
}
/* compiled from: com.google.android.gms:play-services-base@@17.3.0 */
public interface b<L> {
void a(L l);
void b();
}
/* compiled from: com.google.android.gms:play-services-base@@17.3.0 */
public final class c extends c.i.a.f.h.e.c {
public c(Looper looper) {
super(looper);
}
@Override // android.os.Handler
public final void handleMessage(Message message) {
boolean z2 = true;
if (message.what != 1) {
z2 = false;
}
AnimatableValueParser.m(z2);
b bVar = (b) message.obj;
L l = k.this.b;
if (l == null) {
bVar.b();
return;
}
try {
bVar.a(l);
} catch (RuntimeException e) {
bVar.b();
throw e;
}
}
}
public k(@NonNull Looper looper, @NonNull L l, @NonNull String str) {
this.a = new c(looper);
AnimatableValueParser.z(l, "Listener must not be null");
this.b = l;
AnimatableValueParser.w(str);
this.f1042c = new a<>(l, str);
}
public final void a(b<? super L> bVar) {
AnimatableValueParser.z(bVar, "Notifier must not be null");
this.a.sendMessage(this.a.obtainMessage(1, bVar));
}
}