Don't show statuslight preferences in NSCLIENT build
This commit is contained in:
parent
f46a81a7be
commit
d88b4da5a9
3 changed files with 14 additions and 1 deletions
|
@ -9,6 +9,7 @@ import android.preference.PreferenceActivity;
|
|||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceGroup;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
|
@ -187,6 +188,17 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
|||
addPreferencesFromResourceIfEnabled(StatuslinePlugin.getPlugin(), PluginType.GENERAL);
|
||||
}
|
||||
|
||||
if (Config.NSCLIENT || Config.G5UPLOADER) {
|
||||
PreferenceScreen scrnAdvancedSettings = (PreferenceScreen)findPreference(getString(R.string.key_advancedsettings));
|
||||
if (scrnAdvancedSettings != null) {
|
||||
scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_statuslights_res_warning)));
|
||||
scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_statuslights_res_critical)));
|
||||
scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_statuslights_bat_warning)));
|
||||
scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_statuslights_bat_critical)));
|
||||
scrnAdvancedSettings.removePreference(getPreference(getString(R.string.key_show_statuslights)));
|
||||
}
|
||||
}
|
||||
|
||||
initSummary(getPreferenceScreen());
|
||||
}
|
||||
|
||||
|
|
|
@ -475,6 +475,7 @@
|
|||
<string name="always_use_shortavg">Always use short average delta instead of simple delta</string>
|
||||
<string name="always_use_shortavg_summary">Useful when data from unfiltered sources like xDrip gets noisy.</string>
|
||||
<string name="advancedsettings_title">Advanced Settings</string>
|
||||
<string name="key_advancedsettings" translatable="false">key_advancedsettings</string>
|
||||
<string name="danar_model" formatted="false">Model: %02X Protocol: %02X Code: %02X</string>
|
||||
<string name="profile">Profile</string>
|
||||
<string name="openapsama_max_daily_safety_multiplier_summary">Default value: 3 This is a key OpenAPS safety cap. What this does is limit your basals to be 3x (in this people) your biggest basal rate. You likely will not need to change this, but you should be aware that’s what is discussed about “3x max daily; 4x current” for safety caps.</string>
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
<intent android:action="info.nightscout.androidaps.plugins.Overview.activities.QuickWizardListActivity" />
|
||||
</Preference>
|
||||
|
||||
<PreferenceScreen android:title="@string/advancedsettings_title">
|
||||
<PreferenceScreen android:title="@string/advancedsettings_title" android:key="@string/key_advancedsettings">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
|
Loading…
Reference in a new issue