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
118f0b39
authored
Apr 21, 2020
by
gyumin
Committed by
Ian Baker
Apr 27, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Prevent StreamVolumeManager from being released twice
PiperOrigin-RevId: 307534335
parent
628234fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
library/core/src/main/java/com/google/android/exoplayer2/StreamVolumeManager.java
library/core/src/main/java/com/google/android/exoplayer2/StreamVolumeManager.java
View file @
118f0b39
...
@@ -53,6 +53,7 @@ import com.google.android.exoplayer2.util.Util;
...
@@ -53,6 +53,7 @@ import com.google.android.exoplayer2.util.Util;
@C
.
StreamType
private
int
streamType
;
@C
.
StreamType
private
int
streamType
;
private
int
volume
;
private
int
volume
;
private
boolean
muted
;
private
boolean
muted
;
private
boolean
released
;
/** Creates a manager. */
/** Creates a manager. */
public
StreamVolumeManager
(
Context
context
,
Handler
eventHandler
,
Listener
listener
)
{
public
StreamVolumeManager
(
Context
context
,
Handler
eventHandler
,
Listener
listener
)
{
...
@@ -158,7 +159,11 @@ import com.google.android.exoplayer2.util.Util;
...
@@ -158,7 +159,11 @@ import com.google.android.exoplayer2.util.Util;
/** Releases the manager. It must be called when the manager is no longer required. */
/** Releases the manager. It must be called when the manager is no longer required. */
public
void
release
()
{
public
void
release
()
{
if
(
released
)
{
return
;
}
applicationContext
.
unregisterReceiver
(
receiver
);
applicationContext
.
unregisterReceiver
(
receiver
);
released
=
true
;
}
}
private
void
updateVolumeAndNotifyIfChanged
()
{
private
void
updateVolumeAndNotifyIfChanged
()
{
...
...
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