Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cca4ac73
authored
Jun 24, 2021
by
aquilescanta
Committed by
Oliver Woodman
Jun 30, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Assign ERROR_CODE_IO_DNS_FAILED to UnknownHostException
PiperOrigin-RevId: 381235721
parent
1e9b6d66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java
View file @
cca4ac73
...
@@ -62,6 +62,7 @@ import com.google.common.base.Supplier;
...
@@ -62,6 +62,7 @@ import com.google.common.base.Supplier;
import
com.google.common.collect.ImmutableList
;
import
com.google.common.collect.ImmutableList
;
import
java.io.FileNotFoundException
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.UnknownHostException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
...
@@ -607,6 +608,14 @@ import java.util.concurrent.atomic.AtomicBoolean;
...
@@ -607,6 +608,14 @@ import java.util.concurrent.atomic.AtomicBoolean;
handleIoException
(
e
,
errorCode
);
handleIoException
(
e
,
errorCode
);
}
catch
(
HttpDataSource
.
InvalidResponseCodeException
e
)
{
}
catch
(
HttpDataSource
.
InvalidResponseCodeException
e
)
{
handleIoException
(
e
,
PlaybackException
.
ERROR_CODE_IO_BAD_HTTP_STATUS
);
handleIoException
(
e
,
PlaybackException
.
ERROR_CODE_IO_BAD_HTTP_STATUS
);
}
catch
(
HttpDataSource
.
HttpDataSourceException
e
)
{
int
errorCode
;
if
(
e
.
getCause
()
instanceof
UnknownHostException
)
{
errorCode
=
PlaybackException
.
ERROR_CODE_IO_DNS_FAILED
;
}
else
{
errorCode
=
PlaybackException
.
ERROR_CODE_IO_UNSPECIFIED
;
}
handleIoException
(
e
,
errorCode
);
}
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment