Home
last modified time | relevance | path

Searched refs:mLifecycleOwner (Results 1 – 25 of 63) sorted by relevance

123

/packages/apps/Car/libs/car-arch-common/tests/robotests/src/com/android/car/arch/common/
DLiveDataFunctionsTest.java59 public final TestLifecycleOwner mLifecycleOwner = new TestLifecycleOwner(); field in LiveDataFunctionsTest
64 nullLiveData().observe(mLifecycleOwner, observer); in testNullLiveData()
74 trueLiveData().observe(mLifecycleOwner, observer); in testTrueLiveData()
84 falseLiveData().observe(mLifecycleOwner, observer); in testFalseLiveData()
116 distinct.observe(mLifecycleOwner, observer); in testDistinct()
138 freezable.observe(mLifecycleOwner, observer); in testFreezable()
201 LiveDataFunctions.and(trueLiveData(), source).observe(mLifecycleOwner, observer); in testAnd_changeValue()
243 LiveDataFunctions.or(trueLiveData(), source).observe(mLifecycleOwner, observer); in testOr_changeValue()
282 .observe(mLifecycleOwner, observer); in testIff_changePredicate()
311 .observe(mLifecycleOwner, observer); in testIff_changeValue()
[all …]
DLoadingSwitchMapTest.java44 public final TestLifecycleOwner mLifecycleOwner = new TestLifecycleOwner(); field in LoadingSwitchMapTest
61 underTest.observe(mLifecycleOwner, mObserver); in testIsLoading_uninitialized()
72 underTest.observe(mLifecycleOwner, mObserver); in testIsLoading_initializedTrigger()
86 underTest.observe(mLifecycleOwner, mObserver); in testIsLoading_alreadyLoaded()
97 underTest.observe(mLifecycleOwner, mObserver); in testIsLoading_normalFlow()
117 underTest.observe(mLifecycleOwner, mObserver); in testIsLoading_secondLoad()
/packages/apps/Car/libs/car-media-common/tests/robotests/src/com/android/car/media/common/playback/
DProgressLiveDataTest.java58 public final TestLifecycleOwner mLifecycleOwner = new TestLifecycleOwner(); field in ProgressLiveDataTest
93 mProgressLiveData.observe(mLifecycleOwner, progressObserver); in testSetsValueOnActive()
104 mProgressLiveData.observe(mLifecycleOwner, progressObserver); in testUnknownProgress()
114 mProgressLiveData.observe(mLifecycleOwner, progressObserver); in testMovesForwardAtNormalSpeed()
127 mProgressLiveData.observe(mLifecycleOwner, progressObserver); in testMovesForwardAtCustomSpeed()
142 mProgressLiveData.observe(mLifecycleOwner, progressObserver); in testDoesntMoveForwardWhenPaused()
156 mProgressLiveData.observe(mLifecycleOwner, progressObserver); in testDoesntMoveForwardWhenStopped()
170 mProgressLiveData.observe(mLifecycleOwner, progressObserver); in testDoesntUpdateWhenInactive()
171 mLifecycleOwner.markState(Lifecycle.State.DESTROYED); in testDoesntUpdateWhenInactive()
DPlaybackViewModelTest.java68 public final TestLifecycleOwner mLifecycleOwner = new TestLifecycleOwner(); field in PlaybackViewModelTest
99 mPlaybackViewModel.getMetadata().observe(mLifecycleOwner, observer); in testGetMetadata()
114 mPlaybackViewModel.getPlaybackStateWrapper().observe(mLifecycleOwner, observer); in testGetPlaybackState()
132 mPlaybackViewModel.getQueue().observe(mLifecycleOwner, observer); in testGetSanitizedQueue()
150 mPlaybackViewModel.hasQueue().observe(mLifecycleOwner, observer); in testGetHasQueue_null()
165 mPlaybackViewModel.hasQueue().observe(mLifecycleOwner, observer); in testGetHasQueue_empty()
181 mPlaybackViewModel.hasQueue().observe(mLifecycleOwner, observer); in testGetHasQueue_true()
210 mPlaybackViewModel.getMetadata().observe(mLifecycleOwner, mediaItemMetadata -> { in testChangeMediaSource_consistentController()
219 mPlaybackViewModel.getPlaybackStateWrapper().observe(mLifecycleOwner, state -> { in testChangeMediaSource_consistentController()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/
DControllerRendererPoolTest.java42 private LifecycleOwner mLifecycleOwner; field in ControllerRendererPoolTest
47 mLifecycleOwner = () -> mLifecycle; in setUp()
48 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
83 mPool.getRendererByViewType(mContext, mLifecycleOwner, in getRenderer_hasSupportedViewType_shouldReturnCorrespondingRenderer()
93 mapping -> mPool.getRendererByViewType(mContext, mLifecycleOwner, in getRenderer_hasSupportedViewType_shouldHaveDistinctRenderersInPool()
102 mLifecycleOwner, in getRenderer_hasUnsupportedViewType_shouldReturnNullAndPoolIsEmpty()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DSliceContextualCardRenderer.java66 private final LifecycleOwner mLifecycleOwner; field in SliceContextualCardRenderer
75 mLifecycleOwner = lifecycleOwner; in SliceContextualCardRenderer()
79 mLifecycleOwner.getLifecycle().addObserver(this); in SliceContextualCardRenderer()
114 sliceLiveData.removeObservers(mLifecycleOwner); in bindView()
119 sliceLiveData.observe(mLifecycleOwner, slice -> { in bindView()
129 mSliceLiveDataMap.get(slice.getUri()).removeObservers(mLifecycleOwner); in bindView()
179 mSliceLiveDataMap.get(card.getSliceUri()).removeObservers(mLifecycleOwner); in initDismissalActions()
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/livedata/
DHeartBeatLiveDataTest.java44 private LifecycleOwner mLifecycleOwner; field in HeartBeatLiveDataTest
49 mLifecycleOwner = mock(LifecycleOwner.class); in setup()
50 mLifecycleRegistry = new LifecycleRegistry(mLifecycleOwner); in setup()
51 when(mLifecycleOwner.getLifecycle()).thenReturn(mLifecycleRegistry); in setup()
57 mHeartBeatLiveData.observe(mLifecycleOwner, (value) -> mockObserver.onChanged(value)); in active_onLifecycleStart()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/slices/
DSliceContextualCardRenderer.java64 private final LifecycleOwner mLifecycleOwner; field in SliceContextualCardRenderer
73 mLifecycleOwner = lifecycleOwner; in SliceContextualCardRenderer()
77 mLifecycleOwner.getLifecycle().addObserver(this); in SliceContextualCardRenderer()
111 sliceLiveData.removeObservers(mLifecycleOwner); in bindView()
112 sliceLiveData.observe(mLifecycleOwner, slice -> { in bindView()
161 mSliceLiveDataMap.get(card.getSliceUri()).removeObservers(mLifecycleOwner); in initDismissalActions()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/
DContextualCardsAdapter.java52 private final LifecycleOwner mLifecycleOwner; field in ContextualCardsAdapter
61 mLifecycleOwner = lifecycleOwner; in ContextualCardsAdapter()
79 mContext, mLifecycleOwner, viewType); in onCreateViewHolder()
88 mContext, mLifecycleOwner, card.getViewType()); in onBindViewHolder()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/
DContextualCardsAdapter.java52 private final LifecycleOwner mLifecycleOwner; field in ContextualCardsAdapter
61 mLifecycleOwner = lifecycleOwner; in ContextualCardsAdapter()
79 mContext, mLifecycleOwner, viewType); in onCreateViewHolder()
88 mContext, mLifecycleOwner, card.getViewType()); in onBindViewHolder()
/packages/apps/Car/libs/car-media-common/tests/robotests/src/com/android/car/media/common/source/
DMediaSourceViewModelTest.java62 public final TestLifecycleOwner mLifecycleOwner = new TestLifecycleOwner(); field in MediaSourceViewModelTest
136 mViewModel.getPrimaryMediaSource().observe(mLifecycleOwner, observer); in testGetSelectedMediaSource_none()
151 mViewModel.getMediaController().observe(mLifecycleOwner, observer); in testGetMediaController_connectedBrowser()
166 mViewModel.getMediaController().observe(mLifecycleOwner, observer); in testGetMediaController_noActiveSession_notConnected()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
DHapticFeedbackIntensityPreferenceControllerTest.java38 private LifecycleOwner mLifecycleOwner; field in HapticFeedbackIntensityPreferenceControllerTest
46 mLifecycleOwner = () -> mLifecycle; in setUp()
47 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/
DLogPersistPreferenceControllerTest.java52 private LifecycleOwner mLifecycleOwner; field in LogPersistPreferenceControllerTest
59 mLifecycleOwner = () -> mLifecycle; in setup()
60 mLifecycle = new Lifecycle(mLifecycleOwner); in setup()
DBluetoothAudioSampleRatePreferenceControllerTest.java62 private LifecycleOwner mLifecycleOwner; field in BluetoothAudioSampleRatePreferenceControllerTest
71 mLifecycleOwner = () -> mLifecycle; in setup()
72 mLifecycle = new Lifecycle(mLifecycleOwner); in setup()
DBluetoothAudioBitsPerSamplePreferenceControllerTest.java63 private LifecycleOwner mLifecycleOwner; field in BluetoothAudioBitsPerSamplePreferenceControllerTest
70 mLifecycleOwner = () -> mLifecycle; in setup()
71 mLifecycle = new Lifecycle(mLifecycleOwner); in setup()
DBluetoothAudioQualityPreferenceControllerTest.java62 private LifecycleOwner mLifecycleOwner; field in BluetoothAudioQualityPreferenceControllerTest
69 mLifecycleOwner = () -> mLifecycle; in setup()
70 mLifecycle = new Lifecycle(mLifecycleOwner); in setup()
DBluetoothAudioChannelModePreferenceControllerTest.java62 private LifecycleOwner mLifecycleOwner; field in BluetoothAudioChannelModePreferenceControllerTest
69 mLifecycleOwner = () -> mLifecycle; in setup()
70 mLifecycle = new Lifecycle(mLifecycleOwner); in setup()
DBluetoothAudioCodecPreferenceControllerTest.java67 private LifecycleOwner mLifecycleOwner; field in BluetoothAudioCodecPreferenceControllerTest
74 mLifecycleOwner = () -> mLifecycle; in setup()
75 mLifecycle = new Lifecycle(mLifecycleOwner); in setup()
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/
DRestrictedEncryptionPreferenceControllerTest.java47 private LifecycleOwner mLifecycleOwner; field in RestrictedEncryptionPreferenceControllerTest
52 mLifecycleOwner = () -> mLifecycle; in setUp()
53 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/deviceadmin/
DDeviceAdminListPreferenceControllerTest.java53 private LifecycleOwner mLifecycleOwner; field in DeviceAdminListPreferenceControllerTest
61 mLifecycleOwner = () -> mLifecycle; in setUp()
62 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/zenaccess/
DZenAccessSettingObserverMixinTest.java51 private LifecycleOwner mLifecycleOwner; field in ZenAccessSettingObserverMixinTest
59 mLifecycleOwner = () -> mLifecycle; in setUp()
60 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/assist/
DAssistContextPreferenceControllerTest.java59 private LifecycleOwner mLifecycleOwner; field in AssistContextPreferenceControllerTest
66 mLifecycleOwner = () -> mLifecycle; in setUp()
67 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/
DAppLocationPermissionPreferenceControllerTest.java30 private LifecycleOwner mLifecycleOwner; field in AppLocationPermissionPreferenceControllerTest
38 mLifecycleOwner = () -> mLifecycle; in setUp()
39 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/
DSavedDeviceGroupControllerTest.java62 private LifecycleOwner mLifecycleOwner; field in SavedDeviceGroupControllerTest
69 mLifecycleOwner = () -> mLifecycle; in setUp()
70 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/print/
DPrintJobMessagePreferenceControllerTest.java65 private LifecycleOwner mLifecycleOwner; field in PrintJobMessagePreferenceControllerTest
80 mLifecycleOwner = () -> mLifecycle; in setUp()
81 mLifecycle = new Lifecycle(mLifecycleOwner); in setUp()

123