Merge "Revert^2 "Lifecycle has to use kotlin syntax"" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
416d4149c9
@@ -154,7 +154,7 @@ open class ControlsEditingActivity @Inject constructor(
|
||||
private fun bindViews() {
|
||||
setContentView(R.layout.controls_management)
|
||||
|
||||
getLifecycle().addObserver(
|
||||
lifecycle.addObserver(
|
||||
ControlsAnimations.observerForAnimations(
|
||||
requireViewById<ViewGroup>(R.id.controls_management_root),
|
||||
window,
|
||||
|
||||
@@ -268,7 +268,7 @@ open class ControlsFavoritingActivity @Inject constructor(
|
||||
private fun bindViews() {
|
||||
setContentView(R.layout.controls_management)
|
||||
|
||||
getLifecycle().addObserver(
|
||||
lifecycle.addObserver(
|
||||
ControlsAnimations.observerForAnimations(
|
||||
requireViewById<ViewGroup>(R.id.controls_management_root),
|
||||
window,
|
||||
|
||||
@@ -91,7 +91,7 @@ open class ControlsProviderSelectorActivity @Inject constructor(
|
||||
|
||||
setContentView(R.layout.controls_management)
|
||||
|
||||
getLifecycle().addObserver(
|
||||
lifecycle.addObserver(
|
||||
ControlsAnimations.observerForAnimations(
|
||||
requireViewById<ViewGroup>(R.id.controls_management_root),
|
||||
window,
|
||||
|
||||
@@ -72,7 +72,7 @@ open class ControlsActivity @Inject constructor(
|
||||
|
||||
setContentView(R.layout.controls_fullscreen)
|
||||
|
||||
getLifecycle().addObserver(
|
||||
lifecycle.addObserver(
|
||||
ControlsAnimations.observerForAnimations(
|
||||
requireViewById(R.id.control_detail_root),
|
||||
window,
|
||||
|
||||
@@ -28,7 +28,8 @@ import javax.inject.Inject
|
||||
class DreamOverlayLifecycleOwner @Inject constructor() : LifecycleOwner {
|
||||
val registry: LifecycleRegistry = LifecycleRegistry(this)
|
||||
|
||||
override fun getLifecycle(): Lifecycle {
|
||||
return registry
|
||||
}
|
||||
override val lifecycle: Lifecycle
|
||||
get() {
|
||||
return registry
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,9 +167,10 @@ class ViewLifecycleOwner(
|
||||
registry.currentState = Lifecycle.State.DESTROYED
|
||||
}
|
||||
|
||||
override fun getLifecycle(): Lifecycle {
|
||||
return registry
|
||||
}
|
||||
override val lifecycle: Lifecycle
|
||||
get() {
|
||||
return registry
|
||||
}
|
||||
|
||||
private fun updateState() {
|
||||
registry.currentState =
|
||||
|
||||
Reference in New Issue
Block a user