File tree Expand file tree Collapse file tree
app/src/main/java/com/nextcloud/client/media Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ class BackgroundPlayerService :
7979
8080 private lateinit var exoPlayer: ExoPlayer
8181 private var mediaSession: MediaSession ? = null
82-
8382 private var isPlayerReady = false
8483
8584 private val stopReceiver = object : BroadcastReceiver () {
@@ -115,6 +114,7 @@ class BackgroundPlayerService :
115114 0
116115 }
117116 )
117+
118118 return super .onStartCommand(intent, flags, startId)
119119 }
120120
@@ -164,7 +164,6 @@ class BackgroundPlayerService :
164164 }
165165
166166 val realPlayer = createNextcloudExoplayer(this @BackgroundPlayerService, nextcloudClient)
167-
168167 exoPlayer.release()
169168 exoPlayer = realPlayer
170169 isPlayerReady = true
@@ -273,6 +272,7 @@ class BackgroundPlayerService :
273272 }
274273 val nm = getSystemService(NOTIFICATION_SERVICE ) as NotificationManager
275274 nm.cancel(DefaultMediaNotificationProvider .DEFAULT_NOTIFICATION_ID )
275+ stopForeground(STOP_FOREGROUND_REMOVE )
276276 stopSelf()
277277 }
278278
You can’t perform that action at this time.
0 commit comments