/frameworks/support/lifecycle/reactivestreams/src/test/java/androidx/lifecycle/ |
D | LiveDataReactiveStreamsTest.java | 83 LiveData<String> liveData = LiveDataReactiveStreams.fromPublisher(processor); in convertsFromPublisher() local 85 liveData.observe(mLifecycleOwner, mObserver); in convertsFromPublisher() 98 LiveData<String> liveData = LiveDataReactiveStreams.fromPublisher(processor); in convertsFromPublisherSubscribeWithDelay() local 100 liveData.observe(mLifecycleOwner, mObserver); in convertsFromPublisherSubscribeWithDelay() 103 liveData.removeObserver(mObserver); in convertsFromPublisherSubscribeWithDelay() 105 liveData.observe(mLifecycleOwner, mObserver); in convertsFromPublisherSubscribeWithDelay() 116 LiveData<String> liveData = LiveDataReactiveStreams.fromPublisher(processor); in convertsFromPublisherThrowsException() local 118 liveData.observe(mLifecycleOwner, mObserver); in convertsFromPublisherThrowsException() 133 LiveData<String> liveData = LiveDataReactiveStreams.fromPublisher(processor); in convertsFromPublisherWithMultipleObservers() local 135 liveData.observe(mLifecycleOwner, mObserver); in convertsFromPublisherWithMultipleObservers() [all …]
|
/frameworks/support/lifecycle/reactivestreams/ktx/src/test/java/androidx/lifecycle/ |
D | LiveDataReactiveStreamsTest.kt | 48 val liveData = processor.toLiveData() in convertsFromPublisher() constant 51 liveData.observe(lifecycleOwner, Observer { output.add(it) }) in convertsFromPublisher() 61 val liveData = MutableLiveData<String>() in convertsToPublisherWithSyncData() constant 62 liveData.value = "foo" in convertsToPublisherWithSyncData() 65 liveData.toPublisher(lifecycleOwner).subscribe(outputProcessor) in convertsToPublisherWithSyncData() 67 liveData.value = "bar" in convertsToPublisherWithSyncData() 68 liveData.value = "baz" in convertsToPublisherWithSyncData()
|
/frameworks/support/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/ |
D | RawQueryTest.java | 95 final LiveData<User> liveData) throws TimeoutException, InterruptedException { in liveDataTest() argument 97 () -> liveData.observeForever(user -> { })); in liveDataTest() 99 assertThat(liveData.getValue(), is(nullValue())); in liveDataTest() 103 assertThat(liveData.getValue(), is(user)); in liveDataTest() 107 assertThat(liveData.getValue(), is(user)); in liveDataTest() 219 LiveData<List<UserAndPet>> liveData = mRawDao.getUserAndPetListObservable( in embedded_liveData() local 223 () -> liveData.observeForever(user -> { in embedded_liveData() 227 assertThat(liveData.getValue(), is(emptyList())); in embedded_liveData() 233 List<UserAndPet> justUsers = liveData.getValue(); in embedded_liveData() 243 List<UserAndPet> allItems = liveData.getValue(); in embedded_liveData() [all …]
|
D | LiveDataQueryTest.java | 174 LiveData<AvgWeightByAge> liveData = mUserDao.maxWeightByAgeGroup(); in liveDataWithPojo() local 176 observe(liveData, lifecycleOwner, observer); in liveDataWithPojo() 193 final LiveData<UserAndAllPets> liveData = mUserPetDao.liveUserWithPets(3); in withRelation() local 197 observe(liveData, lifecycleOwner, observer); in withRelation() 218 LiveData<PetsToys> liveData = mSpecificDogDao.getSpecificDogsToys(); in withRelationOnly() local 231 observe(liveData, lifecycleOwner, observer); in withRelationOnly() 285 LiveData<User> liveData = mUserDao.liveUserById(3); in handleGc() local 289 observe(liveData, lifecycleOwner, observer); in handleGc() 308 WeakReference<LiveData> weakLiveData = new WeakReference<LiveData>(liveData); in handleGc() 310 liveData = null; in handleGc() [all …]
|
D | QueryTransactionTest.java | 125 public void liveData() { in liveData() method in QueryTransactionTest 126 LiveData<List<Entity1>> listLiveData = mDao.liveData(); in liveData() 285 private <T> void observeForever(final LiveData<T> liveData) { in observeForever() argument 287 liveData.observe(mLifecycleOwner, t -> { in observeForever() 354 LiveData<List<Entity1>> liveData(); in liveData() method 381 LiveData<List<Entity1>> liveData(); in liveData() method 420 LiveData<List<Entity1>> liveData(); in liveData() method
|
D | WriteAheadLoggingTest.java | 239 private static <T> Observer<T> startObserver(LiveData<T> liveData) { in startObserver() argument 243 liveData.observeForever(observer)); in startObserver() 247 private static <T> void stopObserver(LiveData<T> liveData, Observer<T> observer) { in stopObserver() argument 249 liveData.removeObserver(observer)); in stopObserver()
|
/frameworks/support/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ |
D | LiveDataTestUtil.kt | 25 fun <T> getValue(liveData: LiveData<T>): T { in getValue() 30 liveData.removeObserver(this) in getValue() 33 liveData.observeForever(observer) in getValue()
|
/frameworks/support/lifecycle/reactivestreams/src/main/java/androidx/lifecycle/ |
D | LiveDataReactiveStreams.java | 55 @NonNull LifecycleOwner lifecycle, @NonNull LiveData<T> liveData) { in toPublisher() argument 57 return new LiveDataPublisher<>(lifecycle, liveData); in toPublisher() 64 LiveDataPublisher(LifecycleOwner lifecycle, LiveData<T> liveData) { in LiveDataPublisher() argument 66 this.mLiveData = liveData; in LiveDataPublisher() 88 final LifecycleOwner lifecycle, final LiveData<T> liveData) { in LiveDataSubscription() argument 91 this.mLiveData = liveData; in LiveDataSubscription()
|
/frameworks/support/lifecycle/integration-tests/test-app/src/main/java/com/android/support/lifecycle/testapp/ |
D | LiveDataTestActivity.java | 46 public LiveData<String> liveData = new LiveData<>(); field in LiveDataTestActivity.LiveDataViewModel 68 liveDataViewModel.liveData.observe(this, s -> in onCreate() 90 viewModel.liveData.observe(this, s -> in onCreate() 104 viewModel.liveData.setValue(LIVE_DATA_VALUE); in onSaveInstanceState()
|
/frameworks/support/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/ |
D | JournalDbPostMigrationTest.java | 206 LiveData<User> liveData = dao.getUser(3); 208 liveData.observeForever(user -> { 212 assertThat(liveData.getValue(), notNullValue()); 220 assertThat(liveData.getValue().firstName, is("foo-bar"));
|
/frameworks/support/lifecycle/integration-tests/test-app/src/androidTest/java/com/android/support/lifecycle/ |
D | LiveDataTransactionTest.java | 60 activity.viewModel.liveData.observe(activity, in transactionInOnStateChanged() 67 newActivity.viewModel.liveData.observe(newActivity, in transactionInOnStateChanged()
|
/frameworks/support/lifecycle/livedata/src/main/java/androidx/lifecycle/ |
D | MediatorLiveData.java | 135 Source(LiveData<V> liveData, final Observer<? super V> observer) { in Source() argument 136 mLiveData = liveData; in Source()
|
/frameworks/support/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/paging/ |
D | DataSourceFactoryTest.java | 161 private void observe(final LiveData liveData, final LifecycleOwner provider, in observe() argument 165 liveData.observe(provider, observer); in observe() 177 LiveData<PagedList<UserAndAllPets>> liveData = in withRelation() local 184 observe(liveData, lifecycleOwner, observer); in withRelation()
|
/frameworks/support/room/compiler/src/test/kotlin/androidx/room/solver/ |
D | TypeAdapterStoreTest.kt | 267 val liveData = invocation.processingEnv.elementUtils in <lambda>() constant 269 assertThat(liveData, notNullValue()) in <lambda>() 271 MoreTypes.asDeclared(liveData.asType())), `is`(true)) in <lambda>()
|
/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/ |
D | WorkManagerImplTest.java | 843 LiveData<List<WorkStatus>> liveData = mWorkManagerImpl.getStatusesById( in testGetStatusesById() local 845 liveData.observe(testLifecycleOwner, mockObserver); in testGetStatusesById() 892 liveData.removeObservers(testLifecycleOwner); in testGetStatusesById() 972 LiveData<List<WorkStatus>> liveData = mWorkManagerImpl.getStatusesByTag(firstTag); in testGetStatusesByTag() local 973 liveData.observe(testLifecycleOwner, mockObserver); in testGetStatusesByTag() 1005 liveData.removeObservers(testLifecycleOwner); in testGetStatusesByTag() 1072 LiveData<List<WorkStatus>> liveData = mWorkManagerImpl.getStatusesForUniqueWork(uniqueName); in testGetStatusesByName() local 1073 liveData.observe(testLifecycleOwner, mockObserver); in testGetStatusesByName() 1110 liveData.removeObservers(testLifecycleOwner); in testGetStatusesByName()
|