Fix voice issues

This commit is contained in:
Victor Shcherb 2013-08-03 20:57:43 +02:00
parent 85bda85884
commit ac76952aa8
2 changed files with 5 additions and 8 deletions

View file

@ -55,7 +55,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
createUI();
}
private void createUI() {
addPreferencesFromResource(R.xml.navigation_settings);
PreferenceScreen screen = getPreferenceScreen();
@ -96,14 +96,12 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
speakAlarms = (Preference) screen.findPreference("speak_routing_alarms");
speakAlarms.setOnPreferenceClickListener(this);
reloadVoiceListPreference(screen);
profileDialog();
}
private void reloadVoiceListPreference(PreferenceScreen screen) {
String[] entries;
String[] entrieValues;
@ -131,7 +129,6 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
routerServicePreference.setSummary(getString(R.string.router_service_descr) + " [" + settings.ROUTER_SERVICE.get() + "]");
}
@SuppressWarnings("unchecked")
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String id = preference.getKey();
@ -145,7 +142,7 @@ public class SettingsNavigationActivity extends SettingsBaseActivity {
super.onPreferenceChange(preference, newValue);
getMyApplication().showDialogInitializingCommandPlayer(this, false);
}
return false;
return true;
}
boolean changed = super.onPreferenceChange(preference, newValue);

View file

@ -129,7 +129,7 @@ public class TestVoiceActivity extends SherlockActivity {
}
private void addButtons(final LinearLayout ll, CommandPlayer p) {
addButton(ll, "New route has been calculated (15350m & 2h30m5sec)", builder(p).newRouteCalculated(15350, 9005));
addButton(ll, "New route has been calculated (11350m & 2h30m5sec)", builder(p).newRouteCalculated(11350, 9005));
addButton(ll, "Route recalculated (23150m & 350sec)", builder(p).routeRecalculated(23150, 350));
addButton(ll, "Prepare to turn slighlty left after 850m then bear right", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_LEFT_SL, 850, "").then().bearRight(""));