Assign ERROR_CODE_IO_UNSPECIFIED to unclassified IOExceptions

The reason this was not an IO error code is that before other
IOExceptions were classified, this catch would grab non-IO error
codes, like ParserException. Now that we are getting closer to
the final state, we can assume IOExceptions are ok to classify
as IO error codes (unlike, for example, ParserExceptions or
DrmSessionExceptions).

PiperOrigin-RevId: 386496752
This commit is contained in:
aquilescanta 2021-07-23 19:31:56 +01:00 committed by bachinger
parent 3488c047e8
commit 33fa987b32

View File

@ -597,7 +597,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
} catch (BehindLiveWindowException e) { } catch (BehindLiveWindowException e) {
handleIoException(e, PlaybackException.ERROR_CODE_BEHIND_LIVE_WINDOW); handleIoException(e, PlaybackException.ERROR_CODE_BEHIND_LIVE_WINDOW);
} catch (IOException e) { } catch (IOException e) {
handleIoException(e, PlaybackException.ERROR_CODE_UNSPECIFIED); handleIoException(e, PlaybackException.ERROR_CODE_IO_UNSPECIFIED);
} catch (RuntimeException e) { } catch (RuntimeException e) {
ExoPlaybackException error = ExoPlaybackException.createForUnexpected(e); ExoPlaybackException error = ExoPlaybackException.createForUnexpected(e);
Log.e(TAG, "Playback error", error); Log.e(TAG, "Playback error", error);