Commit 242bdffc by olly Committed by Oliver Woodman

Fix a few warnings.

- Suppress spurious resource type warnings.
- Make AS happy by making private method non-final.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128584391
parent ac59bde2
...@@ -70,9 +70,7 @@ public class OkHttpDataSource implements HttpDataSource { ...@@ -70,9 +70,7 @@ public class OkHttpDataSource implements HttpDataSource {
* @param client An {@link OkHttpClient} for use by the source. * @param client An {@link OkHttpClient} for use by the source.
* @param userAgent The User-Agent string that should be used. * @param userAgent The User-Agent string that should be used.
* @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
* predicate then a * predicate then a InvalidContentTypeException} is thrown from {@link #open(DataSpec)}.
* {@link com.google.android.exoplayer2.upstream.HttpDataSource.InvalidContentTypeException} is
* thrown from {@link #open(DataSpec)}.
*/ */
public OkHttpDataSource(OkHttpClient client, String userAgent, public OkHttpDataSource(OkHttpClient client, String userAgent,
Predicate<String> contentTypePredicate) { Predicate<String> contentTypePredicate) {
...@@ -83,9 +81,8 @@ public class OkHttpDataSource implements HttpDataSource { ...@@ -83,9 +81,8 @@ public class OkHttpDataSource implements HttpDataSource {
* @param client An {@link OkHttpClient} for use by the source. * @param client An {@link OkHttpClient} for use by the source.
* @param userAgent The User-Agent string that should be used. * @param userAgent The User-Agent string that should be used.
* @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
* predicate then a * predicate then a {@link InvalidContentTypeException} is thrown from
* {@link com.google.android.exoplayer2.upstream.HttpDataSource.InvalidContentTypeException} is * {@link #open(DataSpec)}.
* thrown from {@link #open(DataSpec)}.
* @param listener An optional listener. * @param listener An optional listener.
*/ */
public OkHttpDataSource(OkHttpClient client, String userAgent, public OkHttpDataSource(OkHttpClient client, String userAgent,
...@@ -97,9 +94,8 @@ public class OkHttpDataSource implements HttpDataSource { ...@@ -97,9 +94,8 @@ public class OkHttpDataSource implements HttpDataSource {
* @param client An {@link OkHttpClient} for use by the source. * @param client An {@link OkHttpClient} for use by the source.
* @param userAgent The User-Agent string that should be used. * @param userAgent The User-Agent string that should be used.
* @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the * @param contentTypePredicate An optional {@link Predicate}. If a content type is rejected by the
* predicate then a * predicate then a {@link InvalidContentTypeException} is thrown from
* {@link com.google.android.exoplayer2.upstream.HttpDataSource.InvalidContentTypeException} is * {@link #open(DataSpec)}.
* thrown from {@link #open(DataSpec)}.
* @param listener An optional listener. * @param listener An optional listener.
* @param cacheControl An optional {@link CacheControl} which sets all requests' Cache-Control * @param cacheControl An optional {@link CacheControl} which sets all requests' Cache-Control
* header. For example, you could force the network response for all requests. * header. For example, you could force the network response for all requests.
......
...@@ -91,6 +91,7 @@ import android.util.Log; ...@@ -91,6 +91,7 @@ import android.util.Log;
private int textTop; private int textTop;
private int textPaddingX; private int textPaddingX;
@SuppressWarnings("ResourceType")
public SubtitlePainter(Context context) { public SubtitlePainter(Context context) {
int[] viewAttr = {android.R.attr.lineSpacingExtra, android.R.attr.lineSpacingMultiplier}; int[] viewAttr = {android.R.attr.lineSpacingExtra, android.R.attr.lineSpacingMultiplier};
TypedArray styledAttributes = context.obtainStyledAttributes(null, viewAttr, 0, 0); TypedArray styledAttributes = context.obtainStyledAttributes(null, viewAttr, 0, 0);
......
...@@ -695,6 +695,7 @@ public final class DashTest extends ActivityInstrumentationTestCase2<HostActivit ...@@ -695,6 +695,7 @@ public final class DashTest extends ActivityInstrumentationTestCase2<HostActivit
@Override @Override
@TargetApi(18) @TargetApi(18)
@SuppressWarnings("ResourceType")
protected final StreamingDrmSessionManager buildDrmSessionManager(final String userAgent) { protected final StreamingDrmSessionManager buildDrmSessionManager(final String userAgent) {
StreamingDrmSessionManager drmSessionManager = null; StreamingDrmSessionManager drmSessionManager = null;
if (isWidevineEncrypted) { if (isWidevineEncrypted) {
...@@ -873,7 +874,7 @@ public final class DashTest extends ActivityInstrumentationTestCase2<HostActivit ...@@ -873,7 +874,7 @@ public final class DashTest extends ActivityInstrumentationTestCase2<HostActivit
return trackIndicesArray; return trackIndicesArray;
} }
private static final boolean isFormatHandled(int formatSupport) { private static boolean isFormatHandled(int formatSupport) {
return (formatSupport & RendererCapabilities.FORMAT_SUPPORT_MASK) return (formatSupport & RendererCapabilities.FORMAT_SUPPORT_MASK)
== RendererCapabilities.FORMAT_HANDLED; == RendererCapabilities.FORMAT_HANDLED;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment