Pump control: Fix crash when opening Insight paring activity
This commit is contained in:
parent
0bab2e6c11
commit
552298496f
3 changed files with 67 additions and 1 deletions
|
@ -168,7 +168,8 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
||||||
.mainType(PluginType.PUMP)
|
.mainType(PluginType.PUMP)
|
||||||
.description(R.string.description_pump_insight_local)
|
.description(R.string.description_pump_insight_local)
|
||||||
.fragmentClass(LocalInsightFragment.class.getName())
|
.fragmentClass(LocalInsightFragment.class.getName())
|
||||||
.preferencesId(R.xml.pref_insight_local));
|
.preferencesId(MainApp.instance().getPackageName().equals("info.nightscout.androidaps")
|
||||||
|
? R.xml.pref_insight_local_full : R.xml.pref_insight_local_pumpcontrol));
|
||||||
|
|
||||||
pumpDescription = new PumpDescription();
|
pumpDescription = new PumpDescription();
|
||||||
pumpDescription.setPumpDescription(PumpType.AccuChekInsightBluetooth);
|
pumpDescription.setPumpDescription(PumpType.AccuChekInsightBluetooth);
|
||||||
|
|
65
app/src/main/res/xml/pref_insight_local_pumpcontrol.xml
Normal file
65
app/src/main/res/xml/pref_insight_local_pumpcontrol.xml
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<PreferenceCategory android:title="@string/insight_local">
|
||||||
|
|
||||||
|
<Preference android:title="@string/insight_pairing">
|
||||||
|
<intent
|
||||||
|
android:targetClass="info.nightscout.androidaps.plugins.pump.insight.activities.InsightPairingInformationActivity"
|
||||||
|
android:targetPackage="info.nightscout.aapspumpcontrol" />
|
||||||
|
</Preference>
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="insight_log_reservoir_changes"
|
||||||
|
android:title="@string/log_reservoir_changes" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="insight_log_tube_changes"
|
||||||
|
android:title="@string/log_tube_changes" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="insight_log_site_changes"
|
||||||
|
android:title="@string/log_site_changes" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="insight_log_battery_changes"
|
||||||
|
android:title="@string/log_battery_changes" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="insight_log_operating_mode_changes"
|
||||||
|
android:title="@string/log_operating_mode_changes" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="insight_log_alerts"
|
||||||
|
android:title="@string/log_alerts" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="insight_enable_tbr_emulation"
|
||||||
|
android:summary="@string/enable_tbr_emulation_summary"
|
||||||
|
android:title="@string/enable_tbr_emulation" />
|
||||||
|
|
||||||
|
<EditTextPreference
|
||||||
|
android:defaultValue="5"
|
||||||
|
android:inputType="number"
|
||||||
|
android:key="insight_min_recovery_duration"
|
||||||
|
android:title="@string/min_recovery_duration" />
|
||||||
|
|
||||||
|
<EditTextPreference
|
||||||
|
android:defaultValue="20"
|
||||||
|
android:inputType="number"
|
||||||
|
android:key="insight_max_recovery_duration"
|
||||||
|
android:title="@string/max_recovery_duration" />
|
||||||
|
|
||||||
|
<EditTextPreference
|
||||||
|
android:defaultValue="5"
|
||||||
|
android:inputType="number"
|
||||||
|
android:key="insight_disconnect_delay"
|
||||||
|
android:title="@string/disconnect_delay" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
</PreferenceScreen>
|
Loading…
Reference in a new issue