Commit 94784249 by Oliver Woodman

Cleanup

parent b06a38b6
......@@ -53,6 +53,7 @@
* Add uri field to `LoadEventInfo` in `MediaSourceEventListener` or
`AnalyticsListener` callbacks. This uri is the redirected uri if redirection
occurred ([#2054](https://github.com/google/ExoPlayer/issues/2054)).
* Improved compatibility with FireOS devices.
### 2.8.2 ###
......
......@@ -1172,10 +1172,15 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer {
return Util.SDK_INT <= 22 && "foster".equals(Util.DEVICE) && "NVIDIA".equals(Util.MANUFACTURER);
}
/**
* Returns whether the device is known to handle {@link DummySurface} incorrectly.
*
* <p>If true is returned then use of {@link DummySurface} is disabled.
*/
private static boolean codecNeedsDummySurfaceWorkaround(String name) {
// Work around https://github.com/google/ExoPlayer/issues/4419.
return (("needle".equals(Util.DEVICE)) // FireTV 4K
&& "OMX.amlogic.avc.decoder.awesome".equals(name));
return ("Amazon".equals(Util.MANUFACTURER) && "AFTN".equals(Util.MODEL)) // FireTV 4K
&& "OMX.amlogic.avc.decoder.awesome".equals(name);
}
/**
......
......@@ -36,7 +36,6 @@ import android.text.style.BackgroundColorSpan;
import android.text.style.RelativeSizeSpan;
import android.util.DisplayMetrics;
import android.util.Log;
import com.google.android.exoplayer2.text.CaptionStyleCompat;
import com.google.android.exoplayer2.text.Cue;
import com.google.android.exoplayer2.util.Util;
......@@ -257,8 +256,8 @@ import com.google.android.exoplayer2.util.Util;
if (Color.alpha(backgroundColor) > 0) {
SpannableStringBuilder newCueText = new SpannableStringBuilder(cueText);
newCueText.setSpan(new BackgroundColorSpan(backgroundColor), 0, newCueText.length(),
Spanned.SPAN_PRIORITY);
newCueText.setSpan(
new BackgroundColorSpan(backgroundColor), 0, newCueText.length(), Spanned.SPAN_PRIORITY);
cueText = newCueText;
}
......
......@@ -206,8 +206,10 @@ public final class SubtitleView extends View implements TextOutput {
* {@link CaptioningManager#getUserStyle()}, or to a default style before API level 19.
*/
public void setUserDefaultStyle() {
setStyle(Util.SDK_INT >= 19 && isCaptionManagerEnabled() &&!isInEditMode()
? getUserCaptionStyleV19() : CaptionStyleCompat.DEFAULT);
setStyle(
Util.SDK_INT >= 19 && isCaptionManagerEnabled() && !isInEditMode()
? getUserCaptionStyleV19()
: CaptionStyleCompat.DEFAULT);
}
/**
......
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