mirror of
https://github.com/androidx/media.git
synced 2025-04-29 22:36:54 +08:00
Remove unneeded SDK checks
PiperOrigin-RevId: 750172684
This commit is contained in:
parent
661effcddd
commit
1c855a8abf
@ -15,7 +15,6 @@
|
||||
*/
|
||||
package androidx.media3.exoplayer.analytics;
|
||||
|
||||
import static android.os.Build.VERSION.SDK_INT;
|
||||
import static androidx.media3.common.util.Assertions.checkNotNull;
|
||||
import static androidx.media3.common.util.Util.castNonNull;
|
||||
|
||||
@ -765,7 +764,7 @@ public final class MediaMetricsListener
|
||||
int subErrorCode = Util.getErrorCodeFromPlatformDiagnosticsInfo(diagnosticsInfo);
|
||||
int errorCode = getDrmErrorCode(subErrorCode);
|
||||
return new ErrorInfo(errorCode, subErrorCode);
|
||||
} else if (SDK_INT >= 23 && cause instanceof MediaDrmResetException) {
|
||||
} else if (cause instanceof MediaDrmResetException) {
|
||||
return new ErrorInfo(PlaybackErrorEvent.ERROR_DRM_SYSTEM_ERROR, /* subErrorCode= */ 0);
|
||||
} else if (cause instanceof NotProvisionedException) {
|
||||
return new ErrorInfo(
|
||||
|
@ -88,7 +88,7 @@ public final class LegacyParcelableUtil {
|
||||
// TODO: b/335804969 - Remove this workaround once the bug fix is in the androidx.media dependency
|
||||
@SuppressWarnings("unchecked")
|
||||
private static <T> T maybeApplyMediaDescriptionParcelableBugWorkaround(T value) {
|
||||
if (SDK_INT < 21 || SDK_INT >= 23) {
|
||||
if (SDK_INT >= 23) {
|
||||
return value;
|
||||
}
|
||||
if (value instanceof android.support.v4.media.MediaBrowserCompat.MediaItem) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user