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() {
|
private fun bindViews() {
|
||||||
setContentView(R.layout.controls_management)
|
setContentView(R.layout.controls_management)
|
||||||
|
|
||||||
getLifecycle().addObserver(
|
lifecycle.addObserver(
|
||||||
ControlsAnimations.observerForAnimations(
|
ControlsAnimations.observerForAnimations(
|
||||||
requireViewById<ViewGroup>(R.id.controls_management_root),
|
requireViewById<ViewGroup>(R.id.controls_management_root),
|
||||||
window,
|
window,
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ open class ControlsFavoritingActivity @Inject constructor(
|
|||||||
private fun bindViews() {
|
private fun bindViews() {
|
||||||
setContentView(R.layout.controls_management)
|
setContentView(R.layout.controls_management)
|
||||||
|
|
||||||
getLifecycle().addObserver(
|
lifecycle.addObserver(
|
||||||
ControlsAnimations.observerForAnimations(
|
ControlsAnimations.observerForAnimations(
|
||||||
requireViewById<ViewGroup>(R.id.controls_management_root),
|
requireViewById<ViewGroup>(R.id.controls_management_root),
|
||||||
window,
|
window,
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ open class ControlsProviderSelectorActivity @Inject constructor(
|
|||||||
|
|
||||||
setContentView(R.layout.controls_management)
|
setContentView(R.layout.controls_management)
|
||||||
|
|
||||||
getLifecycle().addObserver(
|
lifecycle.addObserver(
|
||||||
ControlsAnimations.observerForAnimations(
|
ControlsAnimations.observerForAnimations(
|
||||||
requireViewById<ViewGroup>(R.id.controls_management_root),
|
requireViewById<ViewGroup>(R.id.controls_management_root),
|
||||||
window,
|
window,
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ open class ControlsActivity @Inject constructor(
|
|||||||
|
|
||||||
setContentView(R.layout.controls_fullscreen)
|
setContentView(R.layout.controls_fullscreen)
|
||||||
|
|
||||||
getLifecycle().addObserver(
|
lifecycle.addObserver(
|
||||||
ControlsAnimations.observerForAnimations(
|
ControlsAnimations.observerForAnimations(
|
||||||
requireViewById(R.id.control_detail_root),
|
requireViewById(R.id.control_detail_root),
|
||||||
window,
|
window,
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ import javax.inject.Inject
|
|||||||
class DreamOverlayLifecycleOwner @Inject constructor() : LifecycleOwner {
|
class DreamOverlayLifecycleOwner @Inject constructor() : LifecycleOwner {
|
||||||
val registry: LifecycleRegistry = LifecycleRegistry(this)
|
val registry: LifecycleRegistry = LifecycleRegistry(this)
|
||||||
|
|
||||||
override fun getLifecycle(): Lifecycle {
|
override val lifecycle: Lifecycle
|
||||||
|
get() {
|
||||||
return registry
|
return registry
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,7 +167,8 @@ class ViewLifecycleOwner(
|
|||||||
registry.currentState = Lifecycle.State.DESTROYED
|
registry.currentState = Lifecycle.State.DESTROYED
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getLifecycle(): Lifecycle {
|
override val lifecycle: Lifecycle
|
||||||
|
get() {
|
||||||
return registry
|
return registry
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user