Source:
private Tracker(TrackerBuilder builder) { this.context = builder.context; this.emitter = builder.emitter; this.appId = builder.appId; this.base64Encoded = builder.base64Encoded; this.namespace = builder.namespace; this.subject = builder.subject; this.devicePlatform = builder.devicePlatform; this.level = builder.logLevel; this.sessionContext = builder.sessionContext; this.sessionCheckInterval = builder.sessionCheckInterval; this.sessionCallbacks = builder.sessionCallbacks; this.threadCount = builder.threadCount < 2 ? 2 : builder.threadCount; this.timeUnit = builder.timeUnit; this.geoLocationContext = builder.geoLocationContext; this.mobileContext = builder.mobileContext; this.applicationCrash = builder.applicationCrash; this.lifecycleEvents = builder.lifecycleEvents; if (this.sessionContext) { if (sessionCallbacks.length == 4) { this.trackerSession = new Session( builder.foregroundTimeout, builder.backgroundTimeout, builder.timeUnit, builder.context, builder.sessionCallbacks[0], builder.sessionCallbacks[1], builder.sessionCallbacks[2], builder.sessionCallbacks[3] ); } else { this.trackerSession = new Session( builder.foregroundTimeout, builder.backgroundTimeout, builder.timeUnit, builder.context ); } } if ((this.lifecycleEvents || this.sessionContext) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { Runnable createLifecycleObserver = new Runnable() { @Override public void run() { ProcessLifecycleOwner.get().getLifecycle().addObserver(new LifecycleHandler()); } }; new Thread(createLifecycleObserver).start(); } Executor.setThreadCount(this.threadCount); Logger.updateLogLevel(builder.logLevel); Logger.v(TAG, "Tracker created successfully."); }

Target:
private Tracker(TrackerBuilder builder) { this.context = builder.context; this.emitter = builder.emitter; this.appId = builder.appId; this.base64Encoded = builder.base64Encoded; this.namespace = builder.namespace; this.subject = builder.subject; this.devicePlatform = builder.devicePlatform; this.level = builder.logLevel; this.sessionContext = builder.sessionContext; this.sessionCheckInterval = builder.sessionCheckInterval; this.sessionCallbacks = builder.sessionCallbacks; this.threadCount = builder.threadCount < 2 ? 2 : builder.threadCount; this.timeUnit = builder.timeUnit; this.geoLocationContext = builder.geoLocationContext; this.mobileContext = builder.mobileContext; this.applicationCrash = builder.applicationCrash; this.lifecycleEvents = builder.lifecycleEvents; if (this.sessionContext) { if (sessionCallbacks.length == 4) { this.trackerSession = new Session( builder.foregroundTimeout, builder.backgroundTimeout, builder.timeUnit, builder.context, builder.sessionCallbacks[0], builder.sessionCallbacks[1], builder.sessionCallbacks[2], builder.sessionCallbacks[3] ); } else { this.trackerSession = new Session( builder.foregroundTimeout, builder.backgroundTimeout, builder.timeUnit, builder.context ); } } if ((this.lifecycleEvents || this.sessionContext) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { Executor.execute(new Runnable() { @Override public void run() { ProcessLifecycleOwner.get().getLifecycle().addObserver(new LifecycleHandler()); } }); } Logger.updateLogLevel(builder.logLevel); Logger.v(TAG, "Tracker created successfully."); }