fix NPE
This commit is contained in:
parent
4a5ef51d90
commit
9f0ff6d872
1 changed files with 6 additions and 3 deletions
|
@ -201,9 +201,11 @@ public class NSClientPlugin extends PluginBase {
|
||||||
SwitchPreference key_ns_autobackfill = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_autobackfill));
|
SwitchPreference key_ns_autobackfill = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_autobackfill));
|
||||||
if (key_ns_autobackfill != null) key_ns_autobackfill.setVisible(false);
|
if (key_ns_autobackfill != null) key_ns_autobackfill.setVisible(false);
|
||||||
SwitchPreference key_ns_create_announcements_from_errors = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_create_announcements_from_errors));
|
SwitchPreference key_ns_create_announcements_from_errors = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_create_announcements_from_errors));
|
||||||
if (key_ns_create_announcements_from_errors != null) key_ns_create_announcements_from_errors.setVisible(false);
|
if (key_ns_create_announcements_from_errors != null)
|
||||||
|
key_ns_create_announcements_from_errors.setVisible(false);
|
||||||
SwitchPreference key_ns_create_announcements_from_carbs_req = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_create_announcements_from_carbs_req));
|
SwitchPreference key_ns_create_announcements_from_carbs_req = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_create_announcements_from_carbs_req));
|
||||||
if (key_ns_create_announcements_from_carbs_req != null) key_ns_create_announcements_from_carbs_req.setVisible(false);
|
if (key_ns_create_announcements_from_carbs_req != null)
|
||||||
|
key_ns_create_announcements_from_carbs_req.setVisible(false);
|
||||||
SwitchPreference key_ns_upload_only = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_upload_only));
|
SwitchPreference key_ns_upload_only = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_upload_only));
|
||||||
if (key_ns_upload_only != null) {
|
if (key_ns_upload_only != null) {
|
||||||
key_ns_upload_only.setVisible(false);
|
key_ns_upload_only.setVisible(false);
|
||||||
|
@ -214,6 +216,7 @@ public class NSClientPlugin extends PluginBase {
|
||||||
} else {
|
} else {
|
||||||
// APS or pumpcontrol mode
|
// APS or pumpcontrol mode
|
||||||
SwitchPreference key_ns_upload_only = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_upload_only));
|
SwitchPreference key_ns_upload_only = preferenceFragment.findPreference(resourceHelper.gs(R.string.key_ns_upload_only));
|
||||||
|
if (key_ns_upload_only != null)
|
||||||
key_ns_upload_only.setVisible(buildHelper.isEngineeringMode());
|
key_ns_upload_only.setVisible(buildHelper.isEngineeringMode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue