@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mLogHistory = new LogHistory();

        mHistoryTextView = ((TextView) findViewById(R.id.history));
        mSimpleDateFormatter = new SimpleDateFormat("HH:mm:ss:SSS", Locale.getDefault());

        if (savedInstanceState != null) {
            // We've got a past state, apply it to the UI.
            mLogHistory = savedInstanceState.getParcelable(KEY_HISTORY_DATA);
            for (Pair<String, Long> entry : mLogHistory.getData()) {
                appendEntryToView(entry.first, entry.second);
            }
        }
    }
Called when the user wants to append an entry to the history.
unit/BasicUnitAndroidTest/app/src/main/java/com/example/android/testing/unittesting/basicunitandroidtest/MainActivity.java