Fixed crash on import

This commit is contained in:
M66B 2015-12-15 08:34:12 +01:00
parent 309323e6e2
commit 38d084305c
1 changed files with 13 additions and 9 deletions

View File

@ -292,19 +292,23 @@ public class ActivitySettings extends AppCompatActivity implements SharedPrefere
} else } else
SinkholeService.reload("other", "setting changed", this); SinkholeService.reload("other", "setting changed", this);
} else if ("show_stats".equals(name)) } else if ("show_stats".equals(name)) {
if (!Util.isPlayStoreInstall(this))
SinkholeService.reloadStats("setting changed", this); SinkholeService.reloadStats("setting changed", this);
else if ("stats_base".equals(name)) } else if ("stats_base".equals(name)) {
if (!Util.isPlayStoreInstall(this))
getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_stats_base, prefs.getString(name, "5"))); getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_stats_base, prefs.getString(name, "5")));
else if ("stats_frequency".equals(name)) } else if ("stats_frequency".equals(name)) {
if (!Util.isPlayStoreInstall(this))
getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_stats_frequency, prefs.getString(name, "1000"))); getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_stats_frequency, prefs.getString(name, "1000")));
else if ("stats_samples".equals(name)) } else if ("stats_samples".equals(name)) {
if (!Util.isPlayStoreInstall(this))
getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_stats_samples, prefs.getString(name, "90"))); getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_stats_samples, prefs.getString(name, "90")));
else if ("auto_enable".equals(name)) } else if ("auto_enable".equals(name))
getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_auto, prefs.getString(name, "0"))); getPreferenceScreen().findPreference(name).setTitle(getString(R.string.setting_auto, prefs.getString(name, "0")));
else if ("wifi_homes".equals(name)) { else if ("wifi_homes".equals(name)) {