Source:
<code>public static void init(Context context, String googleProjectNumber, String oneSignalAppId, NotificationOpenedHandler notificationOpenedHandler, NotificationReceivedHandler notificationReceivedHandler) { mInitBuilder = createInitBuilder(notificationOpenedHandler, notificationReceivedHandler); OneSignal.setAppContext(context); setupPrivacyConsent(context); if (requiresUserPrivacyConsent()) { OneSignal.Log(LOG_LEVEL.VERBOSE, "OneSignal SDK initialization delayed, user privacy consent is set to required for this application."); delayedInitParams = new DelayedConsentInitializationParameters(context, googleProjectNumber, oneSignalAppId, notificationOpenedHandler, notificationReceivedHandler); return; } mInitBuilder = createInitBuilder(notificationOpenedHandler, notificationReceivedHandler); outcomeEventsController = new OutcomeEventsController(sessionManager, OneSignalDbHelper.getInstance(appContext), outcomeSettings); if (!isGoogleProjectNumberRemote()) mGoogleProjectNumber = googleProjectNumber; <START> markOnFocusCalled(); <END> deviceType = osUtils.getDeviceType(); subscribableStatus = osUtils.initializationChecker(context, deviceType, oneSignalAppId); if (isSubscriptionStatusUninitializable()) return; if (appId != null && !appId.equals(oneSignalAppId)) initDone = false; if (initDone) { if (mInitBuilder.mNotificationOpenedHandler != null) fireCallbackForOpenedNotifications(); return; } appId = oneSignalAppId; saveFilterOtherGCMReceivers(mInitBuilder.mFilterOtherGCMReceivers); handleActivityLifecycleHandler(context); lastTrackedFocusTime = SystemClock.elapsedRealtime(); OneSignalStateSynchronizer.initUserState(); handleAmazonPurchase(); handleAppIdChange(); OSPermissionChangedInternalObserver.handleInternalChanges(getCurrentPermissionState(appContext)); handleSessionTimeRegistrationOnInit(); if (mInitBuilder.mNotificationOpenedHandler != null) fireCallbackForOpenedNotifications(); if (TrackGooglePurchase.CanTrack(appContext)) trackGooglePurchase = new TrackGooglePurchase(appContext); if (TrackFirebaseAnalytics.CanTrack()) trackFirebaseAnalytics = new TrackFirebaseAnalytics(appContext); PushRegistratorFCM.disableFirebaseInstanceIdService(appContext); initDone = true; sessionManager.onSessionStarted(); outcomeEventsController.sendSavedOutcomes(); startPendingTasks(); }</code><technical_language>App infocus here</technical_language>

Target:
public static void init(Context context, String googleProjectNumber, String oneSignalAppId, NotificationOpenedHandler notificationOpenedHandler, NotificationReceivedHandler notificationReceivedHandler) { mInitBuilder = createInitBuilder(notificationOpenedHandler, notificationReceivedHandler); OneSignal.setAppContext(context); setupPrivacyConsent(context); if (requiresUserPrivacyConsent()) { OneSignal.Log(LOG_LEVEL.VERBOSE, "OneSignal SDK initialization delayed, user privacy consent is set to required for this application."); delayedInitParams = new DelayedConsentInitializationParameters(context, googleProjectNumber, oneSignalAppId, notificationOpenedHandler, notificationReceivedHandler); return; } mInitBuilder = createInitBuilder(notificationOpenedHandler, notificationReceivedHandler); if (!isGoogleProjectNumberRemote()) mGoogleProjectNumber = googleProjectNumber; deviceType = osUtils.getDeviceType(); subscribableStatus = osUtils.initializationChecker(context, deviceType, oneSignalAppId); if (isSubscriptionStatusUninitializable()) return; if (appId != null && !appId.equals(oneSignalAppId)) initDone = false; if (initDone) { if (mInitBuilder.mNotificationOpenedHandler != null) fireCallbackForOpenedNotifications(); return; } appId = oneSignalAppId; saveFilterOtherGCMReceivers(mInitBuilder.mFilterOtherGCMReceivers); handleActivityLifecycleHandler(context); OneSignalStateSynchronizer.initUserState(); handleAmazonPurchase(); handleAppIdChange(); OSPermissionChangedInternalObserver.handleInternalChanges(getCurrentPermissionState(appContext)); doSessionInit(); if (mInitBuilder.mNotificationOpenedHandler != null) fireCallbackForOpenedNotifications(); if (TrackGooglePurchase.CanTrack(appContext)) trackGooglePurchase = new TrackGooglePurchase(appContext); if (TrackFirebaseAnalytics.CanTrack()) trackFirebaseAnalytics = new TrackFirebaseAnalytics(appContext); PushRegistratorFCM.disableFirebaseInstanceIdService(appContext); initDone = true; outcomeEventsController.sendSavedOutcomes(); startPendingTasks(); }