@Test public void testInit() throws Exception { manager.init(10); assertNull(mockContext.mCallbacks); manager.init(14); assertNotNull(mockContext.mCallbacks); }
public void init(int apiVersion) { if (apiVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { setupLifecycleCallbacks(); } }
AppStateManager { public void init(int apiVersion) { if (apiVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { setupLifecycleCallbacks(); } } }
AppStateManager { public void init(int apiVersion) { if (apiVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { setupLifecycleCallbacks(); } } AppStateManager(Context context, boolean unitTesting);  AppStateManager(Context context); }
AppStateManager { public void init(int apiVersion) { if (apiVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { setupLifecycleCallbacks(); } } AppStateManager(Context context, boolean unitTesting);  AppStateManager(Context context); void init(int apiVersion); String getLaunchAction(); Uri getLaunchUri(); void setConfigManager(ConfigManager manager); void setMessageManager(MessageManager manager); void onActivityResumed(Activity activity); void onActivityPaused(Activity activity); void ensureActiveSession(); void logStateTransition(String transitionType, String currentActivity); void onActivityCreated(Activity activity, Bundle savedInstanceState); void onActivityStarted(Activity activity); void onActivityStopped(Activity activity); boolean isBackgrounded(); String getCurrentActivityName(); InternalSession getSession(); void endSession(); void startSession(); void onActivitySaveInstanceState(Activity activity, Bundle outState); void onActivityDestroyed(Activity activity); WeakReference<Activity> getCurrentActivity(); }
AppStateManager { public void init(int apiVersion) { if (apiVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { setupLifecycleCallbacks(); } } AppStateManager(Context context, boolean unitTesting);  AppStateManager(Context context); void init(int apiVersion); String getLaunchAction(); Uri getLaunchUri(); void setConfigManager(ConfigManager manager); void setMessageManager(MessageManager manager); void onActivityResumed(Activity activity); void onActivityPaused(Activity activity); void ensureActiveSession(); void logStateTransition(String transitionType, String currentActivity); void onActivityCreated(Activity activity, Bundle savedInstanceState); void onActivityStarted(Activity activity); void onActivityStopped(Activity activity); boolean isBackgrounded(); String getCurrentActivityName(); InternalSession getSession(); void endSession(); void startSession(); void onActivitySaveInstanceState(Activity activity, Bundle outState); void onActivityDestroyed(Activity activity); WeakReference<Activity> getCurrentActivity(); static boolean mInitialized; static final String APP_STATE_FOREGROUND; static final String APP_STATE_BACKGROUND; static final String APP_STATE_NOTRUNNING; }