Moved the test code to a test preference and added a settings activity.