- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
95 lines
3.2 KiB
Java
95 lines
3.2 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.content.Intent;
|
|
import com.applovin.communicator.AppLovinCommunicatorMessage;
|
|
import com.applovin.communicator.AppLovinCommunicatorSubscriber;
|
|
import com.applovin.impl.communicator.CommunicatorMessageImpl;
|
|
import com.applovin.impl.sdk.AppLovinBroadcastManager;
|
|
import java.lang.ref.WeakReference;
|
|
import java.util.LinkedHashSet;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ml implements AppLovinBroadcastManager.Receiver {
|
|
private final String b;
|
|
private final WeakReference c;
|
|
private boolean a = true;
|
|
private final Set d = new LinkedHashSet();
|
|
private final Object f = new Object();
|
|
|
|
public void a(boolean z) {
|
|
this.a = z;
|
|
}
|
|
|
|
public String b() {
|
|
return this.b;
|
|
}
|
|
|
|
public boolean c() {
|
|
return this.a;
|
|
}
|
|
|
|
public ml(String str, AppLovinCommunicatorSubscriber appLovinCommunicatorSubscriber) {
|
|
this.b = str;
|
|
this.c = new WeakReference(appLovinCommunicatorSubscriber);
|
|
}
|
|
|
|
public AppLovinCommunicatorSubscriber a() {
|
|
return (AppLovinCommunicatorSubscriber) this.c.get();
|
|
}
|
|
|
|
@Override // com.applovin.impl.sdk.AppLovinBroadcastManager.Receiver
|
|
public void onReceive(Intent intent, Map map) {
|
|
boolean z;
|
|
if (a() == null) {
|
|
com.applovin.impl.sdk.n.h("AppLovinCommunicator", "Message received for GC'd subscriber");
|
|
return;
|
|
}
|
|
CommunicatorMessageImpl communicatorMessageImpl = (CommunicatorMessageImpl) intent;
|
|
synchronized (this.f) {
|
|
try {
|
|
if (this.d.contains(communicatorMessageImpl.getUniqueId())) {
|
|
z = false;
|
|
} else {
|
|
this.d.add(communicatorMessageImpl.getUniqueId());
|
|
z = true;
|
|
}
|
|
} catch (Throwable th) {
|
|
throw th;
|
|
}
|
|
}
|
|
if (z) {
|
|
a().onMessageReceived((AppLovinCommunicatorMessage) communicatorMessageImpl);
|
|
}
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof ml)) {
|
|
return false;
|
|
}
|
|
AppLovinCommunicatorSubscriber appLovinCommunicatorSubscriber = (AppLovinCommunicatorSubscriber) this.c.get();
|
|
ml mlVar = (ml) obj;
|
|
AppLovinCommunicatorSubscriber appLovinCommunicatorSubscriber2 = (AppLovinCommunicatorSubscriber) mlVar.c.get();
|
|
if (b().equals(mlVar.b())) {
|
|
if (appLovinCommunicatorSubscriber != null) {
|
|
if (appLovinCommunicatorSubscriber.equals(appLovinCommunicatorSubscriber2)) {
|
|
return true;
|
|
}
|
|
} else if (appLovinCommunicatorSubscriber == appLovinCommunicatorSubscriber2) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public int hashCode() {
|
|
int hashCode = this.b.hashCode();
|
|
AppLovinCommunicatorSubscriber appLovinCommunicatorSubscriber = (AppLovinCommunicatorSubscriber) this.c.get();
|
|
return (hashCode * 31) + (appLovinCommunicatorSubscriber != null ? appLovinCommunicatorSubscriber.hashCode() : 0);
|
|
}
|
|
}
|