From 66c272c9b05cf15b27e0f23bc377a46fc7eee4c6 Mon Sep 17 00:00:00 2001 From: ibaker Date: Fri, 14 Jan 2022 00:08:10 +0000 Subject: [PATCH] Reword javadoc of TracksInfo.isTypeSupportedOrEmpty The existing wording would be correct if prefixed with "Returns false if [...]", but it seems confusing to a document a boolean method in terms the condition it returns false - so I reworded it in terms of when it returns true. #minor-release PiperOrigin-RevId: 421682584 --- .../java/com/google/android/exoplayer2/TracksInfo.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/library/common/src/main/java/com/google/android/exoplayer2/TracksInfo.java b/library/common/src/main/java/com/google/android/exoplayer2/TracksInfo.java index 8f723a1859..328f8a4080 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/TracksInfo.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/TracksInfo.java @@ -225,7 +225,10 @@ public final class TracksInfo implements Bundleable { return trackGroupInfos; } - /** Returns if there is at least one track of type {@code trackType} but none are supported. */ + /** + * Returns true if at least one track of type {@code trackType} is {@link + * TrackGroupInfo#isTrackSupported(int) supported}, or there are no tracks of this type. + */ public boolean isTypeSupportedOrEmpty(@C.TrackType int trackType) { boolean supported = true; for (int i = 0; i < trackGroupInfos.size(); i++) { @@ -240,7 +243,7 @@ public final class TracksInfo implements Bundleable { return supported; } - /** Returns if at least one track of the type {@code trackType} is selected for playback. */ + /** Returns true if at least one track of the type {@code trackType} is selected for playback. */ public boolean isTypeSelected(@C.TrackType int trackType) { for (int i = 0; i < trackGroupInfos.size(); i++) { TrackGroupInfo trackGroupInfo = trackGroupInfos.get(i);