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);
registerDisablePreference(b, getString(R.string.confirm_every_run), disable);
if(disable != null) {
registerDisablePreference(b, getString(R.string.confirm_every_run), disable);
}
return lp;
}

View file

@ -245,7 +245,7 @@ public class OsMoGroupsStorage {
}
public List<OsMoDevice> getVisibleGroupUsers(String mygid) {
if(!isActive() && !isMainGroup()) {
if(!isActive() && !isMainGroup()) {
return Collections.emptyList();
}
return getGroupUsers(mygid);