[apps/exam_mode] Country-locked Dutch exam mode

The Dutch exam mode is now only accessible when the selected country is
Netherlands on an official firmware.

Change-Id: I6d70f79b6e728482d8c7d86ef6a2e5c53ee18a39
This commit is contained in:
Gabriel Ozouf
2020-06-22 10:23:10 +02:00
committed by Émilie Feral
parent 509a7e4628
commit b35cdca9bb

View File

@@ -6,8 +6,7 @@
constexpr Shared::SettingsMessageTree ExamModeConfiguration::s_modelExamChildren[2] = {Shared::SettingsMessageTree(I18n::Message::ActivateExamMode), Shared::SettingsMessageTree(I18n::Message::ActivateDutchExamMode)};
int ExamModeConfiguration::numberOfAvailableExamMode() {
if ((GlobalPreferences::sharedGlobalPreferences()->language() != I18n::Language::EN
&& GlobalPreferences::sharedGlobalPreferences()->language() != I18n::Language::NL)
if (GlobalPreferences::sharedGlobalPreferences()->country() != I18n::Country::NL
|| GlobalPreferences::sharedGlobalPreferences()->isInExamMode())
{
return 1;