/** * Closes the app. If an event listener is provided, the close app event is invoked. Must only be * used from your error activity. * * @param activity The current error activity. Must not be null. * @param eventListener The event listener as obtained by calling getEventListenerFromIntent. */ public static void closeApplication(Activity activity, EventListener eventListener) { if (eventListener != null) { eventListener.onCloseAppFromErrorActivity(); } activity.finish(); killCurrentProcess(); }