mirror of
https://github.com/samsonjs/media.git
synced 2026-04-04 11:05:47 +00:00
Fix some random Android Studio warnings.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=215904019
This commit is contained in:
parent
8dedbd5748
commit
0a7745bc03
10 changed files with 18 additions and 13 deletions
|
|
@ -350,8 +350,7 @@ public class SampleChooserActivity extends Activity
|
|||
? null
|
||||
: new DrmInfo(drmScheme, drmLicenseUrl, drmKeyRequestProperties, drmMultiSession);
|
||||
if (playlistSamples != null) {
|
||||
UriSample[] playlistSamplesArray = playlistSamples.toArray(
|
||||
new UriSample[playlistSamples.size()]);
|
||||
UriSample[] playlistSamplesArray = playlistSamples.toArray(new UriSample[0]);
|
||||
return new PlaylistSample(sampleName, drmInfo, playlistSamplesArray);
|
||||
} else {
|
||||
return new UriSample(
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ public class DefaultRenderersFactory implements RenderersFactory {
|
|||
extensionRendererMode, renderersList);
|
||||
buildCameraMotionRenderers(context, extensionRendererMode, renderersList);
|
||||
buildMiscellaneousRenderers(context, eventHandler, extensionRendererMode, renderersList);
|
||||
return renderersList.toArray(new Renderer[renderersList.size()]);
|
||||
return renderersList.toArray(new Renderer[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1002,7 +1002,7 @@ import java.util.Collections;
|
|||
MediaPeriodHolder periodHolder = queue.getPlayingPeriod();
|
||||
MediaPeriodHolder readingPeriodHolder = queue.getReadingPeriod();
|
||||
boolean selectionsChangedForReadPeriod = true;
|
||||
TrackSelectorResult newTrackSelectorResult = null;
|
||||
TrackSelectorResult newTrackSelectorResult;
|
||||
while (true) {
|
||||
if (periodHolder == null || !periodHolder.prepared) {
|
||||
// The reselection did not change any prepared periods.
|
||||
|
|
|
|||
|
|
@ -351,8 +351,7 @@ public final class DefaultAudioSink implements AudioSink {
|
|||
channelMappingAudioProcessor,
|
||||
trimmingAudioProcessor);
|
||||
Collections.addAll(toIntPcmAudioProcessors, audioProcessorChain.getAudioProcessors());
|
||||
toIntPcmAvailableAudioProcessors =
|
||||
toIntPcmAudioProcessors.toArray(new AudioProcessor[toIntPcmAudioProcessors.size()]);
|
||||
toIntPcmAvailableAudioProcessors = toIntPcmAudioProcessors.toArray(new AudioProcessor[0]);
|
||||
toFloatPcmAvailableAudioProcessors = new AudioProcessor[] {new FloatResamplingAudioProcessor()};
|
||||
volume = 1.0f;
|
||||
startMediaTimeState = START_NOT_SET;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||
* @param schemeDatas Scheme initialization data for possibly multiple DRM schemes.
|
||||
*/
|
||||
public DrmInitData(List<SchemeData> schemeDatas) {
|
||||
this(null, false, schemeDatas.toArray(new SchemeData[schemeDatas.size()]));
|
||||
this(null, false, schemeDatas.toArray(new SchemeData[0]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -105,7 +105,7 @@ public final class DrmInitData implements Comparator<SchemeData>, Parcelable {
|
|||
* @param schemeDatas Scheme initialization data for possibly multiple DRM schemes.
|
||||
*/
|
||||
public DrmInitData(@Nullable String schemeType, List<SchemeData> schemeDatas) {
|
||||
this(schemeType, false, schemeDatas.toArray(new SchemeData[schemeDatas.size()]));
|
||||
this(schemeType, false, schemeDatas.toArray(new SchemeData[0]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -81,8 +81,9 @@ public abstract class BinarySearchSeeker {
|
|||
*/
|
||||
public static final class OutputFrameHolder {
|
||||
|
||||
public final ByteBuffer byteBuffer;
|
||||
|
||||
public long timeUs;
|
||||
public ByteBuffer byteBuffer;
|
||||
|
||||
/** Constructs an instance, wrapping the given byte buffer. */
|
||||
public OutputFrameHolder(ByteBuffer outputByteBuffer) {
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ public final class Mp4Extractor implements Extractor, SeekMap {
|
|||
}
|
||||
this.firstVideoTrackIndex = firstVideoTrackIndex;
|
||||
this.durationUs = durationUs;
|
||||
this.tracks = tracks.toArray(new Mp4Track[tracks.size()]);
|
||||
this.tracks = tracks.toArray(new Mp4Track[0]);
|
||||
accumulatedSampleSizes = calculateAccumulatedSampleSizes(this.tracks);
|
||||
|
||||
extractorOutput.endTracks();
|
||||
|
|
|
|||
|
|
@ -801,6 +801,7 @@ public class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHo
|
|||
|
||||
public final MediaSource mediaSource;
|
||||
public final Object uid;
|
||||
public final List<DeferredMediaPeriod> activeMediaPeriods;
|
||||
|
||||
public DeferredTimeline timeline;
|
||||
public int childIndex;
|
||||
|
|
@ -809,7 +810,6 @@ public class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHo
|
|||
public boolean hasStartedPreparing;
|
||||
public boolean isPrepared;
|
||||
public boolean isRemoved;
|
||||
public List<DeferredMediaPeriod> activeMediaPeriods;
|
||||
|
||||
public MediaSourceHolder(MediaSource mediaSource) {
|
||||
this.mediaSource = mediaSource;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ package com.google.android.exoplayer2.upstream.cache;
|
|||
import android.support.annotation.NonNull;
|
||||
import com.google.android.exoplayer2.extractor.ChunkIndex;
|
||||
import com.google.android.exoplayer2.util.Log;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.NavigableSet;
|
||||
|
|
@ -195,8 +196,7 @@ public final class CachedRegionTracker implements Cache.Listener {
|
|||
|
||||
@Override
|
||||
public int compareTo(@NonNull Region another) {
|
||||
return startOffset < another.startOffset ? -1
|
||||
: startOffset == another.startOffset ? 0 : 1;
|
||||
return Util.compareLong(startOffset, another.startOffset);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1032,6 +1032,12 @@ public class PlayerView extends FrameLayout {
|
|||
if (ev.getActionMasked() != MotionEvent.ACTION_DOWN) {
|
||||
return false;
|
||||
}
|
||||
return performClick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean performClick() {
|
||||
super.performClick();
|
||||
return toggleControllerVisibility();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue