mirror of
https://github.com/androidx/media.git
synced 2025-05-14 02:59:52 +08:00
Fix some more lint issues
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=209947034
This commit is contained in:
parent
2a9d5c21e2
commit
4d8a5c44b3
@ -430,7 +430,7 @@ public interface Player {
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({REPEAT_MODE_OFF, REPEAT_MODE_ONE, REPEAT_MODE_ALL})
|
||||
public @interface RepeatMode {}
|
||||
@interface RepeatMode {}
|
||||
/**
|
||||
* Normal playback without repetition.
|
||||
*/
|
||||
@ -457,7 +457,7 @@ public interface Player {
|
||||
DISCONTINUITY_REASON_AD_INSERTION,
|
||||
DISCONTINUITY_REASON_INTERNAL
|
||||
})
|
||||
public @interface DiscontinuityReason {}
|
||||
@interface DiscontinuityReason {}
|
||||
/**
|
||||
* Automatic playback transition from one period in the timeline to the next. The period index may
|
||||
* be the same as it was before the discontinuity in case the current period is repeated.
|
||||
@ -485,7 +485,7 @@ public interface Player {
|
||||
TIMELINE_CHANGE_REASON_RESET,
|
||||
TIMELINE_CHANGE_REASON_DYNAMIC
|
||||
})
|
||||
public @interface TimelineChangeReason {}
|
||||
@interface TimelineChangeReason {}
|
||||
/**
|
||||
* Timeline and manifest changed as a result of a player initialization with new media.
|
||||
*/
|
||||
|
@ -40,7 +40,7 @@ public interface Renderer extends PlayerMessage.Target {
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({STATE_DISABLED, STATE_ENABLED, STATE_STARTED})
|
||||
public @interface State {}
|
||||
@interface State {}
|
||||
/**
|
||||
* The renderer is disabled.
|
||||
*/
|
||||
|
@ -45,7 +45,7 @@ public interface DrmSession<T extends ExoMediaCrypto> {
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({STATE_RELEASED, STATE_ERROR, STATE_OPENING, STATE_OPENED, STATE_OPENED_WITH_KEYS})
|
||||
public @interface State {}
|
||||
@interface State {}
|
||||
/**
|
||||
* The session has been released.
|
||||
*/
|
||||
|
@ -227,7 +227,7 @@ public final class FrameworkMediaDrm implements ExoMediaDrm<FrameworkMediaCrypto
|
||||
}
|
||||
|
||||
@SuppressLint("WrongConstant") // Suppress spurious lint error [Internal ref: b/32137960]
|
||||
private static final void forceWidevineL3(MediaDrm mediaDrm) {
|
||||
private static void forceWidevineL3(MediaDrm mediaDrm) {
|
||||
mediaDrm.setPropertyString("securityLevel", "L3");
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ public interface Extractor {
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef(value = {RESULT_CONTINUE, RESULT_SEEK, RESULT_END_OF_INPUT})
|
||||
public @interface ReadResult {}
|
||||
@interface ReadResult {}
|
||||
|
||||
/**
|
||||
* Returns whether this extractor can extract samples from the {@link ExtractorInput}, which must
|
||||
|
@ -16,6 +16,7 @@
|
||||
package com.google.android.exoplayer2.util;
|
||||
|
||||
import android.Manifest.permission;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
@ -1553,7 +1554,7 @@ public final class Util {
|
||||
* and is not declared to be thrown.
|
||||
*/
|
||||
public static void sneakyThrow(Throwable t) {
|
||||
Util.<RuntimeException>sneakyThrowInternal(t);
|
||||
Util.sneakyThrowInternal(t);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@ -1749,6 +1750,7 @@ public final class Util {
|
||||
// Attempt to read sys.display-size.
|
||||
String sysDisplaySize = null;
|
||||
try {
|
||||
@SuppressLint("PrivateApi")
|
||||
Class<?> systemProperties = Class.forName("android.os.SystemProperties");
|
||||
Method getMethod = systemProperties.getMethod("get", String.class);
|
||||
sysDisplaySize = (String) getMethod.invoke(systemProperties, "sys.display-size");
|
||||
|
@ -97,7 +97,7 @@ public final class ConcatenatingMediaSourceTest {
|
||||
|
||||
// Add bulk.
|
||||
mediaSource.addMediaSources(
|
||||
3, Arrays.<MediaSource>asList(childSources[4], childSources[5], childSources[6]));
|
||||
3, Arrays.asList(childSources[4], childSources[5], childSources[6]));
|
||||
timeline = testRunner.assertTimelineChangeBlocking();
|
||||
TimelineAsserts.assertPeriodCounts(timeline, 2, 4, 1, 5, 6, 7, 3);
|
||||
TimelineAsserts.assertWindowTags(timeline, 222, 444, 111, 555, 666, 777, 333);
|
||||
@ -375,7 +375,7 @@ public final class ConcatenatingMediaSourceTest {
|
||||
};
|
||||
Timeline nonEmptyTimeline = new FakeTimeline(/* windowCount = */ 1);
|
||||
|
||||
mediaSource.addMediaSources(Arrays.<MediaSource>asList(childSources));
|
||||
mediaSource.addMediaSources(Arrays.asList(childSources));
|
||||
Timeline timeline = testRunner.prepareSource();
|
||||
TimelineAsserts.assertEmpty(timeline);
|
||||
|
||||
@ -642,7 +642,7 @@ public final class ConcatenatingMediaSourceTest {
|
||||
ConcatenatingMediaSource mediaSource =
|
||||
new ConcatenatingMediaSource(/* isAtomic= */ true, new FakeShuffleOrder(0));
|
||||
testRunner = new MediaSourceTestRunner(mediaSource, null);
|
||||
mediaSource.addMediaSources(Arrays.<MediaSource>asList(createMediaSources(3)));
|
||||
mediaSource.addMediaSources(Arrays.asList(createMediaSources(3)));
|
||||
Timeline timeline = testRunner.prepareSource();
|
||||
TimelineAsserts.assertWindowTags(timeline, 111, 222, 333);
|
||||
TimelineAsserts.assertPeriodCounts(timeline, 1, 2, 3);
|
||||
@ -747,7 +747,7 @@ public final class ConcatenatingMediaSourceTest {
|
||||
mediaSource.addMediaSource(childSource);
|
||||
mediaSource.addMediaSource(childSource);
|
||||
testRunner.prepareSource();
|
||||
mediaSource.addMediaSources(Arrays.<MediaSource>asList(childSource, childSource));
|
||||
mediaSource.addMediaSources(Arrays.asList(childSource, childSource));
|
||||
Timeline timeline = testRunner.assertTimelineChangeBlocking();
|
||||
|
||||
TimelineAsserts.assertPeriodCounts(timeline, 1, 1, 1, 1, 1, 1, 1, 1);
|
||||
@ -780,7 +780,7 @@ public final class ConcatenatingMediaSourceTest {
|
||||
|
||||
testRunner.prepareSource();
|
||||
mediaSource.addMediaSources(
|
||||
Arrays.<MediaSource>asList(childSource, nestedConcatenation, nestedConcatenation));
|
||||
Arrays.asList(childSource, nestedConcatenation, nestedConcatenation));
|
||||
testRunner.assertTimelineChangeBlocking();
|
||||
nestedConcatenation.addMediaSource(childSource);
|
||||
testRunner.assertTimelineChangeBlocking();
|
||||
|
@ -76,8 +76,13 @@ public class FakeAdaptiveMediaPeriod extends FakeMediaPeriod
|
||||
}
|
||||
|
||||
@Override
|
||||
public long selectTracks(TrackSelection[] selections, boolean[] mayRetainStreamFlags,
|
||||
SampleStream[] streams, boolean[] streamResetFlags, long positionUs) {
|
||||
@SuppressWarnings("unchecked")
|
||||
public long selectTracks(
|
||||
TrackSelection[] selections,
|
||||
boolean[] mayRetainStreamFlags,
|
||||
SampleStream[] streams,
|
||||
boolean[] streamResetFlags,
|
||||
long positionUs) {
|
||||
long returnPositionUs = super.selectTracks(selections, mayRetainStreamFlags, streams,
|
||||
streamResetFlags, positionUs);
|
||||
List<ChunkSampleStream<FakeChunkSource>> validStreams = new ArrayList<>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user