- 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
166 lines
8.1 KiB
Java
166 lines
8.1 KiB
Java
package com.glu.plugins.gluanalytics.eventbus;
|
|
|
|
import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
|
|
import com.facebook.share.internal.ShareConstants;
|
|
import com.glu.plugins.gluanalytics.Analytics;
|
|
import com.glu.plugins.gluanalytics.BuildConfig;
|
|
import com.glu.plugins.gluanalytics.IAnalyticsCallback;
|
|
import com.glu.plugins.gluanalytics.eventbus.GluEventBus;
|
|
import com.glu.plugins.gluanalytics.kvstore.StringStore;
|
|
import com.glu.plugins.gluanalytics.util.CollectionUtil;
|
|
import com.glu.plugins.gluanalytics.util.ConfigUtil;
|
|
import java.util.Arrays;
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class GluAnalyticsEventHandler implements GluEventBus.IEventHandler, IAnalyticsCallback {
|
|
private static final String CHANNEL_GLOBAL_SDK = "#sdk";
|
|
private static final String CHANNEL_LIFECYCLE = "#eb.lifecycle";
|
|
private static final String CHANNEL_SDK = "#csdk.gluAnalytics";
|
|
private static final String CHANNEL_SDK_EVT = "#csdk.gluAnalytics.evt";
|
|
private static final String ID_HANDLER = "@csdk.gluAnalytics";
|
|
private final Analytics mAnalytics;
|
|
private final GluEventBus mEventBus;
|
|
private String mPreviousSessionID = "";
|
|
private String mRevSDKVersion;
|
|
private Object mToken;
|
|
|
|
public GluAnalyticsEventHandler(GluEventBus gluEventBus, Analytics analytics, String str) {
|
|
this.mEventBus = gluEventBus;
|
|
this.mAnalytics = analytics;
|
|
this.mRevSDKVersion = str;
|
|
}
|
|
|
|
public static GluAnalyticsEventHandler subscribe(GluEventBus gluEventBus, Object obj, Analytics analytics, String str) {
|
|
GluAnalyticsEventHandler gluAnalyticsEventHandler = new GluAnalyticsEventHandler(gluEventBus, analytics, str);
|
|
gluAnalyticsEventHandler.mToken = gluEventBus.subscribe(obj, ID_HANDLER, Arrays.asList(CHANNEL_SDK, CHANNEL_LIFECYCLE, CHANNEL_GLOBAL_SDK), gluAnalyticsEventHandler);
|
|
return gluAnalyticsEventHandler;
|
|
}
|
|
|
|
@Override // com.glu.plugins.gluanalytics.IAnalyticsCallback
|
|
public void onInit(String str, String str2, String str3, String str4, String str5, String str6) {
|
|
Map createMap = CollectionUtil.createMap();
|
|
createMap.put("name", "GluAnalytics");
|
|
createMap.put("version", BuildConfig.VERSION_NAME);
|
|
createMap.put("RevSDKVersion", this.mRevSDKVersion);
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event("#sdk.evt", "initialized", null, createMap));
|
|
publishAnalyticsDeviceId(str, str2);
|
|
publishRevenueId(str3);
|
|
publishGAID(str4);
|
|
publishAndroidId(str5);
|
|
publishAppSetId(str6);
|
|
}
|
|
|
|
@Override // com.glu.plugins.gluanalytics.IAnalyticsCallback
|
|
public void onDestroy() {
|
|
Map createMap = CollectionUtil.createMap();
|
|
createMap.put("name", "GluAnalytics");
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event("#sdk.evt", "destroyed", null, createMap));
|
|
this.mEventBus.unsubscribe(this.mToken);
|
|
}
|
|
|
|
@Override // com.glu.plugins.gluanalytics.IAnalyticsCallback
|
|
public void onUserIdChanged(String str, String str2) {
|
|
Map createMap = CollectionUtil.createMap();
|
|
createMap.put(SDKConstants.PARAM_USER_ID, str);
|
|
createMap.put("revID", str2);
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, "userIDChanged", null, createMap));
|
|
}
|
|
|
|
@Override // com.glu.plugins.gluanalytics.IAnalyticsCallback
|
|
public void recordAnalyticsRequest(String str, String str2, String str3, String str4, String str5, String str6, String str7) {
|
|
Map createMap = CollectionUtil.createMap();
|
|
createMap.put("association", str);
|
|
createMap.put("fieldName", str2);
|
|
createMap.put("fieldType", str4);
|
|
createMap.put("fieldValue", str5);
|
|
createMap.put("mapKeyName", str3);
|
|
createMap.put("writeOperation", str6);
|
|
createMap.put("requestId", str7);
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, "recordAnalyticsRequest", null, createMap));
|
|
}
|
|
|
|
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
|
|
/* JADX WARN: Code restructure failed: missing block: B:172:0x01a8, code lost:
|
|
|
|
if (r3.equals("setEATargetedMarketing") == false) goto L6;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:193:0x05b4, code lost:
|
|
|
|
if (r1.equals("destroy") == false) goto L183;
|
|
*/
|
|
@Override // com.glu.plugins.gluanalytics.eventbus.GluEventBus.IEventHandler
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public void handleEvent(com.glu.plugins.gluanalytics.eventbus.GluEventBus r33, java.lang.Object r34, java.lang.String r35, com.glu.plugins.gluanalytics.eventbus.GluEventBus.Event r36) {
|
|
/*
|
|
Method dump skipped, instructions count: 1754
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.glu.plugins.gluanalytics.eventbus.GluAnalyticsEventHandler.handleEvent(com.glu.plugins.gluanalytics.eventbus.GluEventBus, java.lang.Object, java.lang.String, com.glu.plugins.gluanalytics.eventbus.GluEventBus$Event):void");
|
|
}
|
|
|
|
private void publishAnalyticsDeviceId(String str, String str2) {
|
|
Map createMap = CollectionUtil.createMap();
|
|
CollectionUtil.putIfNotEmpty((Map<String, ? super String>) createMap, "id", str);
|
|
CollectionUtil.putIfNotEmpty((Map<String, ? super String>) createMap, ShareConstants.FEED_SOURCE_PARAM, str2);
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, "analyticsDeviceID", null, createMap));
|
|
StringStore.set(StringStore.Key.ANALYTICS_ID, str);
|
|
}
|
|
|
|
private void publishRevenueId(String str) {
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, "revenueID", null, Collections.singletonMap("id", str)));
|
|
StringStore.set(StringStore.Key.REV_ID, str);
|
|
}
|
|
|
|
private void publishGAID(String str) {
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, "advertisingID", null, Collections.singletonMap("id", str)));
|
|
}
|
|
|
|
private void publishAndroidId(String str) {
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, "androidID", null, Collections.singletonMap("id", str)));
|
|
}
|
|
|
|
private void publishAppSetId(String str) {
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, "appSetId", null, Collections.singletonMap("id", str)));
|
|
}
|
|
|
|
private void publishSessionId(String str) {
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, SDKConstants.PARAM_SESSION_ID, null, Collections.singletonMap("id", str)));
|
|
StringStore.set(StringStore.Key.SESSION_ID, str);
|
|
this.mPreviousSessionID = str;
|
|
}
|
|
|
|
@Override // com.glu.plugins.gluanalytics.IAnalyticsCallback
|
|
public void onUpdateSessionId() {
|
|
String sessionIdentifier = this.mAnalytics.getSessionIdentifier();
|
|
if (sessionIdentifier == null || sessionIdentifier.length() <= 0 || sessionIdentifier.equals(this.mPreviousSessionID)) {
|
|
return;
|
|
}
|
|
publishSessionId(this.mAnalytics.getSessionIdentifier());
|
|
}
|
|
|
|
@Override // com.glu.plugins.gluanalytics.IAnalyticsCallback
|
|
public void internalTargetedAdsChanged(boolean z) {
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, z ? "internalTargetedAdsOn" : "internalTargetedAdsOff", null, CollectionUtil.createMap()));
|
|
}
|
|
|
|
@Override // com.glu.plugins.gluanalytics.IAnalyticsCallback
|
|
public void setPushToken(String str) {
|
|
publishPushToken(str);
|
|
}
|
|
|
|
private void setUserIdentifier(Map<String, Object> map) {
|
|
this.mAnalytics.setUserIdentifier(ConfigUtil.getString(map, "id"));
|
|
}
|
|
|
|
private void publishPushToken(String str) {
|
|
Map createMap = CollectionUtil.createMap();
|
|
createMap.put("pushToken", str);
|
|
this.mEventBus.publish(this.mToken, new GluEventBus.Event(CHANNEL_SDK_EVT, "publishPushToken", null, createMap));
|
|
}
|
|
}
|