Fix security exception when initializing controller
This commit is contained in:
parent
b8d3e50c26
commit
44f0db3ad6
2 changed files with 5 additions and 1 deletions
|
@ -212,6 +212,10 @@ class MainActivity : SimpleMusicActivity(), Player.Listener {
|
|||
if (complete) {
|
||||
loading_progress_bar.hide()
|
||||
}
|
||||
|
||||
withPlayer {
|
||||
sendCommand(CustomCommands.RELOAD_CONTENT)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue