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
aa7309cd
authored
Sep 24, 2020
by
krocard
Committed by
kim-vde
Sep 25, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Release wakelock when sleeping for offload
#exo-offload PiperOrigin-RevId: 333512383
parent
d97af762
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
View file @
aa7309cd
...
...
@@ -2413,5 +2413,15 @@ public class SimpleExoPlayer extends BasePlayer
boolean
playWhenReady
,
@PlayWhenReadyChangeReason
int
reason
)
{
updateWakeAndWifiLock
();
}
@Override
public
void
onExperimentalSleepingForOffloadChanged
(
boolean
sleepingForOffload
)
{
if
(
sleepingForOffload
)
{
// The wifi lock is not released to avoid interrupting downloads.
wakeLockManager
.
setStayAwake
(
false
);
}
else
{
updateWakeAndWifiLock
();
}
}
}
}
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