Cleanup MediaPlayerLifecycleSupport.kt
This commit is contained in:
parent
69c78f4c37
commit
81d24f6cbb
|
@ -27,8 +27,6 @@ class MediaPlayerLifecycleSupport : KoinComponent {
|
||||||
private val mediaPlayerController by inject<MediaPlayerController>()
|
private val mediaPlayerController by inject<MediaPlayerController>()
|
||||||
|
|
||||||
private var created = false
|
private var created = false
|
||||||
private var headsetEventReceiver: BroadcastReceiver? = null
|
|
||||||
private var mediaButtonEventSubscription: Disposable? = null
|
|
||||||
|
|
||||||
fun onCreate() {
|
fun onCreate() {
|
||||||
onCreate(false, null)
|
onCreate(false, null)
|
||||||
|
@ -73,8 +71,6 @@ class MediaPlayerLifecycleSupport : KoinComponent {
|
||||||
)
|
)
|
||||||
|
|
||||||
mediaPlayerController.clear(false)
|
mediaPlayerController.clear(false)
|
||||||
mediaButtonEventSubscription?.dispose()
|
|
||||||
applicationContext().unregisterReceiver(headsetEventReceiver)
|
|
||||||
mediaPlayerController.onDestroy()
|
mediaPlayerController.onDestroy()
|
||||||
|
|
||||||
created = false
|
created = false
|
||||||
|
|
Loading…
Reference in New Issue