diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/DefaultRenderersFactory.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/DefaultRenderersFactory.java index 1b50d7b974..266ed047d8 100644 --- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/DefaultRenderersFactory.java +++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/DefaultRenderersFactory.java @@ -380,7 +380,7 @@ public class DefaultRenderersFactory implements RenderersFactory { // Expected if the app was built without the extension. } catch (Exception e) { // The extension is present, but instantiation failed. - throw new RuntimeException("Error instantiating VP9 extension", e); + throw new IllegalStateException("Error instantiating VP9 extension", e); } try { @@ -405,7 +405,7 @@ public class DefaultRenderersFactory implements RenderersFactory { // Expected if the app was built without the extension. } catch (Exception e) { // The extension is present, but instantiation failed. - throw new RuntimeException("Error instantiating AV1 extension", e); + throw new IllegalStateException("Error instantiating AV1 extension", e); } try { @@ -431,7 +431,7 @@ public class DefaultRenderersFactory implements RenderersFactory { // Expected if the app was built without the extension. } catch (Exception e) { // The extension is present, but instantiation failed. - throw new RuntimeException("Error instantiating FFmpeg extension", e); + throw new IllegalStateException("Error instantiating FFmpeg extension", e); } } @@ -488,7 +488,7 @@ public class DefaultRenderersFactory implements RenderersFactory { // Expected if the app was built without the extension. } catch (Exception e) { // The extension is present, but instantiation failed. - throw new RuntimeException("Error instantiating MIDI extension", e); + throw new IllegalStateException("Error instantiating MIDI extension", e); } try { @@ -507,7 +507,7 @@ public class DefaultRenderersFactory implements RenderersFactory { // Expected if the app was built without the extension. } catch (Exception e) { // The extension is present, but instantiation failed. - throw new RuntimeException("Error instantiating Opus extension", e); + throw new IllegalStateException("Error instantiating Opus extension", e); } try { @@ -526,7 +526,7 @@ public class DefaultRenderersFactory implements RenderersFactory { // Expected if the app was built without the extension. } catch (Exception e) { // The extension is present, but instantiation failed. - throw new RuntimeException("Error instantiating FLAC extension", e); + throw new IllegalStateException("Error instantiating FLAC extension", e); } try { @@ -545,7 +545,7 @@ public class DefaultRenderersFactory implements RenderersFactory { // Expected if the app was built without the extension. } catch (Exception e) { // The extension is present, but instantiation failed. - throw new RuntimeException("Error instantiating FFmpeg extension", e); + throw new IllegalStateException("Error instantiating FFmpeg extension", e); } try { // Full class names used for constructor args so the LINT rule triggers if any of them move. @@ -562,7 +562,7 @@ public class DefaultRenderersFactory implements RenderersFactory { // Expected if the app was built without the extension. } catch (Exception e) { // The extension is present, but instantiation failed. - throw new RuntimeException("Error instantiating IAMF extension", e); + throw new IllegalStateException("Error instantiating IAMF extension", e); } }