diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2018-07-22 18:22:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-22 18:22:16 +0200 |
commit | 9646cc883c8a9ccf5f3f86e94b75626ec3944f0d (patch) | |
tree | c2d92e9bf1bca416352a23f2a382921e83860f24 /app | |
parent | 1b6f98203fe2048997a2029606e1e1285fd2d724 (diff) | |
parent | c2184cfab20aafbed70a30ee1d8f23c67f552d2b (diff) | |
download | AntennaPod-9646cc883c8a9ccf5f3f86e94b75626ec3944f0d.zip |
Merge pull request #2655 from ByteHamster/exo-player
Added ExoPlayer
Diffstat (limited to 'app')
4 files changed, 17 insertions, 18 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java index 6a975fe49..cf9a2907b 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java @@ -52,7 +52,7 @@ public class VariableSpeedDialog { builder.neutralText(R.string.close_label); builder.onPositive((dialog, which) -> { if (Build.VERSION.SDK_INT >= 16) { // just to be safe - UserPreferences.enableSonic(true); + UserPreferences.enableSonic(); if(showSpeedSelector) { showSpeedSelectorDialog(context); } diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java index 9bb0edeb2..29bbee980 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java @@ -147,12 +147,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { - if(key.equals(UserPreferences.PREF_SONIC)) { - CheckBoxPreference prefSonic = (CheckBoxPreference) ui.findPreference(UserPreferences.PREF_SONIC); - if(prefSonic != null) { - prefSonic.setChecked(sharedPreferences.getBoolean(UserPreferences.PREF_SONIC, false)); - } - } + } @@ -891,11 +886,10 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc } private void checkSonicItemVisibility() { - if (Build.VERSION.SDK_INT >= 16) { - ui.findPreference(UserPreferences.PREF_SONIC).setEnabled(true); - } else { - Preference prefSonic = ui.findPreference(UserPreferences.PREF_SONIC); - prefSonic.setSummary("[Android 4.1+]\n" + prefSonic.getSummary()); + if (Build.VERSION.SDK_INT < 16) { + ListPreference p = (ListPreference) ui.findPreference(UserPreferences.PREF_MEDIA_PLAYER); + p.setEntries(R.array.media_player_options_no_sonic); + p.setEntryValues(R.array.media_player_values_no_sonic); } } diff --git a/app/src/main/res/xml/preferences_playback.xml b/app/src/main/res/xml/preferences_playback.xml index c43f6da71..9182df600 100644 --- a/app/src/main/res/xml/preferences_playback.xml +++ b/app/src/main/res/xml/preferences_playback.xml @@ -109,12 +109,14 @@ </PreferenceCategory> <PreferenceCategory android:title="@string/media_player"> - <SwitchPreference - android:defaultValue="true" - android:enabled="false" - android:key="prefSonic" - android:summary="@string/pref_sonic_message" - android:title="@string/pref_sonic_title"/> + <ListPreference + android:defaultValue="sonic" + android:entries="@array/media_player_options" + android:key="prefMediaPlayer" + android:title="@string/media_player" + android:summary="@string/pref_media_player_message" + android:entryValues="@array/media_player_values" + app:useStockLayout="true"/> </PreferenceCategory> <PreferenceCategory android:title="@string/experimental_pref"> diff --git a/app/src/main/templates/about.html b/app/src/main/templates/about.html index 400727c46..61b95207a 100644 --- a/app/src/main/templates/about.html +++ b/app/src/main/templates/about.html @@ -64,6 +64,9 @@ by The Apache Software Foundation, licensed under the Apache 2.0 license <a href <h2>EventBus <a href="https://github.com/greenrobot/EventBus">(Link)</a></h2> by greenrobot, licensed under the Apache 2.0 license <a href="LICENSE_APACHE-2.0.txt">(View)</a> +<h2>ExoPlayer <a href="https://github.com/google/ExoPlayer">(Link)</a></h2> +by Google, licensed under the Apache 2.0 license <a href="LICENSE_APACHE-2.0.txt">(View)</a> + <h2>flattr4j <a href="http://www.shredzone.org/projects/flattr4j/wiki">(Link)</a></h2> licensed under the Apache 2.0 license <a href="LICENSE_APACHE-2.0.txt">(View)</a> |