public static void restartActivityOnUiThread(final Activity activity) {
        activity.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                if (Log.isLoggable(LOG_TAG, Log.VERBOSE)) {
                    Log.v(LOG_TAG, "Resources updated: notify activities");
                }
                updateActivity(activity);
            }
        });
    }
Restart an activity. Should preserve as much state as possible.
freeline-runtime/src/main/java/com/antfortune/freeline/util/Restarter.java