summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/FeedSettingsTest.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java40
-rw-r--r--app/src/main/res/xml/feed_settings.xml8
3 files changed, 34 insertions, 16 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/FeedSettingsTest.java b/app/src/androidTest/java/de/test/antennapod/ui/FeedSettingsTest.java
index 861c62f1b..187c9e16d 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/FeedSettingsTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/FeedSettingsTest.java
@@ -73,7 +73,7 @@ public class FeedSettingsTest {
clickPreference(R.string.auto_delete_label);
onView(withText(R.string.cancel_label)).perform(click());
- clickPreference(R.string.feed_volume_reduction);
+ clickPreference(R.string.feed_volume_adapdation);
onView(withText(R.string.cancel_label)).perform(click());
}
}
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java
index ae9e003d5..0e4c883cf 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedSettingsFragment.java
@@ -156,7 +156,7 @@ public class FeedSettingsFragment extends Fragment {
setupAutoDownloadPreference();
setupKeepUpdatedPreference();
setupAutoDeletePreference();
- setupVolumeReductionPreferences();
+ setupVolumeAdaptationPreferences();
setupNewEpisodesAction();
setupAuthentificationPreference();
setupEpisodeFilterPreference();
@@ -166,7 +166,7 @@ public class FeedSettingsFragment extends Fragment {
setupTags();
updateAutoDeleteSummary();
- updateVolumeReductionValue();
+ updateVolumeAdaptationValue();
updateAutoDownloadEnabled();
updateNewEpisodesAction();
@@ -317,9 +317,9 @@ public class FeedSettingsFragment extends Fragment {
}
}
- private void setupVolumeReductionPreferences() {
- ListPreference volumeReductionPreference = findPreference("volumeReduction");
- volumeReductionPreference.setOnPreferenceChangeListener((preference, newValue) -> {
+ private void setupVolumeAdaptationPreferences() {
+ ListPreference volumeAdaptationPreference = findPreference("volumeReduction");
+ volumeAdaptationPreference.setOnPreferenceChangeListener((preference, newValue) -> {
switch ((String) newValue) {
case "off":
feedPreferences.setVolumeAdaptionSetting(VolumeAdaptionSetting.OFF);
@@ -330,28 +330,46 @@ public class FeedSettingsFragment extends Fragment {
case "heavy":
feedPreferences.setVolumeAdaptionSetting(VolumeAdaptionSetting.HEAVY_REDUCTION);
break;
+ case "light_boost":
+ feedPreferences.setVolumeAdaptionSetting(VolumeAdaptionSetting.LIGHT_BOOST);
+ break;
+ case "medium_boost":
+ feedPreferences.setVolumeAdaptionSetting(VolumeAdaptionSetting.MEDIUM_BOOST);
+ break;
+ case "heavy_boost":
+ feedPreferences.setVolumeAdaptionSetting(VolumeAdaptionSetting.HEAVY_BOOST);
+ break;
default:
}
DBWriter.setFeedPreferences(feedPreferences);
- updateVolumeReductionValue();
+ updateVolumeAdaptationValue();
EventBus.getDefault().post(
new VolumeAdaptionChangedEvent(feedPreferences.getVolumeAdaptionSetting(), feed.getId()));
return false;
});
}
- private void updateVolumeReductionValue() {
- ListPreference volumeReductionPreference = findPreference("volumeReduction");
+ private void updateVolumeAdaptationValue() {
+ ListPreference volumeAdaptationPreference = findPreference("volumeReduction");
switch (feedPreferences.getVolumeAdaptionSetting()) {
case OFF:
- volumeReductionPreference.setValue("off");
+ volumeAdaptationPreference.setValue("off");
break;
case LIGHT_REDUCTION:
- volumeReductionPreference.setValue("light");
+ volumeAdaptationPreference.setValue("light");
break;
case HEAVY_REDUCTION:
- volumeReductionPreference.setValue("heavy");
+ volumeAdaptationPreference.setValue("heavy");
+ break;
+ case LIGHT_BOOST:
+ volumeAdaptationPreference.setValue("light_boost");
+ break;
+ case MEDIUM_BOOST:
+ volumeAdaptationPreference.setValue("medium_boost");
+ break;
+ case HEAVY_BOOST:
+ volumeAdaptationPreference.setValue("heavy_boost");
break;
}
}
diff --git a/app/src/main/res/xml/feed_settings.xml b/app/src/main/res/xml/feed_settings.xml
index 619ab6296..fb9e2e425 100644
--- a/app/src/main/res/xml/feed_settings.xml
+++ b/app/src/main/res/xml/feed_settings.xml
@@ -50,12 +50,12 @@
<de.danoeh.antennapod.preferences.MaterialListPreference
android:defaultValue="off"
- android:entries="@array/spnVolumeReductionItems"
- android:entryValues="@array/spnVolumeReductionValues"
+ android:entries="@array/spnVolumeAdaptationItems"
+ android:entryValues="@array/spnVolumeAdaptationValues"
android:icon="@drawable/ic_volume_adaption"
android:key="volumeReduction"
- android:summary="@string/feed_volume_reduction_summary"
- android:title="@string/feed_volume_reduction" />
+ android:summary="@string/feed_volume_adaptation_summary"
+ android:title="@string/feed_volume_adapdation" />
<de.danoeh.antennapod.preferences.MaterialListPreference
android:entries="@array/feedNewEpisodesActionItems"