This commit is contained in:
Milos Kozak 2016-10-09 11:17:56 +02:00
commit 2e02521eae
3 changed files with 6 additions and 6 deletions

View file

@ -23,8 +23,8 @@ android {
applicationId "info.nightscout.androidaps" applicationId "info.nightscout.androidaps"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 23 targetSdkVersion 23
versionCode 1014 versionCode 1015
versionName "1.0.14" versionName "1.0.15"
} }
buildTypes { buildTypes {
release { release {

View file

@ -408,7 +408,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
data.put("percent", SafeParse.stringToDouble(percentEdit.getText().toString())); data.put("percent", SafeParse.stringToDouble(percentEdit.getText().toString()));
if (layoutAbsolute.getVisibility() != View.GONE) if (layoutAbsolute.getVisibility() != View.GONE)
data.put("absolute", SafeParse.stringToDouble(absoluteEdit.getText().toString())); 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) if (SafeParse.stringToDouble(carbTimeEdit.getText().toString()) != 0d)
data.put("preBolus", SafeParse.stringToDouble(carbTimeEdit.getText().toString())); data.put("preBolus", SafeParse.stringToDouble(carbTimeEdit.getText().toString()));
if (!notesEdit.getText().toString().equals("")) if (!notesEdit.getText().toString().equals(""))

View file

@ -92,7 +92,7 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli
final Context context = getContext(); final Context context = getContext();
AlertDialog.Builder builder = new AlertDialog.Builder(context); 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.setMessage(confirmMessage);
builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() { builder.setPositiveButton(getString(R.string.ok), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) { 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); PumpEnactResult result = pump.setExtendedBolus(finalInsulin, finalDurationInMinutes);
if (!result.success) { if (!result.success) {
AlertDialog.Builder builder = new AlertDialog.Builder(context); 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.setMessage(result.comment);
builder.setPositiveButton(getContext().getString(R.string.ok), null); builder.setPositiveButton(context.getString(R.string.ok), null);
builder.show(); builder.show();
} }
} }