- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
79 lines
3.2 KiB
Java
79 lines
3.2 KiB
Java
package csdk.gluads.eventbus;
|
|
|
|
import androidx.annotation.Nullable;
|
|
import com.ironsource.jo;
|
|
import csdk.gluads.eventbus.GluEventBus;
|
|
import csdk.gluads.util.Common;
|
|
import csdk.gluads.util.ConfigUtil;
|
|
import csdk.gluads.util.log.YLogger;
|
|
import csdk.gluads.util.log.YLoggerFactory;
|
|
import java.util.Arrays;
|
|
import java.util.Map;
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class GluAdsManagerEventHandler implements GluEventBus.IEventHandler {
|
|
private static final String CHANNEL_GLUCENTRALSERVICES = "#csdk.gluCentralServices";
|
|
private static final String PREFIX_CHANNEL = "#csdk.gluAdsManager";
|
|
private static final String PREFIX_HANDLER = "@csdk.gluAdsManager";
|
|
private String mChannel;
|
|
private GluEventBus mEventBus;
|
|
private String mHandler;
|
|
private final YLogger mLog = YLoggerFactory.getLogger(getClass());
|
|
private Object mToken = GluEventBus.GLOBAL_TOKEN;
|
|
private ConcurrentHashMap mCrossPromotionsBlocked = new ConcurrentHashMap();
|
|
|
|
public void directLoad(String str, @Nullable Map<String, Object> map) {
|
|
}
|
|
|
|
public GluAdsManagerEventHandler(String str) {
|
|
this.mChannel = PREFIX_CHANNEL + str;
|
|
this.mHandler = PREFIX_HANDLER + str;
|
|
}
|
|
|
|
public void subscribe(GluEventBus gluEventBus) {
|
|
this.mEventBus = gluEventBus;
|
|
this.mToken = gluEventBus.subscribe(GluEventBus.GLOBAL_TOKEN, this.mHandler, Arrays.asList(this.mChannel), this);
|
|
}
|
|
|
|
public void onDestroy() {
|
|
this.mEventBus.unsubscribe(this.mToken);
|
|
}
|
|
|
|
public void loadAdOnCrossPromoTargetAppCheck(String str, String str2, @Nullable Map<String, Object> map) {
|
|
Map createMap = Common.createMap();
|
|
createMap.put(jo.d, str);
|
|
createMap.put("campaignName", str2);
|
|
if (map != null) {
|
|
createMap.put("extra", map);
|
|
}
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_GLUCENTRALSERVICES, "requestCrossPromoTargetAppCheck", this.mChannel, createMap));
|
|
}
|
|
|
|
public boolean isCrossPromoBlocked(String str) {
|
|
return this.mCrossPromotionsBlocked.keySet().contains(str);
|
|
}
|
|
|
|
@Override // csdk.gluads.eventbus.GluEventBus.IEventHandler
|
|
public void handleEvent(GluEventBus gluEventBus, Object obj, String str, GluEventBus.Event event) throws Exception {
|
|
if (this.mChannel.equals(event.channel)) {
|
|
String str2 = event.action;
|
|
str2.hashCode();
|
|
if (str2.equals("responseCrossPromoTargetAppCheck")) {
|
|
String string = ConfigUtil.getString(event.data, jo.d, null);
|
|
Map<String, Object> map = ConfigUtil.getMap(event.data, "extra", null);
|
|
Boolean valueOf = Boolean.valueOf(ConfigUtil.getString(event.data, "status", "").equalsIgnoreCase("blocked"));
|
|
this.mLog.d("GluAds: responseCrossPromoTargetAppCheck", event.data.toString());
|
|
if (string != null) {
|
|
if (valueOf.booleanValue()) {
|
|
this.mCrossPromotionsBlocked.put(string, Boolean.TRUE);
|
|
} else {
|
|
this.mCrossPromotionsBlocked.remove(string);
|
|
}
|
|
directLoad(string, map);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|