diff options
| author | 2023-05-11 17:20:42 +0000 | |
|---|---|---|
| committer | 2023-09-12 16:32:40 +0000 | |
| commit | 562eabae75ef0a9087d87e0735b903c0e5d3b1e4 (patch) | |
| tree | 962cd9bac9a41878ab7aa8ddf71a2e6a73b86f8a | |
| parent | 80634316686ef25b61a766a07fdfb4d22a53d72b (diff) | |
Revert^2 "Lifecycle has to use kotlin syntax"
b7adc6843c2f236b237bf2314b9f6094e3c086b0
Change-Id: I170a7b21ca63c8e655bfb1735e33c9b163ff3d72
Merged-In: I170a7b21ca63c8e655bfb1735e33c9b163ff3d72
(cherry picked from commit 204693859147e3c2e4b552569e57bf3e6588f426)
(cherry picked from commit 08e2fd0c4a0b04e01100377dca340dfc49ae1e4a)
(cherry picked from commit 280994a57cf612dcda7b7b70d43e9d9dbf52dfd0)
6 files changed, 12 insertions, 10 deletions
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 d629e3ea365e..8e41974b9acc 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) - getLifecycle().addObserver( + lifecycle.addObserver( ControlsAnimations.observerForAnimations( requireViewById<ViewGroup>(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 3d93999786a6..21051e7abe1f 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) - getLifecycle().addObserver( + lifecycle.addObserver( ControlsAnimations.observerForAnimations( requireViewById<ViewGroup>(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 fb19ac99d19e..d5b8693af42d 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) - getLifecycle().addObserver( + lifecycle.addObserver( ControlsAnimations.observerForAnimations( requireViewById<ViewGroup>(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 4a22e4eecc2b..557dcf4accc7 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt @@ -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, diff --git a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt index 83253563e969..003d2c73fa06 100644 --- a/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt +++ b/packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt @@ -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 + } } diff --git a/packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt b/packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt index 1cb0e76a2ec9..5f7991e62cd7 100644 --- a/packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt +++ b/packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt @@ -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 = |