public static Activity getForegroundActivity(Context context) {
        List<Activity> list = getActivities(context, true);
        return list.isEmpty() ? null : list.get(0);
    }
Attempt to restart the app. Ideally this should also try to preserve as much state as
possible:
<ul>
    <li>The current activity</li>
    <li>If possible, state in the current activity, and</li>
    <li>The activity stack</li>
</ul>

This may require some framework support. Apparently it may already be possible
(Dianne says to put the app in the background, kill it then restart it; need to
figure out how to do this.)
freeline-runtime/src/main/java/com/antfortune/freeline/util/Restarter.java