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
e9482c7f
authored
Jul 14, 2020
by
ibaker
Committed by
Oliver Woodman
Jul 24, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Migrate uses of deprecated DefaultDownloadFactory constructor
PiperOrigin-RevId: 321153963
parent
f0240456
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
7 deletions
library/core/src/main/java/com/google/android/exoplayer2/offline/DefaultDownloaderFactory.java
library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloaderFactoryTest.java
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DashDownloaderTest.java
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadManagerDashTest.java
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java
library/hls/src/test/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloaderTest.java
library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloaderTest.java
library/core/src/main/java/com/google/android/exoplayer2/offline/DefaultDownloaderFactory.java
View file @
e9482c7f
...
@@ -84,7 +84,7 @@ public class DefaultDownloaderFactory implements DownloaderFactory {
...
@@ -84,7 +84,7 @@ public class DefaultDownloaderFactory implements DownloaderFactory {
*/
*/
@Deprecated
@Deprecated
public
DefaultDownloaderFactory
(
CacheDataSource
.
Factory
cacheDataSourceFactory
)
{
public
DefaultDownloaderFactory
(
CacheDataSource
.
Factory
cacheDataSourceFactory
)
{
this
(
cacheDataSourceFactory
,
Runnable:
:
run
);
this
(
cacheDataSourceFactory
,
/* executor= */
Runnable:
:
run
);
}
}
/**
/**
...
...
library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloaderFactoryTest.java
View file @
e9482c7f
...
@@ -37,7 +37,8 @@ public final class DefaultDownloaderFactoryTest {
...
@@ -37,7 +37,8 @@ public final class DefaultDownloaderFactoryTest {
new
CacheDataSource
.
Factory
()
new
CacheDataSource
.
Factory
()
.
setCache
(
Mockito
.
mock
(
Cache
.
class
))
.
setCache
(
Mockito
.
mock
(
Cache
.
class
))
.
setUpstreamDataSourceFactory
(
DummyDataSource
.
FACTORY
);
.
setUpstreamDataSourceFactory
(
DummyDataSource
.
FACTORY
);
DownloaderFactory
factory
=
new
DefaultDownloaderFactory
(
cacheDataSourceFactory
);
DownloaderFactory
factory
=
new
DefaultDownloaderFactory
(
cacheDataSourceFactory
,
/* executor= */
Runnable:
:
run
);
Downloader
downloader
=
Downloader
downloader
=
factory
.
createDownloader
(
factory
.
createDownloader
(
...
...
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DashDownloaderTest.java
View file @
e9482c7f
...
@@ -85,7 +85,8 @@ public class DashDownloaderTest {
...
@@ -85,7 +85,8 @@ public class DashDownloaderTest {
new
CacheDataSource
.
Factory
()
new
CacheDataSource
.
Factory
()
.
setCache
(
Mockito
.
mock
(
Cache
.
class
))
.
setCache
(
Mockito
.
mock
(
Cache
.
class
))
.
setUpstreamDataSourceFactory
(
DummyDataSource
.
FACTORY
);
.
setUpstreamDataSourceFactory
(
DummyDataSource
.
FACTORY
);
DownloaderFactory
factory
=
new
DefaultDownloaderFactory
(
cacheDataSourceFactory
);
DownloaderFactory
factory
=
new
DefaultDownloaderFactory
(
cacheDataSourceFactory
,
/* executor= */
Runnable:
:
run
);
Downloader
downloader
=
Downloader
downloader
=
factory
.
createDownloader
(
factory
.
createDownloader
(
...
...
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadManagerDashTest.java
View file @
e9482c7f
...
@@ -241,7 +241,8 @@ public class DownloadManagerDashTest {
...
@@ -241,7 +241,8 @@ public class DownloadManagerDashTest {
new
DefaultDownloaderFactory
(
new
DefaultDownloaderFactory
(
new
CacheDataSource
.
Factory
()
new
CacheDataSource
.
Factory
()
.
setCache
(
cache
)
.
setCache
(
cache
)
.
setUpstreamDataSourceFactory
(
fakeDataSourceFactory
));
.
setUpstreamDataSourceFactory
(
fakeDataSourceFactory
),
/* executor= */
Runnable:
:
run
);
downloadManager
=
downloadManager
=
new
DownloadManager
(
new
DownloadManager
(
ApplicationProvider
.
getApplicationContext
(),
downloadIndex
,
downloaderFactory
);
ApplicationProvider
.
getApplicationContext
(),
downloadIndex
,
downloaderFactory
);
...
...
library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java
View file @
e9482c7f
...
@@ -117,7 +117,8 @@ public class DownloadServiceDashTest {
...
@@ -117,7 +117,8 @@ public class DownloadServiceDashTest {
new
DefaultDownloaderFactory
(
new
DefaultDownloaderFactory
(
new
CacheDataSource
.
Factory
()
new
CacheDataSource
.
Factory
()
.
setCache
(
cache
)
.
setCache
(
cache
)
.
setUpstreamDataSourceFactory
(
fakeDataSourceFactory
));
.
setUpstreamDataSourceFactory
(
fakeDataSourceFactory
),
/* executor= */
Runnable:
:
run
);
final
DownloadManager
dashDownloadManager
=
final
DownloadManager
dashDownloadManager
=
new
DownloadManager
(
new
DownloadManager
(
ApplicationProvider
.
getApplicationContext
(),
downloadIndex
,
downloaderFactory
);
ApplicationProvider
.
getApplicationContext
(),
downloadIndex
,
downloaderFactory
);
...
...
library/hls/src/test/java/com/google/android/exoplayer2/source/hls/offline/HlsDownloaderTest.java
View file @
e9482c7f
...
@@ -102,7 +102,8 @@ public class HlsDownloaderTest {
...
@@ -102,7 +102,8 @@ public class HlsDownloaderTest {
new
CacheDataSource
.
Factory
()
new
CacheDataSource
.
Factory
()
.
setCache
(
Mockito
.
mock
(
Cache
.
class
))
.
setCache
(
Mockito
.
mock
(
Cache
.
class
))
.
setUpstreamDataSourceFactory
(
DummyDataSource
.
FACTORY
);
.
setUpstreamDataSourceFactory
(
DummyDataSource
.
FACTORY
);
DownloaderFactory
factory
=
new
DefaultDownloaderFactory
(
cacheDataSourceFactory
);
DownloaderFactory
factory
=
new
DefaultDownloaderFactory
(
cacheDataSourceFactory
,
/* executor= */
Runnable:
:
run
);
Downloader
downloader
=
Downloader
downloader
=
factory
.
createDownloader
(
factory
.
createDownloader
(
...
...
library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/offline/SsDownloaderTest.java
View file @
e9482c7f
...
@@ -42,7 +42,8 @@ public final class SsDownloaderTest {
...
@@ -42,7 +42,8 @@ public final class SsDownloaderTest {
new
CacheDataSource
.
Factory
()
new
CacheDataSource
.
Factory
()
.
setCache
(
Mockito
.
mock
(
Cache
.
class
))
.
setCache
(
Mockito
.
mock
(
Cache
.
class
))
.
setUpstreamDataSourceFactory
(
DummyDataSource
.
FACTORY
);
.
setUpstreamDataSourceFactory
(
DummyDataSource
.
FACTORY
);
DownloaderFactory
factory
=
new
DefaultDownloaderFactory
(
cacheDataSourceFactory
);
DownloaderFactory
factory
=
new
DefaultDownloaderFactory
(
cacheDataSourceFactory
,
/* executor= */
Runnable:
:
run
);
Downloader
downloader
=
Downloader
downloader
=
factory
.
createDownloader
(
factory
.
createDownloader
(
...
...
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