Fix some Android Studio inspection warnings
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173085316
This commit is contained in:
parent
9568802c6d
commit
9306b24c65
@ -226,7 +226,7 @@ public interface Renderer extends ExoPlayerComponent {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the renderer is ready for the {@link ExoPlayer} instance to transition to
|
* Whether the renderer is ready for the {@link ExoPlayer} instance to transition to
|
||||||
* {@link ExoPlayer#STATE_ENDED}. The player will make this transition as soon as {@code true} is
|
* {@link Player#STATE_ENDED}. The player will make this transition as soon as {@code true} is
|
||||||
* returned by all of its {@link Renderer}s.
|
* returned by all of its {@link Renderer}s.
|
||||||
* <p>
|
* <p>
|
||||||
* This method may be called when the renderer is in the following states:
|
* This method may be called when the renderer is in the following states:
|
||||||
|
@ -31,7 +31,7 @@ public interface RenderersFactory {
|
|||||||
*
|
*
|
||||||
* @param eventHandler A handler to use when invoking event listeners and outputs.
|
* @param eventHandler A handler to use when invoking event listeners and outputs.
|
||||||
* @param videoRendererEventListener An event listener for video renderers.
|
* @param videoRendererEventListener An event listener for video renderers.
|
||||||
* @param videoRendererEventListener An event listener for audio renderers.
|
* @param audioRendererEventListener An event listener for audio renderers.
|
||||||
* @param textRendererOutput An output for text renderers.
|
* @param textRendererOutput An output for text renderers.
|
||||||
* @param metadataRendererOutput An output for metadata renderers.
|
* @param metadataRendererOutput An output for metadata renderers.
|
||||||
* @return The {@link Renderer instances}.
|
* @return The {@link Renderer instances}.
|
||||||
|
@ -202,8 +202,7 @@ public interface AudioSink {
|
|||||||
* @param trimStartSamples The number of audio samples to trim from the start of data written to
|
* @param trimStartSamples The number of audio samples to trim from the start of data written to
|
||||||
* the sink after this call.
|
* the sink after this call.
|
||||||
* @param trimEndSamples The number of audio samples to trim from data written to the sink
|
* @param trimEndSamples The number of audio samples to trim from data written to the sink
|
||||||
* immediately preceding the next call to {@link #reset()} or
|
* immediately preceding the next call to {@link #reset()} or this method.
|
||||||
* {@link #configure(String, int, int, int, int, int[], int, int)}.
|
|
||||||
* @throws ConfigurationException If an error occurs configuring the sink.
|
* @throws ConfigurationException If an error occurs configuring the sink.
|
||||||
*/
|
*/
|
||||||
void configure(String inputMimeType, int inputChannelCount, int inputSampleRate,
|
void configure(String inputMimeType, int inputChannelCount, int inputSampleRate,
|
||||||
|
@ -86,6 +86,7 @@ import java.util.UUID;
|
|||||||
|
|
||||||
/* package */ final MediaDrmCallback callback;
|
/* package */ final MediaDrmCallback callback;
|
||||||
/* package */ final UUID uuid;
|
/* package */ final UUID uuid;
|
||||||
|
/* package */ final PostResponseHandler postResponseHandler;
|
||||||
|
|
||||||
private @DrmSession.State int state;
|
private @DrmSession.State int state;
|
||||||
private int openCount;
|
private int openCount;
|
||||||
@ -96,8 +97,6 @@ import java.util.UUID;
|
|||||||
private byte[] sessionId;
|
private byte[] sessionId;
|
||||||
private byte[] offlineLicenseKeySetId;
|
private byte[] offlineLicenseKeySetId;
|
||||||
|
|
||||||
/* package */ PostResponseHandler postResponseHandler;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new DRM session.
|
* Instantiates a new DRM session.
|
||||||
*
|
*
|
||||||
|
@ -205,7 +205,7 @@ public interface ExoMediaDrm<T extends ExoMediaCrypto> {
|
|||||||
*
|
*
|
||||||
* @param initData Opaque initialization data specific to the crypto scheme.
|
* @param initData Opaque initialization data specific to the crypto scheme.
|
||||||
* @return An object extends {@link ExoMediaCrypto}, using opaque crypto scheme specific data.
|
* @return An object extends {@link ExoMediaCrypto}, using opaque crypto scheme specific data.
|
||||||
* @throws MediaCryptoException
|
* @throws MediaCryptoException If the instance can't be created.
|
||||||
*/
|
*/
|
||||||
T createMediaCrypto(byte[] initData) throws MediaCryptoException;
|
T createMediaCrypto(byte[] initData) throws MediaCryptoException;
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ public final class MatroskaExtractor implements Extractor {
|
|||||||
* The value by which to divide a time in microseconds to convert it to the unit of the last value
|
* The value by which to divide a time in microseconds to convert it to the unit of the last value
|
||||||
* in a subrip timecode (milliseconds).
|
* in a subrip timecode (milliseconds).
|
||||||
*/
|
*/
|
||||||
private static long SUBRIP_TIMECODE_LAST_VALUE_SCALING_FACTOR = 1000;
|
private static final long SUBRIP_TIMECODE_LAST_VALUE_SCALING_FACTOR = 1000;
|
||||||
/**
|
/**
|
||||||
* The format of a subrip timecode.
|
* The format of a subrip timecode.
|
||||||
*/
|
*/
|
||||||
@ -270,7 +270,7 @@ public final class MatroskaExtractor implements Extractor {
|
|||||||
* The value by which to divide a time in microseconds to convert it to the unit of the last value
|
* The value by which to divide a time in microseconds to convert it to the unit of the last value
|
||||||
* in an SSA timecode (1/100ths of a second).
|
* in an SSA timecode (1/100ths of a second).
|
||||||
*/
|
*/
|
||||||
private static long SSA_TIMECODE_LAST_VALUE_SCALING_FACTOR = 10000;
|
private static final long SSA_TIMECODE_LAST_VALUE_SCALING_FACTOR = 10000;
|
||||||
/**
|
/**
|
||||||
* A special end timecode indicating that an SSA subtitle should be displayed until the next
|
* A special end timecode indicating that an SSA subtitle should be displayed until the next
|
||||||
* subtitle, or until the end of the media in the case of the last subtitle.
|
* subtitle, or until the end of the media in the case of the last subtitle.
|
||||||
|
@ -28,7 +28,6 @@ import com.google.android.exoplayer2.extractor.PositionHolder;
|
|||||||
import com.google.android.exoplayer2.extractor.SeekMap;
|
import com.google.android.exoplayer2.extractor.SeekMap;
|
||||||
import com.google.android.exoplayer2.extractor.TrackOutput;
|
import com.google.android.exoplayer2.extractor.TrackOutput;
|
||||||
import com.google.android.exoplayer2.extractor.mp4.Atom.ContainerAtom;
|
import com.google.android.exoplayer2.extractor.mp4.Atom.ContainerAtom;
|
||||||
import com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags;
|
|
||||||
import com.google.android.exoplayer2.metadata.Metadata;
|
import com.google.android.exoplayer2.metadata.Metadata;
|
||||||
import com.google.android.exoplayer2.util.Assertions;
|
import com.google.android.exoplayer2.util.Assertions;
|
||||||
import com.google.android.exoplayer2.util.NalUnitUtil;
|
import com.google.android.exoplayer2.util.NalUnitUtil;
|
||||||
|
@ -101,8 +101,8 @@ public final class ChapterTocFrame extends Id3Frame {
|
|||||||
dest.writeByte((byte) (isOrdered ? 1 : 0));
|
dest.writeByte((byte) (isOrdered ? 1 : 0));
|
||||||
dest.writeStringArray(children);
|
dest.writeStringArray(children);
|
||||||
dest.writeInt(subFrames.length);
|
dest.writeInt(subFrames.length);
|
||||||
for (int i = 0; i < subFrames.length; i++) {
|
for (Id3Frame subFrame : subFrames) {
|
||||||
dest.writeParcelable(subFrames[i], 0);
|
dest.writeParcelable(subFrame, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,6 @@ public final class ClippingMediaSource implements MediaSource, MediaSource.Liste
|
|||||||
private final ArrayList<ClippingMediaPeriod> mediaPeriods;
|
private final ArrayList<ClippingMediaPeriod> mediaPeriods;
|
||||||
|
|
||||||
private MediaSource.Listener sourceListener;
|
private MediaSource.Listener sourceListener;
|
||||||
private ClippingTimeline clippingTimeline;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new clipping source that wraps the specified source.
|
* Creates a new clipping source that wraps the specified source.
|
||||||
@ -117,8 +116,7 @@ public final class ClippingMediaSource implements MediaSource, MediaSource.Liste
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSourceInfoRefreshed(Timeline timeline, Object manifest) {
|
public void onSourceInfoRefreshed(Timeline timeline, Object manifest) {
|
||||||
clippingTimeline = new ClippingTimeline(timeline, startUs, endUs);
|
sourceListener.onSourceInfoRefreshed(new ClippingTimeline(timeline, startUs, endUs), manifest);
|
||||||
sourceListener.onSourceInfoRefreshed(clippingTimeline, manifest);
|
|
||||||
int count = mediaPeriods.size();
|
int count = mediaPeriods.size();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
mediaPeriods.get(i).setClipping(startUs, endUs);
|
mediaPeriods.get(i).setClipping(startUs, endUs);
|
||||||
|
@ -40,10 +40,10 @@ public final class ConcatenatingMediaSource implements MediaSource {
|
|||||||
private final Map<MediaPeriod, Integer> sourceIndexByMediaPeriod;
|
private final Map<MediaPeriod, Integer> sourceIndexByMediaPeriod;
|
||||||
private final boolean[] duplicateFlags;
|
private final boolean[] duplicateFlags;
|
||||||
private final boolean isAtomic;
|
private final boolean isAtomic;
|
||||||
|
private final ShuffleOrder shuffleOrder;
|
||||||
|
|
||||||
private Listener listener;
|
private Listener listener;
|
||||||
private ConcatenatedTimeline timeline;
|
private ConcatenatedTimeline timeline;
|
||||||
private ShuffleOrder shuffleOrder;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mediaSources The {@link MediaSource}s to concatenate. It is valid for the same
|
* @param mediaSources The {@link MediaSource}s to concatenate. It is valid for the same
|
||||||
|
@ -19,7 +19,6 @@ import android.net.Uri;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import com.google.android.exoplayer2.C;
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.ExoPlayer;
|
import com.google.android.exoplayer2.ExoPlayer;
|
||||||
import com.google.android.exoplayer2.Timeline;
|
|
||||||
import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory;
|
import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory;
|
||||||
import com.google.android.exoplayer2.extractor.Extractor;
|
import com.google.android.exoplayer2.extractor.Extractor;
|
||||||
import com.google.android.exoplayer2.extractor.ExtractorsFactory;
|
import com.google.android.exoplayer2.extractor.ExtractorsFactory;
|
||||||
@ -84,7 +83,6 @@ public final class ExtractorMediaSource implements MediaSource, ExtractorMediaPe
|
|||||||
private final int minLoadableRetryCount;
|
private final int minLoadableRetryCount;
|
||||||
private final Handler eventHandler;
|
private final Handler eventHandler;
|
||||||
private final EventListener eventListener;
|
private final EventListener eventListener;
|
||||||
private final Timeline.Period period;
|
|
||||||
private final String customCacheKey;
|
private final String customCacheKey;
|
||||||
private final int continueLoadingCheckIntervalBytes;
|
private final int continueLoadingCheckIntervalBytes;
|
||||||
|
|
||||||
@ -149,7 +147,6 @@ public final class ExtractorMediaSource implements MediaSource, ExtractorMediaPe
|
|||||||
this.eventListener = eventListener;
|
this.eventListener = eventListener;
|
||||||
this.customCacheKey = customCacheKey;
|
this.customCacheKey = customCacheKey;
|
||||||
this.continueLoadingCheckIntervalBytes = continueLoadingCheckIntervalBytes;
|
this.continueLoadingCheckIntervalBytes = continueLoadingCheckIntervalBytes;
|
||||||
period = new Timeline.Period();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -187,7 +184,7 @@ public final class ExtractorMediaSource implements MediaSource, ExtractorMediaPe
|
|||||||
public void onSourceInfoRefreshed(long durationUs, boolean isSeekable) {
|
public void onSourceInfoRefreshed(long durationUs, boolean isSeekable) {
|
||||||
// If we already have the duration from a previous source info refresh, use it.
|
// If we already have the duration from a previous source info refresh, use it.
|
||||||
durationUs = durationUs == C.TIME_UNSET ? timelineDurationUs : durationUs;
|
durationUs = durationUs == C.TIME_UNSET ? timelineDurationUs : durationUs;
|
||||||
if (timelineDurationUs == durationUs && timelineIsSeekable == isSeekable
|
if ((timelineDurationUs == durationUs && timelineIsSeekable == isSeekable)
|
||||||
|| (timelineDurationUs != C.TIME_UNSET && durationUs == C.TIME_UNSET)) {
|
|| (timelineDurationUs != C.TIME_UNSET && durationUs == C.TIME_UNSET)) {
|
||||||
// Suppress no-op source info changes.
|
// Suppress no-op source info changes.
|
||||||
return;
|
return;
|
||||||
|
@ -82,7 +82,7 @@ public final class CeaUtil {
|
|||||||
* number of 0xFF bytes and T is the value of the terminating byte.
|
* number of 0xFF bytes and T is the value of the terminating byte.
|
||||||
*
|
*
|
||||||
* @param buffer The buffer from which to read the value.
|
* @param buffer The buffer from which to read the value.
|
||||||
* @returns The read value, or -1 if the end of the buffer is reached before a value is read.
|
* @return The read value, or -1 if the end of the buffer is reached before a value is read.
|
||||||
*/
|
*/
|
||||||
private static int readNon255TerminatedValue(ParsableByteArray buffer) {
|
private static int readNon255TerminatedValue(ParsableByteArray buffer) {
|
||||||
int b;
|
int b;
|
||||||
|
@ -1094,7 +1094,7 @@ public class DefaultTrackSelector extends MappingTrackSelector {
|
|||||||
*
|
*
|
||||||
* @param other The other score to compare to.
|
* @param other The other score to compare to.
|
||||||
* @return A positive integer if this score is better than the other. Zero if they are
|
* @return A positive integer if this score is better than the other. Zero if they are
|
||||||
* equal. A negative integer if this score is worse than the other.
|
* equal. A negative integer if this score is worse than the other.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(AudioTrackScore other) {
|
public int compareTo(AudioTrackScore other) {
|
||||||
|
@ -140,7 +140,7 @@ public interface Cache {
|
|||||||
* @param key The key of the data being requested.
|
* @param key The key of the data being requested.
|
||||||
* @param position The position of the data being requested.
|
* @param position The position of the data being requested.
|
||||||
* @return The {@link CacheSpan}.
|
* @return The {@link CacheSpan}.
|
||||||
* @throws InterruptedException
|
* @throws InterruptedException If the thread was interrupted.
|
||||||
*/
|
*/
|
||||||
CacheSpan startReadWrite(String key, long position) throws InterruptedException, CacheException;
|
CacheSpan startReadWrite(String key, long position) throws InterruptedException, CacheException;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ import junit.framework.TestCase;
|
|||||||
*/
|
*/
|
||||||
public class SsManifestTest extends TestCase {
|
public class SsManifestTest extends TestCase {
|
||||||
|
|
||||||
private static ProtectionElement DUMMY_PROTECTION_ELEMENT =
|
private static final ProtectionElement DUMMY_PROTECTION_ELEMENT =
|
||||||
new ProtectionElement(C.WIDEVINE_UUID, new byte[] {0, 1, 2});
|
new ProtectionElement(C.WIDEVINE_UUID, new byte[] {0, 1, 2});
|
||||||
|
|
||||||
public void testCopy() throws Exception {
|
public void testCopy() throws Exception {
|
||||||
|
@ -21,6 +21,6 @@
|
|||||||
<path
|
<path
|
||||||
android:fillColor="#FFFFFFFF"
|
android:fillColor="#FFFFFFFF"
|
||||||
android:pathData="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20
|
android:pathData="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20
|
||||||
17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04
|
17.96 7.46 20 9.5V4h-5.5zm0.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04
|
||||||
2.04-3.13-3.13z" />
|
2.04-3.13-3.13z" />
|
||||||
</vector>
|
</vector>
|
||||||
|
@ -170,7 +170,7 @@ public final class DashDownloadTest extends ActivityInstrumentationTestCase2<Hos
|
|||||||
|
|
||||||
private static class TestProgressListener implements ProgressListener {
|
private static class TestProgressListener implements ProgressListener {
|
||||||
|
|
||||||
private float stopAt;
|
private final float stopAt;
|
||||||
|
|
||||||
private TestProgressListener(float stopAt) {
|
private TestProgressListener(float stopAt) {
|
||||||
this.stopAt = stopAt;
|
this.stopAt = stopAt;
|
||||||
|
@ -134,7 +134,7 @@ public class FakeSimpleExoPlayer extends SimpleExoPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setPlayWhenReady(boolean playWhenReady) {
|
public void setPlayWhenReady(boolean playWhenReady) {
|
||||||
if (playWhenReady != true) {
|
if (!playWhenReady) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ public class FakeSimpleExoPlayer extends SimpleExoPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void prepare(final MediaSource mediaSource, boolean resetPosition, boolean resetState) {
|
public void prepare(final MediaSource mediaSource, boolean resetPosition, boolean resetState) {
|
||||||
if (resetPosition != true || resetState != true) {
|
if (!resetPosition || !resetState) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
this.mediaSource = mediaSource;
|
this.mediaSource = mediaSource;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user