Cleanup using AndroidStudio code analyzer.

Moved to iterator for loops for ChartView and ChartFragment.
This commit is contained in:
Dennis Guse
2020-04-04 00:51:59 +02:00
parent 208f1d71ba
commit fbc902e830
21 changed files with 63 additions and 177 deletions
@@ -21,7 +21,7 @@ package de.dennisguse.opentracks.services;
*
* @author Sandor Dornbush
*/
public interface LocationListenerPolicy {
interface LocationListenerPolicy {
/**
* Returns the polling interval this policy would like at this moment.
@@ -70,7 +70,7 @@ public class TrackRecordingServiceConnection implements ServiceConnection, Death
/**
* Binds the service if it is started.
*/
public void bindIfStarted(Context context) {
private void bindIfStarted(Context context) {
bindService(context, false);
}
@@ -30,7 +30,6 @@ import de.dennisguse.opentracks.util.UnitConversions;
public class PeriodicTaskExecutor {
private static final String TAG = PeriodicTaskExecutor.class.getSimpleName();
private static final long MINUTE_TO_MILLISECONDS = 60000L;
private final TrackRecordingService trackRecordingService;
private final PeriodicTaskFactory periodicTaskFactory;
@@ -93,7 +92,7 @@ public class PeriodicTaskExecutor {
if (timerTaskExecutor == null) {
timerTaskExecutor = new TimerTaskExecutor(periodicTask, trackRecordingService);
}
timerTaskExecutor.scheduleTask(taskFrequency * MINUTE_TO_MILLISECONDS);
timerTaskExecutor.scheduleTask(taskFrequency * UnitConversions.ONE_MINUTE_MS);
} else {
// For distance periodic task
calculateNextTaskDistance();
@@ -23,7 +23,7 @@ import android.content.Context;
*
* @author Sandor Dornbush
*/
public interface PeriodicTaskFactory {
interface PeriodicTaskFactory {
/**
* Creates a {@link PeriodicTask}.