INNER CODE UNIT · Kotlin
onServiceDisconnected
jellyfin/jellyfin-android · app/src/main/java/org/jellyfin/mobile/MainActivity.kt:59
override fun onServiceDisconnected(componentName: ComponentName) {
serviceBinder = null
}
}
private val orientationListener: OrientationEventListener by lazy { SmartOrientationListener(this) }
/**
* Passes back press events onto the currently visible [Fragment] if it implements the [BackPressInterceptor] interface.
*
* If the current fragment does not implement [BackPressInterceptor] or has decided not to intercept the event
* (see result of [BackPressInterceptor.onInterceptBackPressed]), the topmost backstack entry will be popped.
*
* If there is no topmost backstack entry, the event will be passed onto the dispatcher's fallback handler.
*/
private val onBackPressedCallback: OnBackPressedCallback.() -> Unit = callback@{
val currentFragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
if (currentFragment is BackPressInterceptor && currentFragment.onInterceptBackPressed()) {