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
This commit is contained in:
parent
a36e0cf255
commit
66c272c9b0
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user