Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
82e382d7c6
4 changed files with 7 additions and 7 deletions
|
@ -363,14 +363,14 @@ public class OsmandApplication extends MultiDexApplication {
|
|||
}
|
||||
|
||||
public void initVoiceCommandPlayer(final Activity uiContext) {
|
||||
showDialogInitializingCommandPlayer(uiContext, true, null, false, false);
|
||||
initVoiceCommandPlayer(uiContext, true, null, false, false);
|
||||
}
|
||||
|
||||
public void showDialogInitializingCommandPlayer(final Activity uiContext, boolean warningNoneProvider) {
|
||||
showDialogInitializingCommandPlayer(uiContext, warningNoneProvider, null, true, false);
|
||||
public void initVoiceCommandPlayer(final Activity uiContext, boolean warningNoneProvider) {
|
||||
initVoiceCommandPlayer(uiContext, warningNoneProvider, null, true, false);
|
||||
}
|
||||
|
||||
public void showDialogInitializingCommandPlayer(final Activity uiContext, boolean warningNoneProvider, Runnable run, boolean showDialog, boolean force) {
|
||||
public void initVoiceCommandPlayer(final Activity uiContext, boolean warningNoneProvider, Runnable run, boolean showDialog, boolean force) {
|
||||
String voiceProvider = osmandSettings.VOICE_PROVIDER.get();
|
||||
if (voiceProvider == null || OsmandSettings.VOICE_PROVIDER_NOT_USE.equals(voiceProvider)) {
|
||||
if (warningNoneProvider && voiceProvider == null) {
|
||||
|
|
|
@ -456,7 +456,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity implements OnR
|
|||
startActivity(intent);
|
||||
} else {
|
||||
super.onPreferenceChange(preference, newValue);
|
||||
getMyApplication().showDialogInitializingCommandPlayer(this, false);
|
||||
getMyApplication().initVoiceCommandPlayer(this, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity {
|
|||
final OsmandApplication app = (OsmandApplication) getApplication();
|
||||
getSupportActionBar().setTitle(app.getString(R.string.test_voice_prompts) + " (" + entrieValues[which] + ")");
|
||||
app.getSettings().VOICE_PROVIDER.set(entrieValues[which]);
|
||||
app.showDialogInitializingCommandPlayer(TestVoiceActivity.this, true, new Runnable() {
|
||||
app.initVoiceCommandPlayer(TestVoiceActivity.this, true, new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
|
@ -269,7 +269,7 @@ public class RoutePreferencesMenu {
|
|||
|
||||
public static void applyVoiceProvider(MapActivity mapActivity, String provider) {
|
||||
mapActivity.getMyApplication().getSettings().VOICE_PROVIDER.set(provider);
|
||||
mapActivity.getMyApplication().showDialogInitializingCommandPlayer(mapActivity, false);
|
||||
mapActivity.getMyApplication().initVoiceCommandPlayer(mapActivity, false);
|
||||
}
|
||||
|
||||
private static Set<String> getVoiceFiles(MapActivity mapActivity) {
|
||||
|
|
Loading…
Reference in a new issue