导航菜单

页面标题

页面副标题

RummyCircle v11000.89 - NativeUnityCommController.java 源代码

正在查看: RummyCircle v11000.89 应用的 NativeUnityCommController.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.games24x7.dynamicrc.unitymodule.comm.unitycomm;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import com.games24x7.coregame.KrakenApplication;
import com.games24x7.coregame.common.CommonConfig;
import com.games24x7.coregame.common.communication.nativecomm.ModuleFactory;
import com.games24x7.coregame.common.communication.nativecomm.NativeCommunicationInterface;
import com.games24x7.coregame.common.communication.routers.runtimedata.RuntimeDataComplexEvent;
import com.games24x7.coregame.common.deeplink.util.NativeUtil;
import com.games24x7.coregame.common.deeplink.util.PreferenceManager;
import com.games24x7.coregame.common.utility.eds.EDSUtility;
import com.games24x7.coregame.common.utility.general.RouterUtility;
import com.games24x7.coregame.common.utility.log.Logger;
import com.games24x7.coregame.common.utility.native.UrlUtility;
import com.games24x7.coregame.common.utility.runtimevars.RunTimeVarsUtility;
import com.games24x7.coregame.dynamicRC.BuildConfig;
import com.games24x7.dynamicrc.unitymodule.comm.unitycomm.complex.UnityComplexLayer;
import com.games24x7.dynamicrc.unitymodule.comm.unitycomm.complex.routers.config.NativeConfigComplexEventRouter;
import com.games24x7.dynamicrc.unitymodule.comm.unitycomm.complex.routers.deviceinfo.DeviceInfoComplexEventRouter;
import com.games24x7.dynamicrc.unitymodule.comm.unitycomm.complex.routers.geolocation.GeoLocationComplexEventRouter;
import com.games24x7.dynamicrc.unitymodule.comm.unitycomm.complex.routers.rap.RapComplexEventRouter;
import com.games24x7.dynamicrc.unitymodule.model.UnityCallbackEvent;
import com.games24x7.pganalytics.communication.PGAnalyticsEventHandler;
import com.games24x7.pgeventbus.PGEventBus;
import com.games24x7.pgeventbus.event.EventInfo;
import com.games24x7.pgeventbus.event.PGEvent;
import com.games24x7.pgeventbus.interfaces.PGModuleInterface;
import com.games24x7.pgnetwork.communication.NetworkCommunicationManager;
import com.games24x7.pgnetwork.utils.CookieConfig;
import com.games24x7.pgnetwork.utils.ReplicateUrlData;
import com.games24x7.pgpayment.sdk.PaymentConfig;
import com.games24x7.pgpayment.sdk.juspay.JuspayConfig;
import com.games24x7.pgpayment.sdk.phonepe.PhonePeConfig;
import com.google.gson.d;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.I;
import kotlin.collections.q;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.CancellableContinuation;
import org.greenrobot.eventbus.ThreadMode;
import org.greenrobot.eventbus.i;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;

@Metadata
public final class NativeUnityCommController implements NativeCommunicationInterface.Controller, PGModuleInterface {

    @NotNull
    public static final Companion Companion = new Companion(null);

    @NotNull
    private static final String TAG = "UnityComCont";

    @NotNull
    public static final String TYPE = "unity_native_callback";
    private static boolean isLazyInitialized;

    @NotNull
    private final NativeCommunicationInterface.Bridge bridgeInterface;

    @NotNull
    private final CommonConfig commonConfig;

    @NotNull
    private final d gson;

    @NotNull
    private final Context mContext;
    private NetworkCommunicationManager networkCommunicationManager;

    @NotNull
    private final PGEventBus pgEventBus;

    @NotNull
    private final UnityComplexLayer rnBusinessLayer;

    @Metadata
    public static final class Companion {
        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        @NotNull
        public final String getTAG() {
            return NativeUnityCommController.TAG;
        }

        private Companion() {
        }
    }

    @Metadata
    public static final class ContinuationAdapter implements NativeCallback {

        @NotNull
        private final CancellableContinuation<PGEvent> continuation;

        public ContinuationAdapter(@NotNull CancellableContinuation<? super PGEvent> cancellableContinuation) {
            Intrinsics.checkNotNullParameter(cancellableContinuation, "continuation");
            this.continuation = cancellableContinuation;
        }

        @NotNull
        public final CancellableContinuation<PGEvent> getContinuation() {
            return this.continuation;
        }

        @Override
        public void onCallbackFromNative(@NotNull PGEvent pGEvent) {
            Intrinsics.checkNotNullParameter(pGEvent, "responseEvent");
            this.continuation.resume(pGEvent, NativeUnityCommController$ContinuationAdapter$onCallbackFromNative$1.INSTANCE);
        }
    }

    @Metadata
    public interface NativeCallback {
        void onCallbackFromNative(@NotNull PGEvent pGEvent);
    }

    public NativeUnityCommController(@NotNull NativeCommunicationInterface.Bridge bridge, @NotNull Context context, @NotNull CommonConfig commonConfig) {
        Intrinsics.checkNotNullParameter(bridge, "bridgeInterface");
        Intrinsics.checkNotNullParameter(context, "mContext");
        Intrinsics.checkNotNullParameter(commonConfig, "commonConfig");
        this.bridgeInterface = bridge;
        this.mContext = context;
        this.commonConfig = commonConfig;
        PGEventBus eventBus = KrakenApplication.Companion.getEventBus();
        this.pgEventBus = eventBus;
        this.gson = new d();
        eventBus.register(this);
        UnityComplexLayer unityComplexLayer = new UnityComplexLayer(context, this);
        this.rnBusinessLayer = unityComplexLayer;
        EDSUtility.INSTANCE.setupCommInterface(unityComplexLayer);
        initNativeModules();
    }

    private final CookieConfig getNetworkCookiePayload() {
        CookieConfig cookieConfig = new CookieConfig((String) null, (String) null, (ArrayList) null, (String) null, (List) null, (List) null, 63, (DefaultConstructorMarker) null);
        UrlUtility urlUtility = UrlUtility.INSTANCE;
        cookieConfig.setMainUrl(urlUtility.getMrcUrl());
        cookieConfig.setReplicatedCookieUrl(urlUtility.getMy11circleUrl());
        cookieConfig.setReplicateUrlDataList(q.b(new ReplicateUrlData(".rummycircle.com", ".my11circle.com", urlUtility.getMy11circleUrl(), new String[]{".my11circle.com", ".pokercircle.co.in"}, new String[]{urlUtility.getMy11circleUrl(), urlUtility.getPokerBaseurl()})));
        return cookieConfig;
    }

    public PGEvent convert(@NotNull PGEvent pGEvent) {
        Intrinsics.checkNotNullParameter(pGEvent, "pgEvent");
        UnityCallbackEvent unityCallbackEvent = new UnityCallbackEvent();
        unityCallbackEvent.clone(pGEvent);
        return unityCallbackEvent;
    }

    @NotNull
    public final PGEventBus getPgEventBus() {
        return this.pgEventBus;
    }

    @NotNull
    public final UnityComplexLayer getRnBusinessLayer() {
        return this.rnBusinessLayer;
    }

    @NotNull
    public String getType() {
        return TYPE;
    }

    public final void initLazyModules(@NotNull String str, Activity activity) {
        Intrinsics.checkNotNullParameter(str, "userId");
        Logger logger = Logger.INSTANCE;
        String str2 = TAG;
        Logger.d$default(logger, str2, "initLazyModules:: " + str, false, 4, (Object) null);
        Logger.e$default(logger, str2, "initLazyModules :: If current activity is " + activity, false, 4, (Object) null);
        if (activity != null) {
            Pair pair = new Pair("User-Agent", NativeUtil.INSTANCE.getCustomNetworkUserAgent());
            UrlUtility urlUtility = UrlUtility.INSTANCE;
            ModuleFactory.INSTANCE.createPaymentModule(activity, new PaymentConfig(str, "_RUMMY", I.e(new Pair[]{pair, new Pair("origin", urlUtility.getMrcUrl()), new Pair("geoLocState", String.valueOf(PreferenceManager.Companion.getInstance().getCurrentState()))}), urlUtility.getMrcUrl(), new JuspayConfig("rummycircle", "rummycircle_android", BuildConfig.BUILD_TYPE), BuildConfig.BUILD_TYPE, new PhonePeConfig("RUMMYCIRCLEPGONLINE", com.unity3d.player.BuildConfig.BUILD_TYPE, false)), this.pgEventBus, "rn_native_callback", "ANALYTICS_COMPLEX_EVENT");
        }
    }

    public final void initNativeModules() {
        ModuleFactory moduleFactory = ModuleFactory.INSTANCE;
        this.networkCommunicationManager = moduleFactory.createNetworkModule(this.mContext, UrlUtility.INSTANCE.getMrcUrl(), this.pgEventBus, "retrofit", getNetworkCookiePayload(), new com.games24x7.pgnetwork.utils.CommonConfig(0L, 0L, 0L, "DOWNTIME", TYPE, 7, (DefaultConstructorMarker) null));
        setNetworkConfig("setcommonheader", RouterUtility.INSTANCE.getCommonHeaderHashMap());
        moduleFactory.createStorageModule(this.mContext, this.pgEventBus);
        moduleFactory.createLocationModule(this.mContext, this.pgEventBus, TYPE, "ANALYTICS_COMPLEX_EVENT");
        moduleFactory.createDownloadModule(this.mContext, "worker", this.pgEventBus, TYPE, "ANALYTICS_COMPLEX_EVENT");
        moduleFactory.createGoogleApiModule(this.mContext, this.pgEventBus, TYPE, "ANALYTICS_COMPLEX_EVENT");
        moduleFactory.createContactModule(this.mContext, this.pgEventBus);
        moduleFactory.createPermissionModule(this.mContext, this.pgEventBus);
        moduleFactory.createWebsocketModule(this.mContext, this.pgEventBus);
        Log.e(TAG, "initNativeModules :: Initalizing webview module");
        moduleFactory.createWebviewModule(this.mContext, "", this.pgEventBus);
    }

    public final void mockNetworkRequest() {
        EventInfo eventInfo = new EventInfo("api", "network", (String) null, (String) null, 12, (DefaultConstructorMarker) null);
        EventInfo eventInfo2 = new EventInfo("unity_callback", getType(), (String) null, (String) null, 12, (DefaultConstructorMarker) null);
        Logger.e$default(Logger.INSTANCE, TAG, "sendEventsToNetworkModule ::  Calling EventBus Network Module", false, 4, (Object) null);
        this.pgEventBus.postEvent(new PGEvent(eventInfo, "{\n  \"apiType\": \"GET\",\n  \"contentType\": \"application/json\",\n  \"url\": \"https://reqres.in/api/users\"\n}", eventInfo2));
    }

    @i(threadMode = ThreadMode.MAIN)
    public final void onCallbackFromCoreModule(@NotNull UnityCallbackEvent unityCallbackEvent) {
        Intrinsics.checkNotNullParameter(unityCallbackEvent, "unityCallbackEvent");
        Logger.d$default(Logger.INSTANCE, TAG, "thread:: " + Thread.currentThread() + " | eventName:: " + unityCallbackEvent.getEventData().getName(), false, 4, (Object) null);
        onCallbackFromNative(unityCallbackEvent);
    }

    public final void onCallbackFromNative(@NotNull PGEvent pGEvent) {
        Intrinsics.checkNotNullParameter(pGEvent, "pgEvent");
        Logger logger = Logger.INSTANCE;
        String str = TAG;
        Logger.e$default(logger, str, "onCallbackFromNative :: Event Received at NativeUnityCommunication Controller :: " + this.gson.s(pGEvent), false, 4, (Object) null);
        if (Intrinsics.a(pGEvent.getEventData().getName(), "gpssettings_response")) {
            NativeUtil nativeUtil = NativeUtil.INSTANCE;
            Bundle bundle = new Bundle();
            bundle.putString("action", "ADDCASH_PERM_ACTIVITY_ACTION_GPS_RESPONSE");
            bundle.putString("payload", pGEvent.getPayloadInfo());
            nativeUtil.launchAddCashPermissionActivity(bundle);
        }
        String metaData = pGEvent.getEventData().getMetaData();
        if (metaData != null && this.rnBusinessLayer.checkIfOnboardingEvent(metaData)) {
            this.pgEventBus.postEvent(pGEvent);
        } else if (this.rnBusinessLayer.checkIfRoutingRequired(pGEvent.getEventData().getName())) {
            Logger.i$default(logger, str, "onCallbackFromNative :: Routing the Events....", false, 4, (Object) null);
            this.rnBusinessLayer.routeComplexAPICalls(pGEvent);
        } else {
            Logger.i$default(logger, str, "onCallbackFromNative :: Replying to Client...", false, 4, (Object) null);
            this.bridgeInterface.onCallbackFromNative(pGEvent);
        }
    }

    public PGEvent processSyncRequest(@NotNull PGEvent pGEvent) {
        Intrinsics.checkNotNullParameter(pGEvent, "pgEvent");
        String name = pGEvent.getEventData().getName();
        switch (name.hashCode()) {
            case -2092579545:
                if (name.equals("isSocketOpen")) {
                    return new NativeConfigComplexEventRouter().checkIsSocketOpen(pGEvent);
                }
                return null;
            case -1723409986:
                if (name.equals("getGeoLocationInfo")) {
                    return new GeoLocationComplexEventRouter().getGeoLocationInfo(pGEvent);
                }
                return null;
            case -1254380201:
                if (!name.equals("IS_MOCK_LOCATION_ENABLED")) {
                    return null;
                }
                Log.e(TAG, "processSyncRequest :: LOC_IS_MOCK_LOCATION_ENABLED method called from sync function");
                PGEventBus pGEventBus = this.pgEventBus;
                EventInfo eventInfo = new EventInfo("lastloc", "location", (String) null, (String) null, 12, (DefaultConstructorMarker) null);
                EventInfo eventInfo2 = new EventInfo("na", "na", (String) null, (String) null, 12, (DefaultConstructorMarker) null);
                JSONObject jSONObject = new JSONObject();
                jSONObject.put("locationValidity", RunTimeVarsUtility.INSTANCE.getLongRunTimeVar("INTERVAL_BETWEEN_LOCATION_FETCH_IN_MILLISECONDS", 7200000L));
                String jSONObject2 = jSONObject.toString();
                Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString()");
                pGEventBus.postEvent(new PGEvent(eventInfo, jSONObject2, eventInfo2));
                return this.pgEventBus.postEventSync(pGEvent);
            case -908340865:
                if (name.equals("CANGOBACK")) {
                    return this.pgEventBus.postEventSync(pGEvent);
                }
                return null;
            case -728980305:
                if (name.equals("getNativeConfig")) {
                    return new NativeConfigComplexEventRouter().getNativeConfigValues(pGEvent);
                }
                return null;
            case -629510004:
                if (name.equals("showNewWithdrawMenu")) {
                    return NativeUtil.INSTANCE.showNewWithdrawMenu(pGEvent);
                }
                return null;
            case -446509246:
                if (name.equals("hasGPSTechError")) {
                    return new GeoLocationComplexEventRouter().getHasGpsTechError(this, pGEvent);
                }
                return null;
            case -397121393:
                if (name.equals("isLoggerAvailable")) {
                    return new RapComplexEventRouter().getIfLoggerIsAvailable(pGEvent);
                }
                return null;
            case -298708473:
                if (name.equals("SyncRunTimeData")) {
                    return new RuntimeDataComplexEvent().getRunTimeData(pGEvent);
                }
                return null;
            case -242180821:
                if (name.equals("IS_LAT_LONG_STATE_IN_PROGRESS")) {
                    return this.pgEventBus.postEventSync(pGEvent);
                }
                return null;
            case -170665543:
                if (!name.equals("urlData")) {
                    return null;
                }
                EventInfo eventInfo3 = new EventInfo("urlData", TYPE, (String) null, (String) null, 12, (DefaultConstructorMarker) null);
                JSONObject jSONObject3 = new JSONObject();
                JSONObject jSONObject4 = new JSONObject();
                RunTimeVarsUtility runTimeVarsUtility = RunTimeVarsUtility.INSTANCE;
                jSONObject4.put("metadataUrl", runTimeVarsUtility.getStringRunTimeVar("metadataUrl", ""));
                jSONObject4.put("metadataVersion", runTimeVarsUtility.getStringRunTimeVar("metadataVersion", ""));
                Unit unit = Unit.a;
                jSONObject3.put("result", jSONObject4.toString());
                String jSONObject5 = jSONObject3.toString();
                Intrinsics.checkNotNullExpressionValue(jSONObject5, "JSONObject().apply {\n   …             }.toString()");
                return new PGEvent(eventInfo3, jSONObject5, (EventInfo) null, 4, (DefaultConstructorMarker) null);
            case -50103191:
                if (name.equals("GetLoginDetailsFrmNative")) {
                    return new NativeConfigComplexEventRouter().getLoginDetails(pGEvent);
                }
                return null;
            case 23834777:
                if (!name.equals("isAssetBundleDownloadedAtNative")) {
                    return null;
                }
                Logger.d$default(Logger.INSTANCE, TAG, "requestNativeSync:: DFM_UNITY_ASSET_DOWNLOAD_STATUS", false, 4, (Object) null);
                EventInfo eventInfo4 = new EventInfo("isAssetBundleDownloadedAtNative", TYPE, (String) null, (String) null, 12, (DefaultConstructorMarker) null);
                JSONObject jSONObject6 = new JSONObject();
                jSONObject6.put("isSuccess", true);
                JSONObject jSONObject7 = new JSONObject();
                jSONObject7.put("downloadedStatus", true);
                Unit unit2 = Unit.a;
                jSONObject6.put("result", jSONObject7);
                String jSONObject8 = jSONObject6.toString();
                Intrinsics.checkNotNullExpressionValue(jSONObject8, "JSONObject().apply {\n   …             }.toString()");
                return new PGEvent(eventInfo4, jSONObject8, new EventInfo("na", "na", (String) null, (String) null, 12, (DefaultConstructorMarker) null));
            case 393621645:
                if (name.equals("getAddCashNewUrl")) {
                    return new NativeConfigComplexEventRouter().getAddCashURL(pGEvent);
                }
                return null;
            case 483103770:
                if (name.equals("getDeviceInfo")) {
                    return new DeviceInfoComplexEventRouter().getDeviceInfo(pGEvent);
                }
                return null;
            case 485735250:
                if (name.equals("IS_PREVIOUS_LOCATION_AVAILABLE")) {
                    return this.pgEventBus.postEventSync(pGEvent);
                }
                return null;
            case 599209215:
                if (name.equals("isConnected")) {
                    return new DeviceInfoComplexEventRouter().getIsDeviceConnected(pGEvent);
                }
                return null;
            case 751279169:
                if (name.equals("getCheckinData")) {
                    return new NativeConfigComplexEventRouter().getCheckLoginData(pGEvent);
                }
                return null;
            case 762512283:
                if (name.equals("GetSessionID")) {
                    return new NativeConfigComplexEventRouter().getSessionId(pGEvent);
                }
                return null;
            case 834595949:
                if (!name.equals("IS_VALID_LOCATION")) {
                    return null;
                }
                Log.e(TAG, "IS_VALID_LOCATION :: 1");
                return this.pgEventBus.postEventSync(pGEvent);
            case 1127437435:
                if (name.equals("GEO_LOCATION_IS_LOCATION_BLOCKED")) {
                    return new GeoLocationComplexEventRouter().getIsGeoLocationBlocked(pGEvent);
                }
                return null;
            case 1144541852:
                if (!name.equals("GetLobbySocketURL")) {
                    return null;
                }
                JSONObject jSONObject9 = new JSONObject();
                jSONObject9.put("isSuccess", true);
                JSONObject jSONObject10 = new JSONObject();
                jSONObject10.put("lobbySocketUrl", NativeUtil.INSTANCE.getLobbySocketUrl());
                Unit unit3 = Unit.a;
                jSONObject9.put("result", jSONObject10);
                String jSONObject11 = jSONObject9.toString();
                Intrinsics.checkNotNullExpressionValue(jSONObject11, "JSONObject().apply {\n   …             }.toString()");
                EventInfo callbackData = pGEvent.getCallbackData();
                if (callbackData == null) {
                    callbackData = new EventInfo("na", "na", (String) null, (String) null, 12, (DefaultConstructorMarker) null);
                }
                return new PGEvent(callbackData, jSONObject11, pGEvent.getEventData());
            case 1236392753:
                if (name.equals("getGameIdentifier")) {
                    return new NativeConfigComplexEventRouter().getGameIdentifier(pGEvent);
                }
                return null;
            case 1375668639:
                if (name.equals("hasGPSPermission")) {
                    return new GeoLocationComplexEventRouter().checkLocationPermissionAndSendResponse(pGEvent);
                }
                return null;
            case 1630030820:
                if (name.equals("getPIPApplicability")) {
                    return new NativeConfigComplexEventRouter().getPIPApplicability(pGEvent);
                }
                return null;
            case 1804757926:
                if (name.equals("getNAEData")) {
                    return NativeUtil.INSTANCE.getUnityNaeDataInJson(pGEvent);
                }
                return null;
            case 2056864585:
                if (name.equals("isDebug")) {
                    return new DeviceInfoComplexEventRouter().getIsDebugBuild(pGEvent);
                }
                return null;
            case 2085414913:
                if (name.equals("isgpsenabled")) {
                    return this.pgEventBus.postEventSync(pGEvent);
                }
                return null;
            default:
                return null;
        }
    }

    public void requestNative(@NotNull String str, @NotNull String str2, @NotNull String str3) {
        Intrinsics.checkNotNullParameter(str, "eventInfoString");
        Intrinsics.checkNotNullParameter(str2, "payload");
        Intrinsics.checkNotNullParameter(str3, "callbackInfoString");
        try {
            EventInfo eventInfo = (EventInfo) this.gson.k(str, new com.google.gson.reflect.a<EventInfo>() {
            }.getType());
            EventInfo eventInfo2 = (EventInfo) this.gson.k(str3, new com.google.gson.reflect.a<EventInfo>() {
            }.getType());
            Intrinsics.checkNotNullExpressionValue(eventInfo, "eventInfo");
            PGEvent pGEvent = new PGEvent(eventInfo, str2, eventInfo2);
            if (this.rnBusinessLayer.checkIfComplexCall(pGEvent.getEventData().getName())) {
                this.rnBusinessLayer.routeComplexAPICalls(pGEvent);
            } else {
                this.pgEventBus.postEvent(pGEvent);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public PGEvent requestNativeSync(@NotNull String str, @NotNull String str2, @NotNull String str3) {
        Intrinsics.checkNotNullParameter(str, "eventInfoString");
        Intrinsics.checkNotNullParameter(str2, "payload");
        Intrinsics.checkNotNullParameter(str3, "callbackInfoString");
        EventInfo eventInfo = (EventInfo) this.gson.k(str, new com.google.gson.reflect.a<EventInfo>() {
        }.getType());
        EventInfo eventInfo2 = (EventInfo) this.gson.k(str3, new com.google.gson.reflect.a<EventInfo>() {
        }.getType());
        Intrinsics.checkNotNullExpressionValue(eventInfo, "eventInfo");
        return processSyncRequest(new PGEvent(eventInfo, str2, eventInfo2));
    }

    public final void setNetworkConfig(@NotNull String str, @NotNull Object obj) {
        Intrinsics.checkNotNullParameter(str, "eventName");
        Intrinsics.checkNotNullParameter(obj, "payload");
        try {
            int hashCode = str.hashCode();
            if (hashCode == -1350268337) {
                if (str.equals("setcommonconfig")) {
                    Logger.d$default(Logger.INSTANCE, TAG, "SET_COMMON_CONFIG_EVENT", false, 4, (Object) null);
                    NetworkCommunicationManager networkCommunicationManager = this.networkCommunicationManager;
                    if (networkCommunicationManager != null) {
                        networkCommunicationManager.setCommonConfig((com.games24x7.pgnetwork.utils.CommonConfig) obj);
                        return;
                    } else {
                        Intrinsics.q("networkCommunicationManager");
                        throw null;
                    }
                }
                return;
            }
            if (hashCode != -1216747110) {
                if (hashCode == 607087624 && str.equals("setcookieconfig")) {
                    Logger.d$default(Logger.INSTANCE, TAG, "SET_COOKIE_CONFIG_EVENT", false, 4, (Object) null);
                    NetworkCommunicationManager networkCommunicationManager2 = this.networkCommunicationManager;
                    if (networkCommunicationManager2 != null) {
                        networkCommunicationManager2.setCookieConfig((CookieConfig) obj);
                        return;
                    } else {
                        Intrinsics.q("networkCommunicationManager");
                        throw null;
                    }
                }
                return;
            }
            if (str.equals("setcommonheader")) {
                Logger.d$default(Logger.INSTANCE, TAG, "SET_COMMON_HEADER", false, 4, (Object) null);
                HashMap hashMap = obj instanceof HashMap ? (HashMap) obj : null;
                if (hashMap != null) {
                    NetworkCommunicationManager networkCommunicationManager3 = this.networkCommunicationManager;
                    if (networkCommunicationManager3 == null) {
                        Intrinsics.q("networkCommunicationManager");
                        throw null;
                    }
                    networkCommunicationManager3.setCommonHeader(hashMap);
                    PGAnalyticsEventHandler.Companion.setCommonHeaderMap(hashMap);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void unregisterEventBus() {
        this.pgEventBus.unregister(this);
    }
}