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
ea57e5d2
authored
Sep 25, 2020
by
bachinger
Committed by
kim-vde
Sep 25, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Always pass true for ongoing with the first notification
ISSUE: #7977 PiperOrigin-RevId: 333726625
parent
d1416aeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java
View file @
ea57e5d2
...
...
@@ -989,7 +989,6 @@ public class PlayerNotificationManager {
Notification
notification
=
builder
.
build
();
notificationManager
.
notify
(
notificationId
,
notification
);
if
(!
isNotificationStarted
)
{
isNotificationStarted
=
true
;
context
.
registerReceiver
(
notificationBroadcastReceiver
,
intentFilter
);
if
(
notificationListener
!=
null
)
{
notificationListener
.
onNotificationStarted
(
notificationId
,
notification
);
...
...
@@ -997,8 +996,12 @@ public class PlayerNotificationManager {
}
@Nullable
NotificationListener
listener
=
notificationListener
;
if
(
listener
!=
null
)
{
listener
.
onNotificationPosted
(
notificationId
,
notification
,
ongoing
);
// Always pass true for ongoing with the first notification to tell a service to go into
// foreground even when paused.
listener
.
onNotificationPosted
(
notificationId
,
notification
,
ongoing
||
!
isNotificationStarted
);
}
isNotificationStarted
=
true
;
}
// We're calling a deprecated listener method that we still want to notify.
...
...
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