From af0c22d4f06b2f54db619e4d2d08f42d17f2c545 Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Thu, 4 Jul 2019 16:18:58 +0300 Subject: [PATCH] nav settings mode selection fix --- .../activities/SettingsNavigationActivity.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index b3dfe15ef2..e0e7d7860e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -85,6 +85,16 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { 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() { addPreferencesFromResource(R.xml.navigation_settings); PreferenceScreen screen = getPreferenceScreen(); @@ -181,11 +191,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { // 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")); }