diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 65d83fd54d0..d45cd645c88 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -33,6 +33,8 @@ * Add release method to Cache interface. * Prevent multiple instances of SimpleCache in the same folder. Previous instance must be released. +* Fix ANR issue on Redmi 4X and Redmi Note 4 + ([#4006](https://github.com/google/ExoPlayer/issues/4006)). ### 2.7.1 ### diff --git a/library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java b/library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java index 338fce19538..7a75e5d352e 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java @@ -1135,9 +1135,13 @@ private static boolean codecNeedsSetOutputSurfaceWorkaround(String name) { // Work around https://github.com/google/ExoPlayer/issues/3236, // https://github.com/google/ExoPlayer/issues/3355, // https://github.com/google/ExoPlayer/issues/3439, - // https://github.com/google/ExoPlayer/issues/3724 and - // https://github.com/google/ExoPlayer/issues/3835. - return (("deb".equals(Util.DEVICE) || "flo".equals(Util.DEVICE)) // Nexus 7 (2013) + // https://github.com/google/ExoPlayer/issues/3724, + // https://github.com/google/ExoPlayer/issues/3835 and + // https://github.com/google/ExoPlayer/issues/4006. + return (("deb".equals(Util.DEVICE) // Nexus 7 (2013) + || "flo".equals(Util.DEVICE) // Nexus 7 (2013) + || "mido".equals(Util.DEVICE) // Redmi Note 4 + || "santoni".equals(Util.DEVICE)) // Redmi 4X && "OMX.qcom.video.decoder.avc".equals(name)) || (("tcl_eu".equals(Util.DEVICE) // TCL Percee TV || "SVP-DTV15".equals(Util.DEVICE) // Sony Bravia 4K 2015