diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt index 8e41974b9acca..d629e3ea365e7 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt @@ -154,7 +154,7 @@ open class ControlsEditingActivity @Inject constructor( private fun bindViews() { setContentView(R.layout.controls_management) - lifecycle.addObserver( + getLifecycle().addObserver( ControlsAnimations.observerForAnimations( requireViewById(R.id.controls_management_root), window, diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt index d3aa449b9cad3..d3ffc95853355 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt @@ -268,7 +268,7 @@ open class ControlsFavoritingActivity @Inject constructor( private fun bindViews() { setContentView(R.layout.controls_management) - lifecycle.addObserver( + getLifecycle().addObserver( ControlsAnimations.observerForAnimations( requireViewById(R.id.controls_management_root), window, diff --git a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsProviderSelectorActivity.kt b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsProviderSelectorActivity.kt index 782913ef07c8f..e60063248fb0d 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/management/ControlsProviderSelectorActivity.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/management/ControlsProviderSelectorActivity.kt @@ -91,7 +91,7 @@ open class ControlsProviderSelectorActivity @Inject constructor( setContentView(R.layout.controls_management) - lifecycle.addObserver( + getLifecycle().addObserver( ControlsAnimations.observerForAnimations( requireViewById(R.id.controls_management_root), window, diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt index bb10a966a03ef..c964b9654955f 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt @@ -71,7 +71,7 @@ open class ControlsActivity @Inject constructor( setContentView(R.layout.controls_fullscreen) - lifecycle.addObserver( + getLifecycle().addObserver( ControlsAnimations.observerForAnimations( requireViewById(R.id.control_detail_root), window, diff --git a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt index 003d2c73fa061..83253563e9699 100644 --- a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt +++ b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt @@ -28,8 +28,7 @@ import javax.inject.Inject class DreamOverlayLifecycleOwner @Inject constructor() : LifecycleOwner { val registry: LifecycleRegistry = LifecycleRegistry(this) - override val lifecycle: Lifecycle - get() { - return registry - } + override fun getLifecycle(): Lifecycle { + return registry + } } diff --git a/packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt b/packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt index e06483990c90b..34a67403fc845 100644 --- a/packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt +++ b/packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt @@ -167,10 +167,9 @@ class ViewLifecycleOwner( registry.currentState = Lifecycle.State.DESTROYED } - override val lifecycle: Lifecycle - get() { - return registry - } + override fun getLifecycle(): Lifecycle { + return registry + } private fun updateState() { registry.currentState =