Commit 5b2e8543 by aquilescanta Committed by kim-vde

Add missing call and rename getErrorCodeForMediaDrmErrorCode

PiperOrigin-RevId: 383251000
parent 6dbc1eb1
...@@ -1116,7 +1116,7 @@ public final class C { ...@@ -1116,7 +1116,7 @@ public final class C {
private static final int ERROR_PROVISIONING_RETRY = 28; private static final int ERROR_PROVISIONING_RETRY = 28;
@PlaybackException.ErrorCode @PlaybackException.ErrorCode
public static int getErrorCodeCorrespondingToPlatformDrmErrorCode(int mediaDrmErrorCode) { public static int getErrorCodeForMediaDrmErrorCode(int mediaDrmErrorCode) {
switch (mediaDrmErrorCode) { switch (mediaDrmErrorCode) {
case ERROR_PROVISIONING_CONFIG: case ERROR_PROVISIONING_CONFIG:
case ERROR_PROVISIONING_PARSE: case ERROR_PROVISIONING_PARSE:
......
...@@ -3120,10 +3120,12 @@ import java.util.concurrent.atomic.AtomicBoolean; ...@@ -3120,10 +3120,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
} }
@DoNotInline @DoNotInline
@ErrorCode
public static int mediaDrmStateExceptionToErrorCode(Throwable throwable) { public static int mediaDrmStateExceptionToErrorCode(Throwable throwable) {
@Nullable @Nullable
String diagnosticsInfo = ((MediaDrm.MediaDrmStateException) throwable).getDiagnosticInfo(); String diagnosticsInfo = ((MediaDrm.MediaDrmStateException) throwable).getDiagnosticInfo();
return Util.getErrorCodeFromPlatformDiagnosticsInfo(diagnosticsInfo); int drmErrorCode = Util.getErrorCodeFromPlatformDiagnosticsInfo(diagnosticsInfo);
return C.getErrorCodeForMediaDrmErrorCode(drmErrorCode);
} }
} }
......
...@@ -1302,7 +1302,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer { ...@@ -1302,7 +1302,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
} }
} catch (CryptoException e) { } catch (CryptoException e) {
throw createRendererException( throw createRendererException(
e, inputFormat, C.getErrorCodeCorrespondingToPlatformDrmErrorCode(e.getErrorCode())); e, inputFormat, C.getErrorCodeForMediaDrmErrorCode(e.getErrorCode()));
} }
return false; return false;
} }
...@@ -1373,7 +1373,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer { ...@@ -1373,7 +1373,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
} }
} catch (CryptoException e) { } catch (CryptoException e) {
throw createRendererException( throw createRendererException(
e, inputFormat, C.getErrorCodeCorrespondingToPlatformDrmErrorCode(e.getErrorCode())); e, inputFormat, C.getErrorCodeForMediaDrmErrorCode(e.getErrorCode()));
} }
resetInputBuffer(); resetInputBuffer();
......
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