There is a static method in the class CheatActivity, but I can’t understand the need for it.
CheatActivity calls QuizActivity.onActivityResult with an Intent as a parameter, and then onActivityResult calls wasAnswerShown and passes back the Intent. wasAnswerShown then returns the booleanExtra from the Intent.
Why doesn’t onActivityResult simply check the booleanExtra in the Intent itself?
In other words, why not replace:
mIsCheater = CheatActivity.wasAnswerShown(data);
in QuizActivity.onActivityResult with:
mIsCheater = data.getBooleanExtra(EXTRA_ANSWER_SHOWN, false);
The program works the same and is simpler without the static method wasAnswerShown.