mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-02-05 19:47:33 +01:00
Add a comment
This commit is contained in:
parent
2847a51674
commit
ece53f7687
@ -752,6 +752,9 @@ class MediaPlayerService : Service() {
|
||||
@JvmStatic
|
||||
fun getInstance(): MediaPlayerService? {
|
||||
val context = UApp.applicationContext()
|
||||
// Try for twenty times to retrieve a running service,
|
||||
// sleep 100 millis between each try,
|
||||
// and run the block that creates a service only synchronized.
|
||||
for (i in 0..19) {
|
||||
if (instance != null) return instance
|
||||
synchronized(instanceLock) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user