private static void restartActivity(Activity activity) {
        if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
            Log.v(LOG_TAG, "About to restart " + activity.getClass().getSimpleName());
        }
        // You can't restart activities that have parents: find the top-most activity
        while (activity.getParent() != null) {
            if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
                Log.v(LOG_TAG, activity.getClass().getSimpleName()
                        + " is not a top level activity; restarting "
                        + activity.getParent().getClass().getSimpleName() + " instead");
            }
            activity = activity.getParent();
        }
        // Directly supported by the framework!
        activity.recreate();
    }
Restart an activity. Should preserve as much state as possible.
freeline-runtime/src/main/java/com/antfortune/freeline/util/Restarter.java