Changed listener name

This commit is contained in:
PaulStets 2018-08-09 12:19:25 +03:00
parent ae7d5a7972
commit cedb9d8982

View file

@ -33,7 +33,7 @@ import java.util.Set;
public class SettingsDevelopmentActivity extends SettingsBaseActivity {
private StateChangedListener<Boolean> jsRoutingListener;
private StateChangedListener<Boolean> useJSVoiceGuidanceListener;
@SuppressLint("SimpleDateFormat")
@Override
@ -64,7 +64,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
cat.addPreference(createCheckBoxPreference(settings.ANIMATE_MY_LOCATION,
R.string.animate_my_location,
R.string.animate_my_location_desc));
jsRoutingListener = new StateChangedListener<Boolean>() {
useJSVoiceGuidanceListener = new StateChangedListener<Boolean>() {
@Override
public void stateChanged(Boolean change) {
getMyApplication().getDownloadThread().runReloadIndexFilesSilent();
@ -72,7 +72,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
};
cat.addPreference(createCheckBoxPreference(settings.USE_JS_VOICE_GUIDANCE, "Use JS voice guidance",
"Use new voice guidance logic based on JavaScript"));
settings.USE_JS_VOICE_GUIDANCE.addListener(jsRoutingListener);
settings.USE_JS_VOICE_GUIDANCE.addListener(useJSVoiceGuidanceListener);
final Preference firstRunPreference = new Preference(this);
firstRunPreference.setTitle(R.string.simulate_initial_startup);
@ -263,6 +263,6 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
@Override
public void onDestroy() {
super.onDestroy();
settings.USE_JS_VOICE_GUIDANCE.removeListener(jsRoutingListener);
settings.USE_JS_VOICE_GUIDANCE.removeListener(useJSVoiceGuidanceListener);
}
}