/** * Creates an instance for the specified scheme UUID. * * @param uuid The scheme uuid. * @return The created instance. * @throws UnsupportedDrmException If the DRM scheme is unsupported or cannot be instantiated. */ public static FrameworkMediaDrm newInstance(UUID uuid) throws UnsupportedDrmException { try { return new FrameworkMediaDrm(uuid); } catch (UnsupportedSchemeException e) { throw new UnsupportedDrmException(UnsupportedDrmException.REASON_UNSUPPORTED_SCHEME, e); } catch (Exception e) { throw new UnsupportedDrmException(UnsupportedDrmException.REASON_INSTANTIATION_ERROR, e); } }
@SuppressWarnings("PMD.PreserveStackTrace") // We just unwrap the exception because we don't care about the UnsupportedDrmException itself FrameworkMediaDrm create(UUID uuid) { try { return FrameworkMediaDrm.newInstance(uuid); } catch (UnsupportedDrmException e) { throw new FrameworkMediaDrmException(e.getMessage(), e.getCause()); } }
new Object[]{RENDERER_DECODER, DECODING_SUBTITLE_ERROR, createRenderer(new SubtitleDecoderException("metadata-decoder-exception"))}, new Object[]{DRM, UNSUPPORTED_DRM_SCHEME_ERROR, createRenderer(new UnsupportedDrmException(UnsupportedDrmException.REASON_UNSUPPORTED_SCHEME))}, new Object[]{DRM, DRM_INSTANTIATION_ERROR, createRenderer(new UnsupportedDrmException(UnsupportedDrmException.REASON_INSTANTIATION_ERROR))}, new Object[]{DRM, DRM_SESSION_ERROR, createRenderer(new DrmSession.DrmSessionException(new Throwable()))}, new Object[]{DRM, DRM_KEYS_EXPIRED_ERROR, createRenderer(new KeysExpiredException())},