Commit 2123ea14 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Hide ducking option on Oreo devices

Oreo auto-ducks, this is no effective
parent 091567e1
......@@ -27,6 +27,7 @@ import android.os.Bundle;
import android.support.v7.preference.Preference;
import android.support.v7.preference.TwoStatePreference;
import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.libvlc.util.HWDecoderUtil;
import org.videolan.vlc.PlaybackService;
import org.videolan.vlc.R;
......@@ -53,6 +54,7 @@ public class PreferencesAudio extends BasePreferenceFragment implements SharedPr
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
findPreference("audio_ducking").setVisible(!AndroidUtil.isOOrLater);
final HWDecoderUtil.AudioOutput aout = HWDecoderUtil.getAudioOutputFromDevice();
if (aout != HWDecoderUtil.AudioOutput.ALL) {
/* no AudioOutput choice */
......
......@@ -26,6 +26,7 @@ import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.libvlc.util.HWDecoderUtil;
import org.videolan.vlc.R;
import org.videolan.vlc.util.VLCInstance;
......@@ -52,6 +53,7 @@ public class PreferencesAudio extends BasePreferenceFragment implements SharedPr
findPreference("enable_steal_remote_control").setVisible(false);
findPreference("headset_prefs_category").setVisible(false);
findPreference("lockscreen_cover").setVisible(false);
findPreference("audio_ducking").setVisible(!AndroidUtil.isOOrLater);
final HWDecoderUtil.AudioOutput aout = HWDecoderUtil.getAudioOutputFromDevice();
if (aout != HWDecoderUtil.AudioOutput.ALL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment