Clarify PlaybackParameters constructor range.

PiperOrigin-RevId: 476937845
This commit is contained in:
samrobinson 2022-09-26 17:51:43 +00:00 committed by Marc Baechinger
parent 3e4aa050da
commit 7c055c9676
2 changed files with 2 additions and 2 deletions

View File

@ -602,7 +602,7 @@ package androidx.media3.common {
}
public final class PlaybackParameters {
ctor public PlaybackParameters(float);
ctor public PlaybackParameters(@FloatRange(from=0, fromInclusive=false) float);
ctor public PlaybackParameters(@FloatRange(from=0, fromInclusive=false) float, @FloatRange(from=0, fromInclusive=false) float);
method @CheckResult public androidx.media3.common.PlaybackParameters withSpeed(@FloatRange(from=0, fromInclusive=false) float);
field public static final androidx.media3.common.PlaybackParameters DEFAULT;

View File

@ -50,7 +50,7 @@ public final class PlaybackParameters implements Bundleable {
*
* @param speed The factor by which playback will be sped up. Must be greater than zero.
*/
public PlaybackParameters(float speed) {
public PlaybackParameters(@FloatRange(from = 0, fromInclusive = false) float speed) {
this(speed, /* pitch= */ 1f);
}