playback: fix notif not responding to settings
Fix an issue where changes in image settings would not cause the notification to respond.
This commit is contained in:
parent
a8691cf693
commit
43036cfd59
1 changed files with 4 additions and 1 deletions
|
@ -55,9 +55,10 @@ class MediaSessionComponent
|
||||||
@Inject
|
@Inject
|
||||||
constructor(
|
constructor(
|
||||||
@ApplicationContext private val context: Context,
|
@ApplicationContext private val context: Context,
|
||||||
private val bitmapProvider: BitmapProvider,
|
|
||||||
private val playbackManager: PlaybackStateManager,
|
private val playbackManager: PlaybackStateManager,
|
||||||
private val playbackSettings: PlaybackSettings,
|
private val playbackSettings: PlaybackSettings,
|
||||||
|
private val bitmapProvider: BitmapProvider,
|
||||||
|
private val imageSettings: ImageSettings
|
||||||
) :
|
) :
|
||||||
MediaSessionCompat.Callback(),
|
MediaSessionCompat.Callback(),
|
||||||
PlaybackStateManager.Listener,
|
PlaybackStateManager.Listener,
|
||||||
|
@ -76,6 +77,7 @@ constructor(
|
||||||
init {
|
init {
|
||||||
playbackManager.addListener(this)
|
playbackManager.addListener(this)
|
||||||
playbackSettings.registerListener(this)
|
playbackSettings.registerListener(this)
|
||||||
|
imageSettings.registerListener(this)
|
||||||
mediaSession.setCallback(this)
|
mediaSession.setCallback(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +107,7 @@ constructor(
|
||||||
listener = null
|
listener = null
|
||||||
bitmapProvider.release()
|
bitmapProvider.release()
|
||||||
playbackSettings.unregisterListener(this)
|
playbackSettings.unregisterListener(this)
|
||||||
|
imageSettings.unregisterListener(this)
|
||||||
playbackManager.removeListener(this)
|
playbackManager.removeListener(this)
|
||||||
mediaSession.apply {
|
mediaSession.apply {
|
||||||
isActive = false
|
isActive = false
|
||||||
|
|
Loading…
Reference in a new issue