forked from upstream-mirrors/OpenTracks
Cleanup: use List.of().
This commit is contained in:
+2
-2
@@ -5,8 +5,8 @@ import org.junit.runner.RunWith;
|
|||||||
import org.junit.runners.Parameterized;
|
import org.junit.runners.Parameterized;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import de.dennisguse.opentracks.data.models.Track;
|
import de.dennisguse.opentracks.data.models.Track;
|
||||||
@@ -18,7 +18,7 @@ public class TrackFilenameGenerator2Test {
|
|||||||
|
|
||||||
@Parameterized.Parameters
|
@Parameterized.Parameters
|
||||||
public static Collection<String> data() {
|
public static Collection<String> data() {
|
||||||
return Arrays.asList(
|
return List.of(
|
||||||
"{name}_{starime}",
|
"{name}_{starime}",
|
||||||
"{name",
|
"{name",
|
||||||
"name}");
|
"name}");
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ public abstract class AbstractTrackDeleteActivity extends AbstractActivity imple
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConfirmDeleteDone(Track.Id... trackIds) {
|
public void onConfirmDeleteDone(Track.Id... trackIds) {
|
||||||
ArrayList<Track.Id> trackIdList = new ArrayList<>(Arrays.asList(trackIds))
|
ArrayList<Track.Id> trackIdList = Arrays.stream(trackIds)
|
||||||
.stream().filter(trackId -> !trackId.equals(getRecordingTrackId())).collect(Collectors.toCollection(ArrayList::new));
|
.filter(trackId -> !trackId.equals(getRecordingTrackId())).collect(Collectors.toCollection(ArrayList::new));
|
||||||
|
|
||||||
onDeleteConfirmed();
|
onDeleteConfirmed();
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import java.io.FilterInputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
@@ -49,7 +48,7 @@ public class KmzTrackImporter {
|
|||||||
|
|
||||||
private static final String TAG = KmzTrackImporter.class.getSimpleName();
|
private static final String TAG = KmzTrackImporter.class.getSimpleName();
|
||||||
|
|
||||||
private static final List<String> KMZ_IMAGES_EXT = Arrays.asList("jpeg", "jpg", "png");
|
private static final List<String> KMZ_IMAGES_EXT = List.of("jpeg", "jpg", "png");
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final TrackImporter trackImporter;
|
private final TrackImporter trackImporter;
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import android.util.Log;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
@@ -150,7 +149,7 @@ public class VoiceAnnouncement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Arrays.asList(AudioManager.MODE_IN_CALL, AudioManager.MODE_IN_COMMUNICATION)
|
if (List.of(AudioManager.MODE_IN_CALL, AudioManager.MODE_IN_COMMUNICATION)
|
||||||
.contains(audioManager.getMode())) {
|
.contains(audioManager.getMode())) {
|
||||||
Log.i(TAG, "Announcement is not allowed at this time.");
|
Log.i(TAG, "Announcement is not allowed at this time.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user