[Android] Hide background playback option if no audio track

Geoffrey Métais git at videolan.org
Wed Sep 27 12:13:20 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Sep 27 11:41:33 2017 +0200| [2b3d96d7e47e59c1c51655280913d88a4a2053b1] | committer: Geoffrey Métais

Hide background playback option if no audio track

> https://code.videolan.org/videolan/vlc-android/commit/2b3d96d7e47e59c1c51655280913d88a4a2053b1
---

 vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
index a55ea2484..5c38541f3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
@@ -513,7 +513,7 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
         mAdapter.addOption(new Option(ID_EQUALIZER, R.attr.ic_equalizer_normal_style, getString(R.string.equalizer)));
 
         if (mMode == MODE_VIDEO) {
-            if (!tvUi)
+            if (!tvUi && mService.getAudioTracksCount() > 0)
                 mAdapter.addOption(new Option(ID_PLAY_AS_AUDIO, R.attr.ic_playasaudio_on, getString(R.string.play_as_audio)));
             mAdapter.addOption(new Option(ID_SPU_DELAY, R.attr.ic_subtitledelay, getString(R.string.spu_delay)));
             mAdapter.addOption(new Option(ID_AUDIO_DELAY, R.attr.ic_audiodelay, getString(R.string.audio_delay)));



More information about the Android mailing list