DEV warning only for APS builds

This commit is contained in:
Milos Kozak 2018-03-24 17:09:56 +01:00
parent 9af8672cab
commit 62d775b78e
3 changed files with 8 additions and 5 deletions

View file

@ -389,6 +389,8 @@ public class MainApp extends Application {
} }
public static boolean isEngineeringModeOrRelease() { public static boolean isEngineeringModeOrRelease() {
if (!BuildConfig.APS)
return true;
return engineeringMode || !devBranch; return engineeringMode || !devBranch;
} }

View file

@ -149,7 +149,7 @@ public class Treatment implements DataPointWithLabelInterface {
@Override @Override
public float getSize() { public float getSize() {
return 10; return 2;
} }
@Override @Override

View file

@ -52,7 +52,7 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
// Convert the sp to pixels // Convert the sp to pixels
Context context = MainApp.instance().getApplicationContext(); Context context = MainApp.instance().getApplicationContext();
float scaledTextSize = spSize * context.getResources().getDisplayMetrics().scaledDensity; float scaledTextSize = spSize * context.getResources().getDisplayMetrics().scaledDensity;
float scaledPxSize = context.getResources().getDisplayMetrics().scaledDensity * 1.5f; float scaledPxSize = context.getResources().getDisplayMetrics().scaledDensity * 2.8f;
/** /**
* choose a predefined shape to render for * choose a predefined shape to render for
@ -233,9 +233,10 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
} else if (value.getShape() == Shape.SMB) { } else if (value.getShape() == Shape.SMB) {
mPaint.setStrokeWidth(2); mPaint.setStrokeWidth(2);
Point[] points = new Point[3]; Point[] points = new Point[3];
points[0] = new Point((int)endX, (int)(endY-value.getSize())); float size = value.getSize() * scaledPxSize;
points[1] = new Point((int)(endX+value.getSize()), (int)(endY+value.getSize()*0.67)); points[0] = new Point((int)endX, (int)(endY-size));
points[2] = new Point((int)(endX-value.getSize()), (int)(endY+value.getSize()*0.67)); points[1] = new Point((int)(endX+size), (int)(endY+size*0.67));
points[2] = new Point((int)(endX-size), (int)(endY+size*0.67));
mPaint.setStyle(Paint.Style.FILL_AND_STROKE); mPaint.setStyle(Paint.Style.FILL_AND_STROKE);
drawArrows(points, canvas, mPaint); drawArrows(points, canvas, mPaint);
} else if (value.getShape() == Shape.EXTENDEDBOLUS) { } else if (value.getShape() == Shape.EXTENDEDBOLUS) {