lint recommendations
This commit is contained in:
parent
6a84db7aa8
commit
f2d89ac428
9 changed files with 15 additions and 15 deletions
|
@ -14,7 +14,7 @@ class OpenDatasetRequestMessage (val serialNumber : String): BaseMessage() {
|
|||
@Expose
|
||||
var deviceId: String = TidepoolUploader.PUMP_TYPE + ":" + serialNumber
|
||||
@Expose
|
||||
var time = DateUtil.toISOAsUTC(DateUtil.now())
|
||||
var time: String = DateUtil.toISOAsUTC(DateUtil.now())
|
||||
@Expose
|
||||
var timezoneOffset = (DateUtil.getTimeZoneOffsetMs() / T.mins(1).msecs()).toInt()
|
||||
@Expose
|
||||
|
@ -23,7 +23,7 @@ class OpenDatasetRequestMessage (val serialNumber : String): BaseMessage() {
|
|||
@Expose
|
||||
var client = ClientInfo()
|
||||
@Expose
|
||||
var computerTime = DateUtil.toISONoZone(DateUtil.now())
|
||||
var computerTime: String = DateUtil.toISONoZone(DateUtil.now())
|
||||
@Expose
|
||||
var dataSetType = "continuous"
|
||||
@Expose
|
||||
|
@ -37,7 +37,7 @@ class OpenDatasetRequestMessage (val serialNumber : String): BaseMessage() {
|
|||
@Expose
|
||||
var timeProcessing = "none"
|
||||
@Expose
|
||||
var timezone = TimeZone.getDefault().id
|
||||
var timezone: String = TimeZone.getDefault().id
|
||||
@Expose
|
||||
var version = BuildConfig.VERSION_NAME
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ public class ActivityGraph extends GraphView {
|
|||
|
||||
for (long time = 0; time <= hours * 60 * 60 * 1000; time += 5 * 60 * 1000L) {
|
||||
Iob iob = t.iobCalc(time, dia);
|
||||
activityArray.add(new DataPoint(time / 60 / 1000, iob.activityContrib));
|
||||
iobArray.add(new DataPoint(time / 60 / 1000, iob.iobContrib));
|
||||
activityArray.add(new DataPoint(time / 60.0 / 1000, iob.activityContrib));
|
||||
iobArray.add(new DataPoint(time / 60.0 / 1000, iob.iobContrib));
|
||||
}
|
||||
|
||||
DataPoint[] activityDataPoints = new DataPoint[activityArray.size()];
|
||||
|
|
|
@ -155,7 +155,7 @@ public class SensitivityAAPSPlugin extends AbstractSensitivityPlugin {
|
|||
Arrays.sort(deviations);
|
||||
|
||||
double percentile = IobCobCalculatorPlugin.percentile(deviations, 0.50);
|
||||
double basalOff = percentile * (60 / 5) / sens;
|
||||
double basalOff = percentile * (60.0 / 5.0) / sens;
|
||||
double ratio = 1 + (basalOff / profile.getMaxDailyBasal());
|
||||
|
||||
if (percentile < 0) { // sensitive
|
||||
|
|
|
@ -159,7 +159,7 @@ public class SensitivityWeightedAveragePlugin extends AbstractSensitivityPlugin
|
|||
for (int i = 0; i < data.size(); i++) {
|
||||
long reversedWeigth = data.keyAt(i);
|
||||
double value = data.valueAt(i);
|
||||
double weight = (hightestWeight - reversedWeigth) / 2;
|
||||
double weight = (hightestWeight - reversedWeigth) / 2.0;
|
||||
weights += weight;
|
||||
weightedsum += weight * value;
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ public class TemporaryBasal implements Interval, DbObjectBase {
|
|||
double dia = profile.getDia();
|
||||
double dia_ago = time - dia * 60 * 60 * 1000;
|
||||
int aboutFiveMinIntervals = (int) Math.ceil(realDuration / 5d);
|
||||
double tempBolusSpacing = realDuration / aboutFiveMinIntervals;
|
||||
double tempBolusSpacing = (double) (realDuration / aboutFiveMinIntervals);
|
||||
|
||||
for (long j = 0L; j < aboutFiveMinIntervals; j++) {
|
||||
// find middle of the interval
|
||||
|
|
|
@ -264,7 +264,7 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
|
|||
Rect bounds = new Rect();
|
||||
mPaint.getTextBounds(value.getLabel(), 0, value.getLabel().length(), bounds);
|
||||
mPaint.setStyle(Paint.Style.STROKE);
|
||||
float px = endX + bounds.height() / 2;
|
||||
float px = endX + bounds.height() / 2.0f;
|
||||
float py = (float) (graphHeight * ratY + bounds.width() + 10);
|
||||
canvas.save();
|
||||
canvas.rotate(-90, px, py);
|
||||
|
|
|
@ -98,8 +98,8 @@ public class BIGChart extends WatchFace implements SharedPreferences.OnSharedPre
|
|||
private String cobString = "";
|
||||
|
||||
private TextView statusView;
|
||||
private long chartTapTime = 0l;
|
||||
private long sgvTapTime = 0l;
|
||||
private long chartTapTime = 0L;
|
||||
private long sgvTapTime = 0L;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
|
|
|
@ -216,7 +216,7 @@ public class CircleWatchface extends WatchFace implements SharedPreferences.OnSh
|
|||
public String getMinutes() {
|
||||
String minutes = "--\'";
|
||||
if (getDatetime() != 0) {
|
||||
minutes = ((int) Math.floor((System.currentTimeMillis() - getDatetime()) / 60000)) + "\'";
|
||||
minutes = ((int) Math.floor((System.currentTimeMillis() - getDatetime()) / 60000.0)) + "\'";
|
||||
}
|
||||
return minutes;
|
||||
}
|
||||
|
@ -669,7 +669,7 @@ public class CircleWatchface extends WatchFace implements SharedPreferences.OnSh
|
|||
}
|
||||
|
||||
float offsetMultiplier = (((displaySize.x / 2f) - PADDING) / 12f);
|
||||
float offset = (float) Math.max(1, Math.ceil((System.currentTimeMillis() - entry.timestamp) / (1000 * 60 * 5)));
|
||||
float offset = (float) Math.max(1, Math.ceil((System.currentTimeMillis() - entry.timestamp) / (1000 * 60 * 5.0)));
|
||||
size = bgToAngle((float) entry.sgv);
|
||||
addArch(canvas, offset * offsetMultiplier + 10, color, (float) size);
|
||||
addArch(canvas, (float) size, offset * offsetMultiplier + 10, getBackgroundColor(), (float) (360 - size));
|
||||
|
@ -695,7 +695,7 @@ public class CircleWatchface extends WatchFace implements SharedPreferences.OnSh
|
|||
barColor = darken(getLowColor(), .5);
|
||||
}
|
||||
float offsetMultiplier = (((displaySize.x / 2f) - PADDING) / 12f);
|
||||
float offset = (float) Math.max(1, Math.ceil((System.currentTimeMillis() - entry.timestamp) / (1000 * 60 * 5)));
|
||||
float offset = (float) Math.max(1, Math.ceil((System.currentTimeMillis() - entry.timestamp) / (1000 * 60 * 5.0)));
|
||||
size = bgToAngle((float) entry.sgv);
|
||||
addArch(canvas, offset * offsetMultiplier + 11, barColor, (float) size - 2); // Dark Color Bar
|
||||
addArch(canvas, (float) size - 2, offset * offsetMultiplier + 11, indicatorColor, 2f); // Indicator at end of bar
|
||||
|
|
|
@ -78,7 +78,7 @@ public class NOChart extends WatchFace implements SharedPreferences.OnSharedPref
|
|||
private String sgvString = "--";
|
||||
private String externalStatusString = "no status";
|
||||
private TextView statusView;
|
||||
private long sgvTapTime = 0l;
|
||||
private long sgvTapTime = 0L;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
|
|
Loading…
Reference in a new issue