nav settings mode selection fix

This commit is contained in:
madwasp79 2019-07-04 16:18:58 +03:00
parent 935d74df61
commit af0c22d4f0

View file

@ -85,6 +85,16 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
createUI(); createUI();
} }
@Override
protected void onResume() {
super.onResume();
if(getIntent() != null && getIntent().hasExtra(INTENT_SKIP_DIALOG)) {
setSelectedAppMode(settings.getApplicationMode());
} else if (selectedAppMode == null) {
selectAppModeDialog().show();
}
}
private void createUI() { private void createUI() {
addPreferencesFromResource(R.xml.navigation_settings); addPreferencesFromResource(R.xml.navigation_settings);
PreferenceScreen screen = getPreferenceScreen(); PreferenceScreen screen = getPreferenceScreen();
@ -181,11 +191,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
// registerListPreference(settings.DELAY_TO_START_NAVIGATION, screen, delayIntervalNames, delayIntervals); // registerListPreference(settings.DELAY_TO_START_NAVIGATION, screen, delayIntervalNames, delayIntervals);
if(getIntent() != null && getIntent().hasExtra(INTENT_SKIP_DIALOG)) {
setSelectedAppMode(settings.getApplicationMode());
} else {
selectAppModeDialog().show();
}
addVoicePrefs((PreferenceGroup) screen.findPreference("voice")); addVoicePrefs((PreferenceGroup) screen.findPreference("voice"));
} }