Source:
synchronized private static void init(Context context) { if (requiresUserPrivacyConsent() || !remoteParamController.isRemoteParamsCallDone()) { if (!remoteParamController.isRemoteParamsCallDone()) OneSignal.Log(LOG_LEVEL.VERBOSE, "OneSignal SDK initialization delayed, " + "waiting for remote params."); else OneSignal.Log(LOG_LEVEL.VERBOSE, "OneSignal SDK initialization delayed, " + "waiting for privacy consent to be set."); delayedInitParams = new DelayedConsentInitializationParameters(context, appId); String lastAppId = appId; appId = null; if (lastAppId != null && context != null) makeAndroidParamsRequest(lastAppId, getUserId()); return; } subscribableStatus = subscribableStatus != Integer.MAX_VALUE ? subscribableStatus : osUtils.initializationChecker(appContext, appId); if (isSubscriptionStatusUninitializable()) return; if (initDone) { if (notificationOpenedHandler != null) fireCallbackForOpenedNotifications(); OneSignal.Log(LOG_LEVEL.DEBUG, "OneSignal SDK initialization already completed."); return; } handleActivityLifecycleHandler(context); OneSignalStateSynchronizer.initUserState(); handleAppIdChange(); handleAmazonPurchase(); OSPermissionChangedInternalObserver.handleInternalChanges(getCurrentPermissionState(appContext)); doSessionInit(); if (notificationOpenedHandler != null) fireCallbackForOpenedNotifications(); if (TrackGooglePurchase.CanTrack(appContext)) trackGooglePurchase = new TrackGooglePurchase(appContext); if (TrackFirebaseAnalytics.CanTrack()) trackFirebaseAnalytics = new TrackFirebaseAnalytics(appContext); initDone = true; OneSignal.Log(LOG_LEVEL.VERBOSE, "OneSignal SDK initialization done."); outcomeEventsController.sendSavedOutcomes(); taskController.startPendingTasks(); }

Target:
synchronized private static void init(Context context) { if (requiresUserPrivacyConsent() || !remoteParamController.isRemoteParamsCallDone()) { if (!remoteParamController.isRemoteParamsCallDone()) logger.verbose("OneSignal SDK initialization delayed, " + "waiting for remote params."); else logger.verbose("OneSignal SDK initialization delayed, " + "waiting for privacy consent to be set."); delayedInitParams = new DelayedConsentInitializationParameters(context, appId); String lastAppId = appId; appId = null; if (lastAppId != null && context != null) makeAndroidParamsRequest(lastAppId, getUserId()); return; } subscribableStatus = subscribableStatus != Integer.MAX_VALUE ? subscribableStatus : osUtils.initializationChecker(appContext, appId); if (isSubscriptionStatusUninitializable()) return; if (initDone) { if (notificationOpenedHandler != null) fireCallbackForOpenedNotifications(); logger.debug("OneSignal SDK initialization already completed."); return; } handleActivityLifecycleHandler(context); OneSignalStateSynchronizer.initUserState(); handleAppIdChange(); handleAmazonPurchase(); OSPermissionChangedInternalObserver.handleInternalChanges(getCurrentPermissionState(appContext)); doSessionInit(); if (notificationOpenedHandler != null) fireCallbackForOpenedNotifications(); if (TrackGooglePurchase.CanTrack(appContext)) trackGooglePurchase = new TrackGooglePurchase(appContext); if (TrackFirebaseAnalytics.CanTrack()) trackFirebaseAnalytics = new TrackFirebaseAnalytics(appContext); initDone = true; OneSignal.Log(LOG_LEVEL.VERBOSE, "OneSignal SDK initialization done."); outcomeEventsController.sendSavedOutcomes(); taskController.startPendingTasks(); }