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
e91eec7c
authored
Mar 25, 2019
by
olly
Committed by
Toni
Mar 26, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make DownloadThread extend Thread
PiperOrigin-RevId: 240120782
parent
b0bb6ec8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadManager.java
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadManager.java
View file @
e91eec7c
...
...
@@ -818,26 +818,24 @@ public final class DownloadManager {
}
}
private
class
DownloadThread
implements
Runnable
{
private
class
DownloadThread
extends
Thread
{
private
final
Download
download
;
private
final
Downloader
downloader
;
private
final
boolean
isRemoveThread
;
private
final
Thread
thread
;
private
volatile
boolean
isCanceled
;
private
DownloadThread
(
Download
download
,
Downloader
downloader
,
boolean
isRemoveThread
)
{
this
.
download
=
download
;
this
.
downloader
=
downloader
;
this
.
isRemoveThread
=
isRemoveThread
;
thread
=
new
Thread
(
this
);
thread
.
start
();
start
();
}
public
void
cancel
()
{
isCanceled
=
true
;
downloader
.
cancel
();
thread
.
interrupt
();
interrupt
();
}
// Methods running on download thread.
...
...
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