Add missing call and rename getErrorCodeForMediaDrmErrorCode

PiperOrigin-RevId: 383251000
This commit is contained in:
aquilescanta 2021-07-06 13:14:41 +01:00 committed by kim-vde
parent 6dbc1eb189
commit 5b2e854344
3 changed files with 6 additions and 4 deletions

View File

@ -1116,7 +1116,7 @@ public final class C {
private static final int ERROR_PROVISIONING_RETRY = 28;
@PlaybackException.ErrorCode
public static int getErrorCodeCorrespondingToPlatformDrmErrorCode(int mediaDrmErrorCode) {
public static int getErrorCodeForMediaDrmErrorCode(int mediaDrmErrorCode) {
switch (mediaDrmErrorCode) {
case ERROR_PROVISIONING_CONFIG:
case ERROR_PROVISIONING_PARSE:

View File

@ -3120,10 +3120,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
}
@DoNotInline
@ErrorCode
public static int mediaDrmStateExceptionToErrorCode(Throwable throwable) {
@Nullable
String diagnosticsInfo = ((MediaDrm.MediaDrmStateException) throwable).getDiagnosticInfo();
return Util.getErrorCodeFromPlatformDiagnosticsInfo(diagnosticsInfo);
int drmErrorCode = Util.getErrorCodeFromPlatformDiagnosticsInfo(diagnosticsInfo);
return C.getErrorCodeForMediaDrmErrorCode(drmErrorCode);
}
}

View File

@ -1302,7 +1302,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
}
} catch (CryptoException e) {
throw createRendererException(
e, inputFormat, C.getErrorCodeCorrespondingToPlatformDrmErrorCode(e.getErrorCode()));
e, inputFormat, C.getErrorCodeForMediaDrmErrorCode(e.getErrorCode()));
}
return false;
}
@ -1373,7 +1373,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
}
} catch (CryptoException e) {
throw createRendererException(
e, inputFormat, C.getErrorCodeCorrespondingToPlatformDrmErrorCode(e.getErrorCode()));
e, inputFormat, C.getErrorCodeForMediaDrmErrorCode(e.getErrorCode()));
}
resetInputBuffer();