summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Anvesh Renikindi <renikindi@google.com> 2023-09-13 16:29:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-09-13 16:29:32 +0000
commit2d7cf7d4c5d7424eca7cefd631027b8e6979e5be (patch)
tree91b452ff8b9636f16a150b8fcb5b5ac098cabcbb
parentb1ab8e9d84eb4688c09442f4c0689350a8f9a574 (diff)
parent562eabae75ef0a9087d87e0735b903c0e5d3b1e4 (diff)
Merge "Revert^2 "Lifecycle has to use kotlin syntax"" into aosp-main-future
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/management/ControlsProviderSelectorActivity.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/controls/ui/ControlsActivity.kt2
-rw-r--r--packages/SystemUI/src/com/android/systemui/dreams/DreamOverlayLifecycleOwner.kt7
-rw-r--r--packages/SystemUI/src/com/android/systemui/lifecycle/RepeatWhenAttached.kt7
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 =