Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
657f2925
Commit
657f2925
authored
Apr 29, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat : PlayService ANR问题修复
parent
f526aab6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
17 deletions
+26
-17
config.gradle
config.gradle
+12
-12
PlayService.kt
ydl-media/src/main/java/com/ydl/media/audio/PlayService.kt
+10
-1
NotifyManager.kt
ydl-media/src/main/java/com/ydl/media/audio/manager/NotifyManager.kt
+4
-4
No files found.
config.gradle
View file @
657f2925
...
@@ -5,18 +5,18 @@ ext {
...
@@ -5,18 +5,18 @@ ext {
ydlPublishVersion
=
[
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.49.6
5
"
,
"m-confide"
:
"0.0.49.6
9
"
,
"m-consultant"
:
"0.0.60.16"
,
"m-consultant"
:
"0.0.60.16"
,
"m-fm"
:
"0.0.30.0
4
"
,
"m-fm"
:
"0.0.30.0
8
"
,
"m-user"
:
"0.0.62.04"
,
"m-user"
:
"0.0.62.04"
,
"m-home"
:
"0.0.23.1
7
"
,
"m-home"
:
"0.0.23.1
8
"
,
"m-im"
:
"0.0.21.29"
,
"m-im"
:
"0.0.21.29"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.10"
,
"m-article"
:
"0.0.0.10"
,
"m-muse"
:
"0.0.28.2
7
"
,
"m-muse"
:
"0.0.28.2
8
"
,
"m-tests"
:
"0.0.24.18"
,
"m-tests"
:
"0.0.24.18"
,
"m-course"
:
"0.0.43.3
6
"
,
"m-course"
:
"0.0.43.3
7
"
,
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.6"
,
"m-audioim-api"
:
"0.0.6"
,
...
@@ -40,7 +40,7 @@ ext {
...
@@ -40,7 +40,7 @@ ext {
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.61"
,
"ydl-webview"
:
"0.0.38.61"
,
"ydl-media"
:
"0.0.21.4
2
"
,
"ydl-media"
:
"0.0.21.4
4
"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.85"
,
"m-audioim"
:
"0.0.49.29.85"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
...
@@ -92,18 +92,18 @@ ext {
...
@@ -92,18 +92,18 @@ ext {
// -------------- 业务模块 --------------
// -------------- 业务模块 --------------
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.49.6
5
"
,
"m-confide"
:
"0.0.49.6
9
"
,
"m-consultant"
:
"0.0.60.16"
,
"m-consultant"
:
"0.0.60.16"
,
"m-fm"
:
"0.0.30.0
7
"
,
"m-fm"
:
"0.0.30.0
8
"
,
"m-user"
:
"0.0.62.04"
,
"m-user"
:
"0.0.62.04"
,
"m-home"
:
"0.0.23.1
7
"
,
"m-home"
:
"0.0.23.1
8
"
,
"m-im"
:
"0.0.21.29"
,
"m-im"
:
"0.0.21.29"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-dynamic"
:
"0.0.7.35"
,
"m-article"
:
"0.0.0.8"
,
"m-article"
:
"0.0.0.8"
,
"m-muse"
:
"0.0.28.2
7
"
,
"m-muse"
:
"0.0.28.2
8
"
,
"m-tests"
:
"0.0.24.18"
,
"m-tests"
:
"0.0.24.18"
,
"m-course"
:
"0.0.43.3
6
"
,
"m-course"
:
"0.0.43.3
7
"
,
//-------------- 业务模块 API 层 --------------
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.6"
,
"m-audioim-api"
:
"0.0.6"
,
"m-confide-api"
:
"0.0.2.11"
,
"m-confide-api"
:
"0.0.2.11"
,
...
@@ -125,7 +125,7 @@ ext {
...
@@ -125,7 +125,7 @@ ext {
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.61"
,
"ydl-webview"
:
"0.0.38.61"
,
"ydl-media"
:
"0.0.21.4
2
"
,
"ydl-media"
:
"0.0.21.4
4
"
,
"ydl-pay"
:
"0.0.18.19"
,
"ydl-pay"
:
"0.0.18.19"
,
"m-audioim"
:
"0.0.49.29.85"
,
"m-audioim"
:
"0.0.49.29.85"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
"ydl-flutter-base"
:
"0.0.14.38"
,
...
...
ydl-media/src/main/java/com/ydl/media/audio/PlayService.kt
View file @
657f2925
...
@@ -66,7 +66,16 @@ class PlayService : Service() {
...
@@ -66,7 +66,16 @@ class PlayService : Service() {
fun
startCommand
(
context
:
Context
,
action
:
String
)
{
fun
startCommand
(
context
:
Context
,
action
:
String
)
{
val
intent
=
Intent
(
context
,
PlayService
::
class
.
java
)
val
intent
=
Intent
(
context
,
PlayService
::
class
.
java
)
intent
.
action
=
action
intent
.
action
=
action
context
.
startService
(
intent
)
try
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
context
.
startForegroundService
(
intent
)
}
else
{
context
.
startService
(
intent
)
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
}
}
}
}
ydl-media/src/main/java/com/ydl/media/audio/manager/NotifyManager.kt
View file @
657f2925
...
@@ -47,19 +47,19 @@ class NotifyManager private constructor() {
...
@@ -47,19 +47,19 @@ class NotifyManager private constructor() {
if
(
music
==
null
)
{
if
(
music
==
null
)
{
return
return
}
}
playService
!!
.
startForeground
(
NOTIFICATION_ID
,
buildNotification
(
playService
!!
,
music
,
true
))
playService
?
.
startForeground
(
NOTIFICATION_ID
,
buildNotification
(
playService
!!
,
music
,
true
))
}
}
fun
showPause
(
music
:
Music
?)
{
fun
showPause
(
music
:
Music
?)
{
if
(
music
==
null
)
{
if
(
music
==
null
)
{
return
return
}
}
playService
!!
.
stopForeground
(
false
)
playService
?
.
stopForeground
(
false
)
notificationManager
!!
.
notify
(
NOTIFICATION_ID
,
buildNotification
(
playService
!!
,
music
,
false
))
notificationManager
?
.
notify
(
NOTIFICATION_ID
,
buildNotification
(
playService
!!
,
music
,
false
))
}
}
fun
cancelAll
()
{
fun
cancelAll
()
{
notificationManager
!!
.
cancelAll
()
notificationManager
?
.
cancelAll
()
}
}
@SuppressLint
(
"WrongConstant"
)
@SuppressLint
(
"WrongConstant"
)
...
...
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