Home
last modified time | relevance | path

Searched refs:Lifecycle (Results 1 – 25 of 176) sorted by relevance

12345678

/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
H A DLifecycleFragment.java19 import static androidx.lifecycle.Lifecycle.Event.ON_CREATE;
20 import static androidx.lifecycle.Lifecycle.Event.ON_DESTROY;
21 import static androidx.lifecycle.Lifecycle.Event.ON_PAUSE;
22 import static androidx.lifecycle.Lifecycle.Event.ON_RESUME;
23 import static androidx.lifecycle.Lifecycle.Event.ON_START;
24 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
30 import androidx.lifecycle.Lifecycle;
41 public Lifecycle getLifecycle() { in getLifecycle()
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/core/lifecycle/
H A DObservableDialogFragment.java18 import static androidx.lifecycle.Lifecycle.Event.ON_CREATE;
19 import static androidx.lifecycle.Lifecycle.Event.ON_DESTROY;
20 import static androidx.lifecycle.Lifecycle.Event.ON_PAUSE;
21 import static androidx.lifecycle.Lifecycle.Event.ON_RESUME;
22 import static androidx.lifecycle.Lifecycle.Event.ON_START;
23 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
39 protected final Lifecycle mLifecycle = new Lifecycle(this);
41 public Lifecycle getSettingsLifecycle() { in getSettingsLifecycle()
H A DObservableActivity.java18 import static androidx.lifecycle.Lifecycle.Event.ON_CREATE;
19 import static androidx.lifecycle.Lifecycle.Event.ON_DESTROY;
20 import static androidx.lifecycle.Lifecycle.Event.ON_PAUSE;
21 import static androidx.lifecycle.Lifecycle.Event.ON_RESUME;
22 import static androidx.lifecycle.Lifecycle.Event.ON_START;
23 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
40 private final Lifecycle mLifecycle = new Lifecycle(this);
42 public Lifecycle getSettingsLifecycle() { in getSettingsLifecycle()
H A DObservableFragment.java19 import static androidx.lifecycle.Lifecycle.Event.ON_CREATE;
20 import static androidx.lifecycle.Lifecycle.Event.ON_DESTROY;
21 import static androidx.lifecycle.Lifecycle.Event.ON_PAUSE;
22 import static androidx.lifecycle.Lifecycle.Event.ON_RESUME;
23 import static androidx.lifecycle.Lifecycle.Event.ON_START;
24 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
38 private final Lifecycle mLifecycle = new Lifecycle(this);
40 public Lifecycle getSettingsLifecycle() { in getSettingsLifecycle()
H A DObservablePreferenceFragment.java19 import static androidx.lifecycle.Lifecycle.Event.ON_CREATE;
20 import static androidx.lifecycle.Lifecycle.Event.ON_DESTROY;
21 import static androidx.lifecycle.Lifecycle.Event.ON_PAUSE;
22 import static androidx.lifecycle.Lifecycle.Event.ON_RESUME;
23 import static androidx.lifecycle.Lifecycle.Event.ON_START;
24 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
43 private final Lifecycle mLifecycle = new Lifecycle(this);
45 public Lifecycle getSettingsLifecycle() { in getSettingsLifecycle()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
H A DCallbackControllerTest.java27 import androidx.lifecycle.Lifecycle;
28 import androidx.lifecycle.Lifecycle.Event;
47 Lifecycle lifecycle = mock(Lifecycle.class); in testAddCallback()
65 Lifecycle lifecycle = mock(Lifecycle.class); in testRemoveCallback()
89 owner.setState(Lifecycle.State.RESUMED); in testCallbackIsRemovedOnDestroy()
92 owner.setState(Lifecycle.State.DESTROYED); in testCallbackIsRemovedOnDestroy()
100 public Lifecycle getLifecycle() { in getLifecycle()
104 public void setState(Lifecycle.State state) { in setState()
/aosp14/frameworks/base/libs/hwui/tests/unit/
H A DOpBufferTests.cpp25 Lifecycle, enumerator
52 struct MockOp<MockTypes::Lifecycle> {
100 buffer.push_container(MockOpContainer<Op::Lifecycle> { in TEST()
101 MockOp<MockTypes::Lifecycle>{&tracker} in TEST()
114 buffer.push_container(MockOpContainer<Op::Lifecycle> { in TEST()
115 MockOp<MockTypes::Lifecycle>{&tracker} in TEST()
126 other.push_container(MockOpContainer<MockTypes::Lifecycle> { in TEST()
127 MockOp<MockTypes::Lifecycle>{&tracker} in TEST()
133 buffer.push_container(MockOpContainer<MockTypes::Lifecycle> { in TEST()
134 MockOp<MockTypes::Lifecycle>{&tracker} in TEST()
/aosp14/frameworks/base/core/tests/coretests/src/android/window/
H A DBackNavigationTest.java31 import androidx.lifecycle.Lifecycle;
69 mScenario.moveToState(Lifecycle.State.RESUMED); in registerCallback_initialized()
75 mScenario.moveToState(Lifecycle.State.CREATED); in registerCallback_created()
77 mScenario.moveToState(Lifecycle.State.STARTED); in registerCallback_created()
78 mScenario.moveToState(Lifecycle.State.RESUMED); in registerCallback_created()
84 mScenario.moveToState(Lifecycle.State.CREATED); in registerCallback_resumed()
85 mScenario.moveToState(Lifecycle.State.STARTED); in registerCallback_resumed()
86 mScenario.moveToState(Lifecycle.State.RESUMED); in registerCallback_resumed()
/aosp14/frameworks/base/packages/SettingsLib/ActionBarShadow/src/com/android/settingslib/widget/
H A DActionBarShadowController.java19 import static androidx.lifecycle.Lifecycle.Event.ON_START;
20 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
27 import androidx.lifecycle.Lifecycle;
51 Activity activity, Lifecycle lifecycle, View scrollView) { in attachToView()
59 View anchorView, Lifecycle lifecycle, View scrollView) { in attachToView()
63 private ActionBarShadowController(Activity activity, Lifecycle lifecycle, View scrollView) { in ActionBarShadowController()
70 private ActionBarShadowController(View anchorView, Lifecycle lifecycle, View scrollView) { in ActionBarShadowController()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/lifecycle/
H A DRepeatWhenAttachedTest.kt22 import androidx.lifecycle.Lifecycle
119 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.CREATED)
131 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.CREATED)
144 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.STARTED)
157 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.CREATED)
171 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.RESUMED)
187 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.STARTED)
203 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.CREATED)
223 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.RESUMED)
309 val lifecycleState: Lifecycle.State
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/lifecycle/
H A DRepeatWhenAttached.kt23 import androidx.lifecycle.Lifecycle
158 registry.currentState = Lifecycle.State.CREATED
167 registry.currentState = Lifecycle.State.DESTROYED
170 override val lifecycle: Lifecycle
178 view.windowVisibility != View.VISIBLE -> Lifecycle.State.CREATED
179 !view.hasWindowFocus() -> Lifecycle.State.STARTED
180 else -> Lifecycle.State.RESUMED
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/dreams/
H A DDreamOverlayService.java35 import androidx.lifecycle.Lifecycle;
109 if (getCurrentStateLocked() != Lifecycle.State.RESUMED
110 && getCurrentStateLocked() != Lifecycle.State.STARTED) {
115 expanded ? Lifecycle.State.STARTED : Lifecycle.State.RESUMED);
197 mExecutor.execute(() -> setCurrentStateLocked(Lifecycle.State.CREATED)); in DreamOverlayService()
205 setCurrentStateLocked(Lifecycle.State.DESTROYED); in onDestroy()
217 setCurrentStateLocked(Lifecycle.State.STARTED); in onStartDream()
247 setCurrentStateLocked(Lifecycle.State.RESUMED); in onStartDream()
263 private Lifecycle.State getCurrentStateLocked() { in getCurrentStateLocked()
267 private void setCurrentStateLocked(Lifecycle.State state) { in setCurrentStateLocked()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/
H A DLifecycleFragmentTest.java19 import static androidx.lifecycle.Lifecycle.Event.ON_CREATE;
20 import static androidx.lifecycle.Lifecycle.Event.ON_DESTROY;
21 import static androidx.lifecycle.Lifecycle.Event.ON_PAUSE;
22 import static androidx.lifecycle.Lifecycle.Event.ON_RESUME;
23 import static androidx.lifecycle.Lifecycle.Event.ON_START;
24 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/
H A DSuggestionControllerMixinCompatTest.java19 import static androidx.lifecycle.Lifecycle.Event.ON_START;
20 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
34 import com.android.settingslib.core.lifecycle.Lifecycle;
55 private Lifecycle mLifecycle;
63 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
H A DSuggestionControllerMixinTest.java19 import static androidx.lifecycle.Lifecycle.Event.ON_START;
20 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
34 import com.android.settingslib.core.lifecycle.Lifecycle;
55 private Lifecycle mLifecycle;
63 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/aosp14/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/compose/
H A DLifecycleEffect.kt22 import androidx.lifecycle.Lifecycle
33 if (event == Lifecycle.Event.ON_START) {
35 } else if (event == Lifecycle.Event.ON_STOP) {
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/
H A DActionBarShadowControllerTest.java19 import static androidx.lifecycle.Lifecycle.Event.ON_START;
20 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
37 import com.android.settingslib.core.lifecycle.Lifecycle;
58 private Lifecycle mLifecycle;
68 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ui/binder/
H A DInternetTileBinder.kt19 import androidx.lifecycle.Lifecycle
32 lifecycle: Lifecycle,
37 lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED) {
/aosp14/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/statusbar/policy/
H A DCallbackController.java19 import androidx.lifecycle.Lifecycle;
20 import androidx.lifecycle.Lifecycle.Event;
44 default T observe(Lifecycle lifecycle, T listener) { in observe()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/
H A DKeyguardPreviewClockViewBinder.kt22 import androidx.lifecycle.Lifecycle
37 repeatOnLifecycle(Lifecycle.State.STARTED) {
43 repeatOnLifecycle(Lifecycle.State.STARTED) {
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/management/
H A DAppAdapterTest.kt26 import com.android.settingslib.core.lifecycle.Lifecycle
54 @Mock lateinit var lifecycle: Lifecycle
74 verify(controlsListingController).observe(any(Lifecycle::class.java), captor.capture())
91 verify(controlsListingController).observe(any(Lifecycle::class.java), captor.capture())
109 verify(controlsListingController).observe(any(Lifecycle::class.java), captor.capture())
127 verify(controlsListingController).observe(any(Lifecycle::class.java), captor.capture())
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/suggestions/
H A DSuggestionControllerMixin.java30 import com.android.settingslib.core.lifecycle.Lifecycle;
67 Lifecycle lifecycle, ComponentName componentName) { in SuggestionControllerMixin()
77 @OnLifecycleEvent(Lifecycle.Event.ON_START)
85 @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
H A DSuggestionControllerMixinCompat.java31 import com.android.settingslib.core.lifecycle.Lifecycle;
66 Lifecycle lifecycle, ComponentName componentName) { in SuggestionControllerMixinCompat()
76 @OnLifecycleEvent(Lifecycle.Event.ON_START)
84 @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/
H A DAccessPointControllerImpl.java28 import androidx.lifecycle.Lifecycle;
80 mMainExecutor.execute(() -> mLifecycle.setCurrentState(Lifecycle.State.CREATED)); in AccessPointControllerImpl()
96 public Lifecycle getLifecycle() { in getLifecycle()
102 mMainExecutor.execute(() -> mLifecycle.setCurrentState(Lifecycle.State.DESTROYED)); in finalize()
127 mMainExecutor.execute(() -> mLifecycle.setCurrentState(Lifecycle.State.STARTED)); in addAccessPointCallback()
137 mMainExecutor.execute(() -> mLifecycle.setCurrentState(Lifecycle.State.CREATED)); in removeAccessPointCallback()
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/
H A DIpAddressPreferenceControllerTest.java30 import com.android.settingslib.core.lifecycle.Lifecycle;
47 private Lifecycle mLifecycle;
78 private ConcreteIpAddressPreferenceController(Context context, Lifecycle lifecycle) { in ConcreteIpAddressPreferenceController()

12345678