Propagate the possible exceptions during codec capability checks to the caller so a nice dialog can be displayed instead of crashing on buggy ROMs. Small change to evdev shutdown.

This commit is contained in:
Cameron Gutman
2014-09-03 20:00:00 -07:00
parent 2c23dbd2be
commit 178c53ee84
3 changed files with 16 additions and 4 deletions
@@ -22,7 +22,7 @@ public class ConfigurableDecoderRenderer implements VideoDecoderRenderer {
return decoderRenderer.setup(width, height, redrawRate, renderTarget, drFlags);
}
public void initializeWithFlags(int drFlags) {
public void initializeWithFlags(int drFlags) throws Exception {
if ((drFlags & VideoDecoderRenderer.FLAG_FORCE_HARDWARE_DECODING) != 0 ||
((drFlags & VideoDecoderRenderer.FLAG_FORCE_SOFTWARE_DECODING) == 0 &&
MediaCodecDecoderRenderer.findSafeDecoder() != null)) {