From 69c00224724875866da6963745712befaca91c9b Mon Sep 17 00:00:00 2001 From: orionlee Date: Fri, 4 Oct 2019 14:06:35 -0700 Subject: [PATCH] code style fixes - naming, indentation, etc. --- app/src/main/res/xml/preferences_playback.xml | 10 +++++----- .../storage/ItemEnqueuePositionCalculator.java | 16 ++++++++-------- .../ItemEnqueuePositionCalculatorTest.java | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/src/main/res/xml/preferences_playback.xml b/app/src/main/res/xml/preferences_playback.xml index b743bdbaf..44ecf32ec 100644 --- a/app/src/main/res/xml/preferences_playback.xml +++ b/app/src/main/res/xml/preferences_playback.xml @@ -97,11 +97,11 @@ android:summary="@string/pref_queueAddToFront_sum" android:title="@string/pref_queueAddToFront_title"/> + android:defaultValue="false" + android:enabled="false" + android:key="prefQueueKeepInProgressAtFront" + android:summary="@string/pref_queueKeepInProgressAtFront_sum" + android:title="@string/pref_queueKeepInProgressAtFront_title"/> curQueue) { + private int getPositionOfFirstNonDownloadingItem(int startPosition, List curQueue) { final int curQueueSize = curQueue.size(); for (int i = startPosition; i < curQueueSize; i++) { if (!isItemAtPositionDownloading(i, curQueue)) { @@ -95,9 +95,9 @@ class ItemEnqueuePositionCalculator { curItem = null; } - if (curItem != null && - curItem.getMedia() != null && - downloadStateProvider.isDownloadingFile(curItem.getMedia())) { + if (curItem != null + && curItem.getMedia() != null + && downloadStateProvider.isDownloadingFile(curItem.getMedia())) { return true; } else { return false; diff --git a/core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java b/core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java index 424240fa8..c076ec892 100644 --- a/core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java +++ b/core/src/test/java/de/danoeh/antennapod/core/storage/ItemEnqueuePositionCalculatorTest.java @@ -26,7 +26,7 @@ import static org.mockito.Mockito.stub; public class ItemEnqueuePositionCalculatorTest { @RunWith(Parameterized.class) - public static class IEPCBasicTest { + public static class BasicTest { @Parameters(name = "{index}: case<{0}>, expected:{1}") public static Iterable data() { Options optDefault = new Options(); @@ -90,7 +90,7 @@ public class ItemEnqueuePositionCalculatorTest { } @RunWith(Parameterized.class) - public static class IEPCKeepInProgressAtFrontTest extends IEPCBasicTest { + public static class KeepInProgressAtFrontTest extends BasicTest { @Parameters(name = "{index}: case<{0}>, expected:{1}") public static Iterable data() { Options optKeepInProgressAtFront =