Fix some lint issues.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176337058
This commit is contained in:
olly 2017-11-20 03:36:50 -08:00 committed by Oliver Woodman
parent a7c424a15c
commit 82d0a27fd9
11 changed files with 29 additions and 38 deletions

View File

@ -20,6 +20,4 @@
<string name="media_route_menu_title">Cast</string> <string name="media_route_menu_title">Cast</string>
<string name="error_unsupported_drm">DRM scheme not supported by this device.</string>
</resources> </resources>

View File

@ -26,6 +26,13 @@ android {
} }
dependencies { dependencies {
// This dependency is necessary to force the supportLibraryVersion of
// com.android.support:support-v4 to be used. Else an older version (25.2.0)
// is included via:
// com.google.android.gms:play-services-cast-framework:11.4.2
// |-- com.google.android.gms:play-services-basement:11.4.2
// |-- com.android.support:support-v4:25.2.0
compile 'com.android.support:support-v4:' + supportLibraryVersion
compile 'com.android.support:appcompat-v7:' + supportLibraryVersion compile 'com.android.support:appcompat-v7:' + supportLibraryVersion
compile 'com.android.support:mediarouter-v7:' + supportLibraryVersion compile 'com.android.support:mediarouter-v7:' + supportLibraryVersion
compile 'com.google.android.gms:play-services-cast-framework:' + playServicesLibraryVersion compile 'com.google.android.gms:play-services-cast-framework:' + playServicesLibraryVersion

View File

@ -28,10 +28,11 @@ android {
dependencies { dependencies {
compile project(modulePrefix + 'library-core') compile project(modulePrefix + 'library-core')
// This dependency is necessary to force the supportLibraryVersion of // This dependency is necessary to force the supportLibraryVersion of
// com.android.support:support-v4 to be used. Else an older version (25.2.0) is included via: // com.android.support:support-v4 to be used. Else an older version (25.2.0)
// com.google.android.gms:play-services-ads:11.2.0 // is included via:
// |-- com.google.android.gms:play-services-ads-lite:11.2.0 // com.google.android.gms:play-services-ads:11.4.2
// |-- com.google.android.gms:play-services-basement:11.2.0 // |-- com.google.android.gms:play-services-ads-lite:11.4.2
// |-- com.google.android.gms:play-services-basement:11.4.2
// |-- com.android.support:support-v4:25.2.0 // |-- com.android.support:support-v4:25.2.0
compile 'com.android.support:support-v4:' + supportLibraryVersion compile 'com.android.support:support-v4:' + supportLibraryVersion
compile 'com.google.ads.interactivemedia.v3:interactivemedia:3.7.4' compile 'com.google.ads.interactivemedia.v3:interactivemedia:3.7.4'

View File

@ -265,7 +265,7 @@ public abstract class SegmentDownloader<M, K> implements Downloader {
/** /**
* Returns a list of all segments. * Returns a list of all segments.
* *
* @see #getSegments(DataSource, M, Object[], boolean)}. * @see #getSegments(DataSource, M, Object[], boolean)
*/ */
protected abstract List<Segment> getAllSegments(DataSource dataSource, M manifest, protected abstract List<Segment> getAllSegments(DataSource dataSource, M manifest,
boolean allowPartialIndex) throws InterruptedException, IOException; boolean allowPartialIndex) throws InterruptedException, IOException;

View File

@ -32,6 +32,7 @@ import android.view.Display;
import android.view.WindowManager; import android.view.WindowManager;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.ExoPlayerLibraryInfo; import com.google.android.exoplayer2.ExoPlayerLibraryInfo;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.ParserException; import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.upstream.DataSource; import com.google.android.exoplayer2.upstream.DataSource;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
@ -828,6 +829,8 @@ public final class Util {
case C.ENCODING_PCM_32BIT: case C.ENCODING_PCM_32BIT:
case C.ENCODING_PCM_FLOAT: case C.ENCODING_PCM_FLOAT:
return channelCount * 4; return channelCount * 4;
case C.ENCODING_INVALID:
case Format.NO_VALUE:
default: default:
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }

View File

@ -360,7 +360,7 @@ public class DashManifestParser extends DefaultHandler
String schemeIdUri = xpp.getAttributeValue(null, "schemeIdUri"); String schemeIdUri = xpp.getAttributeValue(null, "schemeIdUri");
if (schemeIdUri != null) { if (schemeIdUri != null) {
switch (schemeIdUri.toLowerCase()) { switch (Util.toLowerInvariant(schemeIdUri)) {
case "urn:mpeg:dash:mp4protection:2011": case "urn:mpeg:dash:mp4protection:2011":
schemeType = xpp.getAttributeValue(null, "value"); schemeType = xpp.getAttributeValue(null, "value");
String defaultKid = xpp.getAttributeValue(null, "cenc:default_KID"); String defaultKid = xpp.getAttributeValue(null, "cenc:default_KID");

View File

@ -39,8 +39,8 @@ import java.util.List;
/** /**
* Helper class to download DASH streams. * Helper class to download DASH streams.
* *
* <p>Except {@link #getTotalSegments()}, {@link #getDownloadedSegments()} and {@link * <p>Except {@link #getTotalSegments()}, {@link #getDownloadedSegments()} and
* #getDownloadedBytes()}, this class isn't thread safe. * {@link #getDownloadedBytes()}, this class isn't thread safe.
* *
* <p>Example usage: * <p>Example usage:
* *

View File

@ -33,8 +33,8 @@ import java.util.List;
/** /**
* Helper class to download SmoothStreaming streams. * Helper class to download SmoothStreaming streams.
* *
* <p>Except {@link #getTotalSegments()}, {@link #getDownloadedSegments()} and {@link * <p>Except {@link #getTotalSegments()}, {@link #getDownloadedSegments()} and
* #getDownloadedBytes()}, this class isn't thread safe. * {@link #getDownloadedBytes()}, this class isn't thread safe.
* *
* <p>Example usage: * <p>Example usage:
* *

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<style name="ExoMediaButton">
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:layout_width">@dimen/exo_media_button_width</item>
<item name="android:layout_height">@dimen/exo_media_button_height</item>
</style>
</resources>

View File

@ -16,7 +16,7 @@
<resources> <resources>
<style name="ExoMediaButton"> <style name="ExoMediaButton">
<item name="android:background">@null</item> <item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:layout_width">@dimen/exo_media_button_width</item> <item name="android:layout_width">@dimen/exo_media_button_width</item>
<item name="android:layout_height">@dimen/exo_media_button_height</item> <item name="android:layout_height">@dimen/exo_media_button_height</item>
</style> </style>

View File

@ -180,7 +180,13 @@ public class FakeSimpleExoPlayer extends SimpleExoPlayer {
@SuppressWarnings("ThreadJoinLoop") @SuppressWarnings("ThreadJoinLoop")
public void release() { public void release() {
stop(); stop();
playbackThread.quitSafely(); playbackHandler.post(new Runnable() {
@Override
public void run () {
playbackHandler.removeCallbacksAndMessages(null);
playbackThread.quit();
}
});
while (playbackThread.isAlive()) { while (playbackThread.isAlive()) {
try { try {
playbackThread.join(); playbackThread.join();