diff --git a/app/build.gradle b/app/build.gradle index f19c75574d..8dd4d45f26 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,8 +23,8 @@ android { applicationId "info.nightscout.androidaps" minSdkVersion 21 targetSdkVersion 23 - versionCode 1014 - versionName "1.0.14" + versionCode 1015 + versionName "1.0.15" } buildTypes { release { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/Dialogs/NewNSTreatmentDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/Dialogs/NewNSTreatmentDialog.java index 5c8270e23a..a25720d0b2 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/Dialogs/NewNSTreatmentDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/Dialogs/NewNSTreatmentDialog.java @@ -408,7 +408,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick data.put("percent", SafeParse.stringToDouble(percentEdit.getText().toString())); if (layoutAbsolute.getVisibility() != View.GONE) data.put("absolute", SafeParse.stringToDouble(absoluteEdit.getText().toString())); - if (options.profile) data.put("profile", profileSpinner.getSelectedItem().toString()); + if (options.profile && profileSpinner.getSelectedItem() != null) data.put("profile", profileSpinner.getSelectedItem().toString()); if (SafeParse.stringToDouble(carbTimeEdit.getText().toString()) != 0d) data.put("preBolus", SafeParse.stringToDouble(carbTimeEdit.getText().toString())); if (!notesEdit.getText().toString().equals("")) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewExtendedBolusDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewExtendedBolusDialog.java index 41afa4c357..e3be3b7225 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewExtendedBolusDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewExtendedBolusDialog.java @@ -92,7 +92,7 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli final Context context = getContext(); AlertDialog.Builder builder = new AlertDialog.Builder(context); - builder.setTitle(this.getContext().getString(R.string.confirmation)); + builder.setTitle(context.getString(R.string.confirmation)); builder.setMessage(confirmMessage); builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { @@ -103,9 +103,9 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli PumpEnactResult result = pump.setExtendedBolus(finalInsulin, finalDurationInMinutes); if (!result.success) { AlertDialog.Builder builder = new AlertDialog.Builder(context); - builder.setTitle(getContext().getString(R.string.treatmentdeliveryerror)); + builder.setTitle(context.getString(R.string.treatmentdeliveryerror)); builder.setMessage(result.comment); - builder.setPositiveButton(getContext().getString(R.string.ok), null); + builder.setPositiveButton(context.getString(R.string.ok), null); builder.show(); } }