Fix security exception when initializing controller

This commit is contained in:
Naveen 2023-08-13 19:21:36 +05:30
parent b8d3e50c26
commit 44f0db3ad6
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3
2 changed files with 5 additions and 1 deletions

View file

@ -212,6 +212,10 @@ class MainActivity : SimpleMusicActivity(), Player.Listener {
if (complete) {
loading_progress_bar.hide()
}
withPlayer {
sendCommand(CustomCommands.RELOAD_CONTENT)
}
}
}
}

View file

@ -59,7 +59,7 @@ abstract class SimpleControllerActivity : SimpleActivity(), Player.Listener {
private fun newControllerAsync() {
controllerFuture = MediaController
.Builder(this, SessionToken(this, ComponentName(this, PlaybackService::class.java)))
.Builder(applicationContext, SessionToken(this, ComponentName(this, PlaybackService::class.java)))
.buildAsync()
controllerFuture.addListener({