Fix crash

This commit is contained in:
Victor Shcherb 2015-06-12 00:27:26 +02:00
parent fe7cad0eb8
commit a47829e3fc
2 changed files with 4 additions and 3 deletions

View file

@ -242,7 +242,6 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
}
}
@SuppressWarnings("unused")
private void registerDisablePreference(OsmandPreference p, String value, OsmandPreference<Boolean> disable) {
LinkedHashMap<String, Object> vals = (LinkedHashMap<String, Object>) listPrefValues.get(p.getId());
vals.put(value, disable);
@ -304,7 +303,9 @@ public abstract class SettingsBaseActivity extends ActionBarPreferenceActivity
k++;
}
ListPreference lp = createListPreference(b, intDescriptions, ints, title, summary);
if(disable != null) {
registerDisablePreference(b, getString(R.string.confirm_every_run), disable);
}
return lp;
}