[Android] AdvOptionsDialog: don't display chapters dialog is there is 1 chapter
Thomas Guillem
git at videolan.org
Thu Jul 30 09:48:46 CEST 2015
vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jul 30 09:40:50 2015 +0200| [5af596b593dc04e5f9c0ba4de74f34d390dbd4e6] | committer: Thomas Guillem
AdvOptionsDialog: don't display chapters dialog is there is 1 chapter
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=5af596b593dc04e5f9c0ba4de74f34d390dbd4e6
---
vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java | 4 +++-
1 file changed, 3 insertions(+), 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 9ec1a55..f27cf91 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/AdvOptionsDialog.java
@@ -399,7 +399,9 @@ public class AdvOptionsDialog extends DialogFragment implements View.OnClickList
if (mMode == MODE_VIDEO) {
// Init Chapter
final MediaPlayer.Chapter[] chapters = mService.getChapters(-1);
- if (chapters != null) {
+ final int chaptersCount = chapters != null ? chapters.length : 0;
+
+ if (chaptersCount > 1) {
mChaptersTitle.setText(chapters[mService.getChapterIdx()].name);
} else
mChaptersTitle.setVisibility(View.GONE);
More information about the Android
mailing list