try catch on load settings
This commit is contained in:
parent
ae9b03f1ae
commit
2c10ade944
1 changed files with 10 additions and 6 deletions
|
@ -150,12 +150,16 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
|
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
|
||||||
for (int type = 1; type < PluginBase.LAST; type++) {
|
for (int type = 1; type < PluginBase.LAST; type++) {
|
||||||
for (PluginBase p : pluginList) {
|
for (PluginBase p : pluginList) {
|
||||||
|
try {
|
||||||
String settingEnabled = "ConfigBuilder_" + type + "_" + p.getClass().getSimpleName() + "_Enabled";
|
String settingEnabled = "ConfigBuilder_" + type + "_" + p.getClass().getSimpleName() + "_Enabled";
|
||||||
String settingVisible = "ConfigBuilder_" + type + "_" + p.getClass().getSimpleName() + "_Visible";
|
String settingVisible = "ConfigBuilder_" + type + "_" + p.getClass().getSimpleName() + "_Visible";
|
||||||
if (SP.contains(settingEnabled))
|
if (SP.contains(settingEnabled))
|
||||||
p.setFragmentEnabled(type, SP.getBoolean(settingEnabled, true));
|
p.setFragmentEnabled(type, SP.getBoolean(settingEnabled, true));
|
||||||
if (SP.contains(settingVisible))
|
if (SP.contains(settingVisible))
|
||||||
p.setFragmentVisible(type, SP.getBoolean(settingVisible, true));
|
p.setFragmentVisible(type, SP.getBoolean(settingVisible, true));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
verifySelectionInCategories();
|
verifySelectionInCategories();
|
||||||
|
|
Loading…
Reference in a new issue