1.33 app start logging optional
This commit is contained in:
parent
2413fae0a9
commit
402768cb87
6 changed files with 35 additions and 25 deletions
|
@ -44,7 +44,7 @@ android {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 23
|
targetSdkVersion 23
|
||||||
versionCode 1100
|
versionCode 1100
|
||||||
version "1.32"
|
version "1.33"
|
||||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||||
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
buildConfigField "String", "BUILDVERSION", generateGitBuild()
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ import android.preference.PreferenceFragment;
|
||||||
import android.preference.PreferenceGroup;
|
import android.preference.PreferenceGroup;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
|
|
||||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||||
import info.nightscout.androidaps.events.EventRefreshGui;
|
import info.nightscout.androidaps.events.EventRefreshGui;
|
||||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||||
|
@ -131,7 +130,6 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
||||||
addPreferencesFromResource(R.xml.pref_others);
|
addPreferencesFromResource(R.xml.pref_others);
|
||||||
addPreferencesFromResource(R.xml.pref_advanced);
|
addPreferencesFromResource(R.xml.pref_advanced);
|
||||||
}
|
}
|
||||||
initSummary(getPreferenceScreen());
|
|
||||||
|
|
||||||
if (Config.WEAR) {
|
if (Config.WEAR) {
|
||||||
WearPlugin wearPlugin = (WearPlugin) MainApp.getSpecificPlugin(WearPlugin.class);
|
WearPlugin wearPlugin = (WearPlugin) MainApp.getSpecificPlugin(WearPlugin.class);
|
||||||
|
@ -139,6 +137,8 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
||||||
addPreferencesFromResource(R.xml.pref_wear);
|
addPreferencesFromResource(R.xml.pref_wear);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initSummary(getPreferenceScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Preference getPreference(String key) {
|
public Preference getPreference(String key) {
|
||||||
|
|
|
@ -59,6 +59,7 @@ import info.nightscout.androidaps.plugins.NSClientInternal.data.DbLogger;
|
||||||
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSProfile;
|
import info.nightscout.androidaps.plugins.NSClientInternal.data.NSProfile;
|
||||||
import info.nightscout.utils.BatteryLevel;
|
import info.nightscout.utils.BatteryLevel;
|
||||||
import info.nightscout.utils.DateUtil;
|
import info.nightscout.utils.DateUtil;
|
||||||
|
import info.nightscout.utils.SP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by mike on 05.08.2016.
|
* Created by mike on 05.08.2016.
|
||||||
|
@ -1128,6 +1129,7 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
}
|
}
|
||||||
|
|
||||||
public void uploadAppStart() {
|
public void uploadAppStart() {
|
||||||
|
if (SP.getBoolean(R.string.key_ns_logappstartedevent, true)) {
|
||||||
Context context = MainApp.instance().getApplicationContext();
|
Context context = MainApp.instance().getApplicationContext();
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("action", "dbAdd");
|
bundle.putString("action", "dbAdd");
|
||||||
|
@ -1147,5 +1149,6 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderPlugin.class);
|
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderPlugin.class);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -531,4 +531,5 @@
|
||||||
<string name="smscommunicator_remotecommandnotallowed">Vzdálení příkaz není povolen</string>
|
<string name="smscommunicator_remotecommandnotallowed">Vzdálení příkaz není povolen</string>
|
||||||
<string name="smscommunicator_suspendreplywithcode" formatted="false">K pozastavení smyčky na %d minut odpověz SMS s kódem %s</string>
|
<string name="smscommunicator_suspendreplywithcode" formatted="false">K pozastavení smyčky na %d minut odpověz SMS s kódem %s</string>
|
||||||
<string name="smscommunicator_wrongduration">Chybná doba trvání</string>
|
<string name="smscommunicator_wrongduration">Chybná doba trvání</string>
|
||||||
|
<string name="ns_logappstartedevent">Logovat spuštění aplikace do NS</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -581,4 +581,6 @@
|
||||||
<string name="treatments_wizard_bgtrend_label">15min trend</string>
|
<string name="treatments_wizard_bgtrend_label">15min trend</string>
|
||||||
<string name="treatments_wizard_cob_label">COB</string>
|
<string name="treatments_wizard_cob_label">COB</string>
|
||||||
<string name="treatments_wizard_sb_label">Superbolus</string>
|
<string name="treatments_wizard_sb_label">Superbolus</string>
|
||||||
|
<string name="ns_logappstartedevent">Log app start to NS</string>
|
||||||
|
<string name="key_ns_logappstartedevent" translatable="false">ns_logappstartedevent</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
android:defaultValue=""
|
android:defaultValue=""
|
||||||
android:inputType="textPassword">
|
android:inputType="textPassword">
|
||||||
</EditTextPreference>
|
</EditTextPreference>
|
||||||
|
<SwitchPreference
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:key="@string/key_ns_logappstartedevent"
|
||||||
|
android:title="@string/ns_logappstartedevent" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
Loading…
Reference in a new issue