Files
rr3-apk/decompiled-community/sources/csdk/glucustomersupport/unity/UnityCustomerSupportFactory.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

71 lines
3.2 KiB
Java

package csdk.glucustomersupport.unity;
import android.app.Activity;
import android.text.TextUtils;
import com.unity3d.player.UnityPlayer;
import csdk.glucustomersupport.GluCustomerSupportSessionEndedEvent;
import csdk.glucustomersupport.GluCustomerSupportSessionStartedEvent;
import csdk.glucustomersupport.GluFactory;
import csdk.glucustomersupport.IGluCustomerSupport;
import csdk.glucustomersupport.IGluCustomerSupportListener;
import csdk.glucustomersupport.NotificationCountEvent;
import csdk.glucustomersupport.util.GluUtil;
import csdk.glucustomersupport.util.JsonUtil;
import java.util.Map;
import java.util.concurrent.Callable;
import org.json.JSONException;
/* loaded from: classes4.dex */
public class UnityCustomerSupportFactory {
public static class UnityCustomerSupportListener implements IGluCustomerSupportListener {
private final String gameObject;
public UnityCustomerSupportListener(String str) {
this.gameObject = str;
}
@Override // csdk.glucustomersupport.IGluCustomerSupportListener
public void onQueryNotificationCount(NotificationCountEvent notificationCountEvent) {
UnityPlayer.UnitySendMessage(this.gameObject, "AndroidCustomerSupportOnQueryNotificationCount", JsonUtil.toJson(notificationCountEvent));
}
@Override // csdk.glucustomersupport.IGluCustomerSupportListener
public void onHelpshiftSessionStarted(GluCustomerSupportSessionStartedEvent gluCustomerSupportSessionStartedEvent) {
UnityPlayer.UnitySendMessage(this.gameObject, "AndroidCustomerSupportOnHelpshiftSessionStarted", JsonUtil.toJson(gluCustomerSupportSessionStartedEvent));
}
@Override // csdk.glucustomersupport.IGluCustomerSupportListener
public void onHelpshiftSessionEnded(GluCustomerSupportSessionEndedEvent gluCustomerSupportSessionEndedEvent) {
UnityPlayer.UnitySendMessage(this.gameObject, "AndroidCustomerSupportOnHelpshiftSessionEnded", JsonUtil.toJson(gluCustomerSupportSessionEndedEvent));
}
}
public IGluCustomerSupport createCustomerSupport(String str, String str2, String str3) {
Map<String, Object> parseJsonObject;
Callable<Activity> callable = new Callable<Activity>() { // from class: csdk.glucustomersupport.unity.UnityCustomerSupportFactory.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // java.util.concurrent.Callable
public Activity call() throws Exception {
Activity activity = UnityPlayer.currentActivity;
if (activity != null) {
return activity;
}
throw new Error("Current activity is null.");
}
};
if (TextUtils.isEmpty(str3)) {
parseJsonObject = null;
} else {
try {
parseJsonObject = JsonUtil.parseJsonObject(str3);
} catch (JSONException e) {
throw GluUtil.propagate(e);
}
}
IGluCustomerSupport createCustomerSupport = new GluFactory().createCustomerSupport(callable, GluUtil.emptyToNull(str2), parseJsonObject);
createCustomerSupport.setListener(new UnityCustomerSupportListener(str));
return createCustomerSupport;
}
}