diff --git a/demo/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java b/demo/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java
index fd0cd5b5a1..52660afcfb 100644
--- a/demo/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java
+++ b/demo/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java
@@ -353,10 +353,11 @@ public class PlayerActivity extends Activity implements OnClickListener, ExoPlay
}
/**
- * Build a DataSource factory.
+ * Returns a new DataSource factory.
*
* @param useBandwidthMeter Whether to set {@link #BANDWIDTH_METER} as a listener to the new
* DataSource factory.
+ * @return A new DataSource factory.
*/
private DataSource.Factory buildDataSourceFactory(boolean useBandwidthMeter) {
return new DefaultDataSourceFactory(this, useBandwidthMeter ? BANDWIDTH_METER : null,
@@ -364,10 +365,11 @@ public class PlayerActivity extends Activity implements OnClickListener, ExoPlay
}
/**
- * Build a HttpDataSource factory.
+ * Returns a new HttpDataSource factory.
*
* @param useBandwidthMeter Whether to set {@link #BANDWIDTH_METER} as a listener to the new
* DataSource factory.
+ * @return A new HttpDataSource factory.
*/
private HttpDataSource.Factory buildHttpDataSourceFactory(boolean useBandwidthMeter) {
return new DefaultHttpDataSourceFactory(userAgent, useBandwidthMeter ? BANDWIDTH_METER : null);
diff --git a/library/src/main/java/com/google/android/exoplayer2/Timeline.java b/library/src/main/java/com/google/android/exoplayer2/Timeline.java
index acbe2e34d4..b394ecabf8 100644
--- a/library/src/main/java/com/google/android/exoplayer2/Timeline.java
+++ b/library/src/main/java/com/google/android/exoplayer2/Timeline.java
@@ -52,7 +52,7 @@ package com.google.android.exoplayer2;
*
*
- * A timeline for a live stream consists of a period whose duration is unknown, since its
+ * A timeline for a live stream consists of a period whose duration is unknown, since it's
* continually extending as more content is broadcast. If content only remains available for a
* limited period of time then the window may start at a non-zero position, defining the region of
* content that can still be played. The window will have {@link Window#isDynamic} set to true if
diff --git a/library/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java b/library/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java
index 4f739df164..2f9524b7f0 100644
--- a/library/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java
+++ b/library/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java
@@ -319,7 +319,7 @@ public final class MediaCodecUtil {
switch (parts[0]) {
case CODEC_ID_HEV1:
case CODEC_ID_HVC1:
- return getHevcProileAndLevel(codec, parts);
+ return getHevcProfileAndLevel(codec, parts);
case CODEC_ID_AVC1:
case CODEC_ID_AVC2:
return getAvcProfileAndLevel(codec, parts);
@@ -328,7 +328,7 @@ public final class MediaCodecUtil {
}
}
- private static Pair getHevcProileAndLevel(String codec, String[] parts) {
+ private static Pair getHevcProfileAndLevel(String codec, String[] parts) {
if (parts.length < 4) {
// The codec has fewer parts than required by the HEVC codec string format.
Log.w(TAG, "Ignoring malformed HEVC codec string: " + codec);
diff --git a/library/src/main/java/com/google/android/exoplayer2/source/LoopingMediaSource.java b/library/src/main/java/com/google/android/exoplayer2/source/LoopingMediaSource.java
index 76669aeb71..e41f5cdc1e 100644
--- a/library/src/main/java/com/google/android/exoplayer2/source/LoopingMediaSource.java
+++ b/library/src/main/java/com/google/android/exoplayer2/source/LoopingMediaSource.java
@@ -106,7 +106,7 @@ public final class LoopingMediaSource implements MediaSource {
int maxLoopCount = Integer.MAX_VALUE / childPeriodCount;
if (loopCount > maxLoopCount) {
if (loopCount != Integer.MAX_VALUE) {
- Log.w(TAG, "Capped loops to avoid overflow:" + loopCount + " -> " + maxLoopCount);
+ Log.w(TAG, "Capped loops to avoid overflow: " + loopCount + " -> " + maxLoopCount);
}
this.loopCount = maxLoopCount;
} else {
diff --git a/library/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java b/library/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java
index ada93c07a0..b063e27f5e 100644
--- a/library/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java
+++ b/library/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java
@@ -48,7 +48,7 @@ import java.util.Arrays;
import java.util.Locale;
/**
- * Source of Hls(possibly adaptive) chunks.
+ * Source of Hls (possibly adaptive) chunks.
*/
/* package */ class HlsChunkSource {
@@ -96,7 +96,6 @@ import java.util.Locale;
* gaps in playback in case playlist drift apart.
*/
private static final double LIVE_VARIANT_SWITCH_SAFETY_EXTRA_SECS = 2.0;
- private static final String TAG = "HlsChunkSource";
private static final String AAC_FILE_EXTENSION = ".aac";
private static final String AC3_FILE_EXTENSION = ".ac3";
private static final String EC3_FILE_EXTENSION = ".ec3";
@@ -242,7 +241,7 @@ import java.util.Locale;
int chunkMediaSequence;
if (live) {
if (previous == null) {
- // When playling a live stream, the starting chunk will be the third counting from the live
+ // When playing a live stream, the starting chunk will be the third counting from the live
// edge.
chunkMediaSequence = Math.max(0, mediaPlaylist.segments.size() - 3)
+ mediaPlaylist.mediaSequence;
diff --git a/library/src/main/java/com/google/android/exoplayer2/util/Util.java b/library/src/main/java/com/google/android/exoplayer2/util/Util.java
index f4e9352c30..6e11c43db1 100644
--- a/library/src/main/java/com/google/android/exoplayer2/util/Util.java
+++ b/library/src/main/java/com/google/android/exoplayer2/util/Util.java
@@ -929,8 +929,7 @@ public final class Util {
if ("Sony".equals(Util.MANUFACTURER) && Util.MODEL.startsWith("BRAVIA")
&& context.getPackageManager().hasSystemFeature("com.sony.dtv.hardware.panel.qfhd")) {
return new Point(3840, 2160);
- } else if ("NVIDIA".equals(Util.MANUFACTURER) && Util.MODEL != null
- && Util.MODEL.contains("SHIELD")) {
+ } else if ("NVIDIA".equals(Util.MANUFACTURER) && Util.MODEL.contains("SHIELD")) {
// Attempt to read sys.display-size.
String sysDisplaySize = null;
try {