1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-04 01:09:47 +01:00

Add some @Nullable

This commit is contained in:
cpfeiffer 2018-08-16 23:53:54 +02:00
parent e32dcd9d73
commit 0145013597

View File

@ -20,6 +20,7 @@ package nodomain.freeyourgadget.gadgetbridge.activities.charts;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -164,9 +165,9 @@ public class SleepChartFragment extends AbstractChartFragment {
Bundle savedInstanceState) { Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_sleepchart, container, false); View rootView = inflater.inflate(R.layout.fragment_sleepchart, container, false);
mActivityChart = (LineChart) rootView.findViewById(R.id.sleepchart); mActivityChart = rootView.findViewById(R.id.sleepchart);
mSleepAmountChart = (PieChart) rootView.findViewById(R.id.sleepchart_pie_light_deep); mSleepAmountChart = rootView.findViewById(R.id.sleepchart_pie_light_deep);
mSleepchartInfo = (TextView) rootView.findViewById(R.id.sleepchart_info); mSleepchartInfo = rootView.findViewById(R.id.sleepchart_info);
setupActivityChart(); setupActivityChart();
setupSleepAmountChart(); setupSleepAmountChart();
@ -275,10 +276,10 @@ public class SleepChartFragment extends AbstractChartFragment {
private static class MySleepChartsData extends ChartsData { private static class MySleepChartsData extends ChartsData {
private String totalSleep; private String totalSleep;
private final PieData pieData; private final PieData pieData;
private Date startSleep; private @Nullable Date startSleep;
private Date endSleep; private @Nullable Date endSleep;
public MySleepChartsData(String totalSleep, PieData pieData, Date startSleep, Date endSleep) { public MySleepChartsData(String totalSleep, PieData pieData, @Nullable Date startSleep, @Nullable Date endSleep) {
this.totalSleep = totalSleep; this.totalSleep = totalSleep;
this.pieData = pieData; this.pieData = pieData;
this.startSleep = startSleep; this.startSleep = startSleep;
@ -293,10 +294,12 @@ public class SleepChartFragment extends AbstractChartFragment {
return totalSleep; return totalSleep;
} }
@Nullable
public Date getStartSleep() { public Date getStartSleep() {
return startSleep; return startSleep;
} }
@Nullable
public Date getEndSleep() { public Date getEndSleep() {
return endSleep; return endSleep;
} }