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
f6d8cfeb
authored
Sep 16, 2021
by
olly
Committed by
bachinger
Sep 16, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
DownloadService: Remove deprecated protected methods
PiperOrigin-RevId: 397138908
parent
4455554e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
32 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java
RELEASENOTES.md
View file @
f6d8cfeb
...
@@ -85,6 +85,11 @@
...
@@ -85,6 +85,11 @@
`HttpDataSource.Factory.setDefaultRequestProperties`
instead.
`HttpDataSource.Factory.setDefaultRequestProperties`
instead.
*
Remove
`GvrAudioProcessor`
and the GVR extension, which has been
*
Remove
`GvrAudioProcessor`
and the GVR extension, which has been
deprecated since 2.11.0.
deprecated since 2.11.0.
*
Remove
`DownloadService.onDownloadChanged`
and
`DownloadService.onDownloadRemoved`
. Instead, use
`DownloadManager.addListener`
to register a listener directly to
the
`DownloadManager`
returned through
`DownloadService.getDownloadManager`
.
*
Cast extension:
*
Cast extension:
*
Implement
`CastPlayer.setPlaybackParameters(PlaybackParameters)`
to
*
Implement
`CastPlayer.setPlaybackParameters(PlaybackParameters)`
to
support setting the playback speed
support setting the playback speed
...
...
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java
View file @
f6d8cfeb
...
@@ -764,27 +764,6 @@ public abstract class DownloadService extends Service {
...
@@ -764,27 +764,6 @@ public abstract class DownloadService extends Service {
}
}
/**
/**
* @deprecated Some state change events may not be delivered to this method. Instead, use {@link
* DownloadManager#addListener(DownloadManager.Listener)} to register a listener directly to
* the {@link DownloadManager} that you return through {@link #getDownloadManager()}.
*/
@Deprecated
protected
void
onDownloadChanged
(
Download
download
)
{
// Do nothing.
}
/**
* @deprecated Some download removal events may not be delivered to this method. Instead, use
* {@link DownloadManager#addListener(DownloadManager.Listener)} to register a listener
* directly to the {@link DownloadManager} that you return through {@link
* #getDownloadManager()}.
*/
@Deprecated
protected
void
onDownloadRemoved
(
Download
download
)
{
// Do nothing.
}
/**
* Called after the service is created, once the downloads are known.
* Called after the service is created, once the downloads are known.
*
*
* @param downloads The current downloads.
* @param downloads The current downloads.
...
@@ -805,9 +784,7 @@ public abstract class DownloadService extends Service {
...
@@ -805,9 +784,7 @@ public abstract class DownloadService extends Service {
*
*
* @param download The state of the download.
* @param download The state of the download.
*/
*/
@SuppressWarnings
(
"deprecation"
)
private
void
notifyDownloadChanged
(
Download
download
)
{
private
void
notifyDownloadChanged
(
Download
download
)
{
onDownloadChanged
(
download
);
if
(
foregroundNotificationUpdater
!=
null
)
{
if
(
foregroundNotificationUpdater
!=
null
)
{
if
(
needsStartedService
(
download
.
state
))
{
if
(
needsStartedService
(
download
.
state
))
{
foregroundNotificationUpdater
.
startPeriodicUpdates
();
foregroundNotificationUpdater
.
startPeriodicUpdates
();
...
@@ -817,14 +794,8 @@ public abstract class DownloadService extends Service {
...
@@ -817,14 +794,8 @@ public abstract class DownloadService extends Service {
}
}
}
}
/**
/** Called when a download is removed. */
* Called when a download is removed.
private
void
notifyDownloadRemoved
()
{
*
* @param download The last state of the download before it was removed.
*/
@SuppressWarnings
(
"deprecation"
)
private
void
notifyDownloadRemoved
(
Download
download
)
{
onDownloadRemoved
(
download
);
if
(
foregroundNotificationUpdater
!=
null
)
{
if
(
foregroundNotificationUpdater
!=
null
)
{
foregroundNotificationUpdater
.
invalidate
();
foregroundNotificationUpdater
.
invalidate
();
}
}
...
@@ -996,7 +967,7 @@ public abstract class DownloadService extends Service {
...
@@ -996,7 +967,7 @@ public abstract class DownloadService extends Service {
@Override
@Override
public
void
onDownloadRemoved
(
DownloadManager
downloadManager
,
Download
download
)
{
public
void
onDownloadRemoved
(
DownloadManager
downloadManager
,
Download
download
)
{
if
(
downloadService
!=
null
)
{
if
(
downloadService
!=
null
)
{
downloadService
.
notifyDownloadRemoved
(
download
);
downloadService
.
notifyDownloadRemoved
();
}
}
}
}
...
...
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