mirror of
https://github.com/androidx/media.git
synced 2025-05-04 22:20:47 +08:00
Fix 19 ErrorProneStyle findings:
* Non-standard parameter comment; prefer `/* paramName= */ arg` (see http://go/bugpattern/ParameterComment) (19 times) This CL looks good? Just LGTM and Approve it! This CL doesn’t look good? This is what you can do: * Revert this CL, by replying "REVERT: <provide reason>" * File a bug under go/error-prone-bug for category ErrorProneStyle if there's an issue with the CL content. * File a bug under go/rosie-bug if there's an issue with how the CL was managed. * Revert this CL and not get a CL that cleans up these paths in the future by replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to opt out the respective paths in your CL Robot configuration instead: go/clrobot-opt-out. This CL was generated by CL Robot - a tool that cleans up code findings (go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/media/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/media/METADATA. Anything wrong with the signup? File a bug at go/clrobot-bug. #codehealth Tested: Local presubmit tests passed. PiperOrigin-RevId: 471022923 (cherry picked from commit 674b3d4575ae6fdb59ae9db58be52151bbcae3a6)
This commit is contained in:
parent
8e90496df5
commit
fc8edfcd48
@ -1222,10 +1222,10 @@ public final class ExoPlayerTest {
|
|||||||
new ActionSchedule.Builder(TAG)
|
new ActionSchedule.Builder(TAG)
|
||||||
.pause()
|
.pause()
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.executeRunnable(() -> mediaSource.setNewSourceInfo(timeline2))
|
.executeRunnable(() -> mediaSource.setNewSourceInfo(timeline2))
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline2, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline2, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.play()
|
.play()
|
||||||
.build();
|
.build();
|
||||||
ExoPlayerTestRunner testRunner =
|
ExoPlayerTestRunner testRunner =
|
||||||
@ -1748,7 +1748,7 @@ public final class ExoPlayerTest {
|
|||||||
.playUntilPosition(/* mediaItemIndex= */ 0, /* positionMs= */ 2000)
|
.playUntilPosition(/* mediaItemIndex= */ 0, /* positionMs= */ 2000)
|
||||||
.setMediaSources(/* mediaItemIndex= */ 0, /* positionMs= */ 2000, secondSource)
|
.setMediaSources(/* mediaItemIndex= */ 0, /* positionMs= */ 2000, secondSource)
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
secondTimeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
secondTimeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -1802,7 +1802,7 @@ public final class ExoPlayerTest {
|
|||||||
.playUntilPosition(/* mediaItemIndex= */ 0, /* positionMs= */ 2000)
|
.playUntilPosition(/* mediaItemIndex= */ 0, /* positionMs= */ 2000)
|
||||||
.setMediaSources(/* resetPosition= */ true, secondSource)
|
.setMediaSources(/* resetPosition= */ true, secondSource)
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
secondTimeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
secondTimeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -1859,7 +1859,7 @@ public final class ExoPlayerTest {
|
|||||||
.playUntilPosition(/* mediaItemIndex= */ 0, /* positionMs= */ 2000)
|
.playUntilPosition(/* mediaItemIndex= */ 0, /* positionMs= */ 2000)
|
||||||
.setMediaSources(secondSource)
|
.setMediaSources(secondSource)
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
secondTimeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
secondTimeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.executeRunnable(
|
.executeRunnable(
|
||||||
new PlayerRunnable() {
|
new PlayerRunnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -2296,7 +2296,7 @@ public final class ExoPlayerTest {
|
|||||||
new ActionSchedule.Builder(TAG)
|
new ActionSchedule.Builder(TAG)
|
||||||
.pause()
|
.pause()
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.sendMessage(target, /* positionMs= */ 50)
|
.sendMessage(target, /* positionMs= */ 50)
|
||||||
.play()
|
.play()
|
||||||
.build();
|
.build();
|
||||||
@ -2485,7 +2485,7 @@ public final class ExoPlayerTest {
|
|||||||
.waitForPlaybackState(Player.STATE_BUFFERING)
|
.waitForPlaybackState(Player.STATE_BUFFERING)
|
||||||
.sendMessage(target, /* positionMs= */ 50)
|
.sendMessage(target, /* positionMs= */ 50)
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.seek(/* positionMs= */ 50)
|
.seek(/* positionMs= */ 50)
|
||||||
.build();
|
.build();
|
||||||
new ExoPlayerTestRunner.Builder(context)
|
new ExoPlayerTestRunner.Builder(context)
|
||||||
@ -2525,7 +2525,7 @@ public final class ExoPlayerTest {
|
|||||||
.pause()
|
.pause()
|
||||||
.sendMessage(target, /* positionMs= */ 50)
|
.sendMessage(target, /* positionMs= */ 50)
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.seek(/* positionMs= */ 51)
|
.seek(/* positionMs= */ 51)
|
||||||
.play()
|
.play()
|
||||||
.build();
|
.build();
|
||||||
@ -2602,11 +2602,11 @@ public final class ExoPlayerTest {
|
|||||||
new ActionSchedule.Builder(TAG)
|
new ActionSchedule.Builder(TAG)
|
||||||
.pause()
|
.pause()
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.sendMessage(target, /* positionMs= */ 50)
|
.sendMessage(target, /* positionMs= */ 50)
|
||||||
.executeRunnable(() -> mediaSource.setNewSourceInfo(secondTimeline))
|
.executeRunnable(() -> mediaSource.setNewSourceInfo(secondTimeline))
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
secondTimeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
secondTimeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.play()
|
.play()
|
||||||
.build();
|
.build();
|
||||||
new ExoPlayerTestRunner.Builder(context)
|
new ExoPlayerTestRunner.Builder(context)
|
||||||
@ -2648,7 +2648,7 @@ public final class ExoPlayerTest {
|
|||||||
new ActionSchedule.Builder(TAG)
|
new ActionSchedule.Builder(TAG)
|
||||||
.pause()
|
.pause()
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.sendMessage(target, /* mediaItemIndex = */ 2, /* positionMs= */ 50)
|
.sendMessage(target, /* mediaItemIndex = */ 2, /* positionMs= */ 50)
|
||||||
.play()
|
.play()
|
||||||
.build();
|
.build();
|
||||||
@ -2679,11 +2679,11 @@ public final class ExoPlayerTest {
|
|||||||
new ActionSchedule.Builder(TAG)
|
new ActionSchedule.Builder(TAG)
|
||||||
.pause()
|
.pause()
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.sendMessage(target, /* mediaItemIndex = */ 1, /* positionMs= */ 50)
|
.sendMessage(target, /* mediaItemIndex = */ 1, /* positionMs= */ 50)
|
||||||
.executeRunnable(() -> mediaSource.setNewSourceInfo(secondTimeline))
|
.executeRunnable(() -> mediaSource.setNewSourceInfo(secondTimeline))
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
secondTimeline, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
secondTimeline, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.seek(/* mediaItemIndex= */ 0, /* positionMs= */ 0)
|
.seek(/* mediaItemIndex= */ 0, /* positionMs= */ 0)
|
||||||
.play()
|
.play()
|
||||||
.build();
|
.build();
|
||||||
@ -2893,7 +2893,7 @@ public final class ExoPlayerTest {
|
|||||||
/* positionMs= */ Util.usToMs(TimelineWindowDefinition.DEFAULT_WINDOW_DURATION_US))
|
/* positionMs= */ Util.usToMs(TimelineWindowDefinition.DEFAULT_WINDOW_DURATION_US))
|
||||||
.executeRunnable(() -> mediaSource.setNewSourceInfo(timeline2))
|
.executeRunnable(() -> mediaSource.setNewSourceInfo(timeline2))
|
||||||
.waitForTimelineChanged(
|
.waitForTimelineChanged(
|
||||||
timeline2, /* expectedReason */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
timeline2, /* expectedReason= */ Player.TIMELINE_CHANGE_REASON_SOURCE_UPDATE)
|
||||||
.play()
|
.play()
|
||||||
.build();
|
.build();
|
||||||
ExoPlayerTestRunner testRunner =
|
ExoPlayerTestRunner testRunner =
|
||||||
@ -9368,7 +9368,7 @@ public final class ExoPlayerTest {
|
|||||||
Player.Commands defaultCommands = createWithDefaultCommands();
|
Player.Commands defaultCommands = createWithDefaultCommands();
|
||||||
Player.Commands commandsWithSeekToNextWindow =
|
Player.Commands commandsWithSeekToNextWindow =
|
||||||
createWithDefaultCommands(COMMAND_SEEK_TO_NEXT_MEDIA_ITEM, COMMAND_SEEK_TO_NEXT);
|
createWithDefaultCommands(COMMAND_SEEK_TO_NEXT_MEDIA_ITEM, COMMAND_SEEK_TO_NEXT);
|
||||||
Player.Commands emptyTimelineCommands = createWithDefaultCommands(/* isTimelineEmpty */ true);
|
Player.Commands emptyTimelineCommands = createWithDefaultCommands(/* isTimelineEmpty= */ true);
|
||||||
Player.Listener mockListener = mock(Player.Listener.class);
|
Player.Listener mockListener = mock(Player.Listener.class);
|
||||||
ExoPlayer player = new TestExoPlayerBuilder(context).build();
|
ExoPlayer player = new TestExoPlayerBuilder(context).build();
|
||||||
player.addListener(mockListener);
|
player.addListener(mockListener);
|
||||||
@ -9396,7 +9396,7 @@ public final class ExoPlayerTest {
|
|||||||
Player.Commands defaultCommands = createWithDefaultCommands();
|
Player.Commands defaultCommands = createWithDefaultCommands();
|
||||||
Player.Commands commandsWithSeekToPreviousWindow =
|
Player.Commands commandsWithSeekToPreviousWindow =
|
||||||
createWithDefaultCommands(COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM);
|
createWithDefaultCommands(COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM);
|
||||||
Player.Commands emptyTimelineCommands = createWithDefaultCommands(/* isTimelineEmpty */ true);
|
Player.Commands emptyTimelineCommands = createWithDefaultCommands(/* isTimelineEmpty= */ true);
|
||||||
Player.Listener mockListener = mock(Player.Listener.class);
|
Player.Listener mockListener = mock(Player.Listener.class);
|
||||||
ExoPlayer player = new TestExoPlayerBuilder(context).build();
|
ExoPlayer player = new TestExoPlayerBuilder(context).build();
|
||||||
player.addListener(mockListener);
|
player.addListener(mockListener);
|
||||||
@ -10089,7 +10089,7 @@ public final class ExoPlayerTest {
|
|||||||
// Verify test setup (now = 20 seconds in live window, default start position = 20 seconds).
|
// Verify test setup (now = 20 seconds in live window, default start position = 20 seconds).
|
||||||
assertThat(liveOffsetAtStart).isIn(Range.closed(-100L, 100L));
|
assertThat(liveOffsetAtStart).isIn(Range.closed(-100L, 100L));
|
||||||
|
|
||||||
player.setPlaybackParameters(new PlaybackParameters(/* speed */ 2.0f));
|
player.setPlaybackParameters(new PlaybackParameters(/* speed= */ 2.0f));
|
||||||
// Play until close to the end of the available live window.
|
// Play until close to the end of the available live window.
|
||||||
TestPlayerRunHelper.playUntilPosition(
|
TestPlayerRunHelper.playUntilPosition(
|
||||||
player, /* mediaItemIndex= */ 0, /* positionMs= */ 999_000);
|
player, /* mediaItemIndex= */ 0, /* positionMs= */ 999_000);
|
||||||
|
@ -1081,7 +1081,7 @@ public final class MediaPeriodQueueTest {
|
|||||||
mediaSourceList.setMediaSources(
|
mediaSourceList.setMediaSources(
|
||||||
ImmutableList.of(mediaSourceHolder), new FakeShuffleOrder(/* length= */ 1));
|
ImmutableList.of(mediaSourceHolder), new FakeShuffleOrder(/* length= */ 1));
|
||||||
mediaSourceHolder.mediaSource.prepareSource(
|
mediaSourceHolder.mediaSource.prepareSource(
|
||||||
mock(MediaSourceCaller.class), /* mediaTransferListener */ null, PlayerId.UNSET);
|
mock(MediaSourceCaller.class), /* mediaTransferListener= */ null, PlayerId.UNSET);
|
||||||
|
|
||||||
Timeline playlistTimeline = mediaSourceList.createTimeline();
|
Timeline playlistTimeline = mediaSourceList.createTimeline();
|
||||||
firstPeriodUid = playlistTimeline.getUidOfPeriod(/* periodIndex= */ 0);
|
firstPeriodUid = playlistTimeline.getUidOfPeriod(/* periodIndex= */ 0);
|
||||||
|
@ -371,7 +371,7 @@ public class MediaSourceListTest {
|
|||||||
mockMediaSource2,
|
mockMediaSource2,
|
||||||
mockMediaSource3,
|
mockMediaSource3,
|
||||||
mockMediaSource4);
|
mockMediaSource4);
|
||||||
mediaSourceList.prepare(/* mediaTransferListener */ null);
|
mediaSourceList.prepare(/* mediaTransferListener= */ null);
|
||||||
mediaSourceList.addMediaSources(/* index= */ 0, holders, shuffleOrder);
|
mediaSourceList.addMediaSources(/* index= */ 0, holders, shuffleOrder);
|
||||||
mediaSourceList.removeMediaSourceRange(/* fromIndex= */ 1, /* toIndex= */ 3, shuffleOrder);
|
mediaSourceList.removeMediaSourceRange(/* fromIndex= */ 1, /* toIndex= */ 3, shuffleOrder);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user