Home
last modified time | relevance | path

Searched refs:Observer (Results 1 – 25 of 90) sorted by relevance

1234

/frameworks/support/lifecycle/livedata-core/src/test/java/androidx/lifecycle/
DLiveDataTest.java72 private Observer<String> mObserver3;
76 private Observer<String> mObserver4;
102 mObserver3 = (Observer<String>) mock(Observer.class); in initNonLifecycleRegistry()
107 mObserver4 = (Observer<String>) mock(Observer.class); in initNonLifecycleRegistry()
118 Observer<String> observer = (Observer<String>) mock(Observer.class); in testObserverToggle()
133 Observer<String> observer = (Observer<String>) mock(Observer.class); in testActiveObserverToggle()
167 Observer<String> observer = (Observer<String>) mock(Observer.class); in testReAddSameObserverTuple()
175 Observer<String> o1 = (Observer<String>) mock(Observer.class); in testAdd2ObserversWithSameOwnerAndRemove()
176 Observer<String> o2 = (Observer<String>) mock(Observer.class); in testAdd2ObserversWithSameOwnerAndRemove()
196 Observer<String> observer = (Observer<String>) mock(Observer.class); in testAddSameObserverIn2LifecycleOwners()
[all …]
/frameworks/support/lifecycle/livedata/src/test/java/androidx/lifecycle/
DMediatorLiveDataTest.java70 mMediator.observe(mOwner, mock(Observer.class)); in setup()
82 Observer observer = mock(Observer.class); in testSingleDelivery()
93 Observer observer = mock(Observer.class); in testChangeWhileInactive()
95 mMediator.observe(mOwner, mock(Observer.class)); in testChangeWhileInactive()
109 Observer observer = mock(Observer.class); in testAddSourceToActive()
118 Observer observer = mock(Observer.class); in testAddSourceToInActive()
128 Observer observer = mock(Observer.class); in testRemoveSource()
139 Observer observer = mock(Observer.class); in testSourceInactive()
154 Observer observer = mock(Observer.class); in testNoLeakObserver()
165 Observer observer1 = mock(Observer.class); in testMultipleSources()
[all …]
DTransformationsTest.java67 Observer<Integer> observer = mock(Observer.class); in testMap()
90 Observer<String> observer = mock(Observer.class); in testSwitchMap()
123 Observer<String> observer = mock(Observer.class); in testSwitchMap2()
156 Observer<String> observer = mock(Observer.class); in testNoRedispatchSwitchMap()
183 Observer<String> observer = mock(Observer.class); in testSwitchMapToNull()
206 Observer observer = mock(Observer.class); in noObsoleteValueTest()
DComputableLiveDataTest.java101 final Observer<Integer> observer = mock(Observer.class); in noConcurrentCompute()
140 computable.getLiveData().observe(mLifecycleOwner, new Observer<Integer>() { in addingObserverShouldTriggerAComputation()
159 computable.getLiveData().observe(mLifecycleOwner, new Observer<Integer>() { in customExecutor()
179 computable.getLiveData().observe(mLifecycleOwner, new Observer<Integer>() { in invalidationShouldNotReTriggerComputationIfObserverIsInActive()
199 computable.getLiveData().observe(mLifecycleOwner, new Observer<Integer>() { in invalidationShouldReTriggerQueryIfObserverIsActive()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/items/
DAbstractItemHierarchy.java39 private ArrayList<Observer> mObservers = new ArrayList<>();
64 public void registerObserver(Observer observer) { in registerObserver()
69 public void unregisterObserver(Observer observer) { in unregisterObserver()
77 for (Observer observer : mObservers) { in notifyChanged()
95 for (Observer observer : mObservers) { in notifyItemRangeChanged()
113 for (Observer observer : mObservers) { in notifyItemRangeInserted()
135 for (Observer observer : mObservers) { in notifyItemRangeMoved()
153 for (Observer observer : mObservers) { in notifyItemRangeRemoved()
DItemHierarchy.java33 interface Observer { interface
70 void registerObserver(Observer observer); in registerObserver()
75 void unregisterObserver(Observer observer); in unregisterObserver()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DScreenLifecycle.java29 public class ScreenLifecycle extends Lifecycle<ScreenLifecycle.Observer> implements Dumpable {
44 dispatch(Observer::onScreenTurningOn); in dispatchScreenTurningOn()
49 dispatch(Observer::onScreenTurnedOn); in dispatchScreenTurnedOn()
54 dispatch(Observer::onScreenTurningOff); in dispatchScreenTurningOff()
59 dispatch(Observer::onScreenTurnedOff); in dispatchScreenTurnedOff()
73 public interface Observer { interface in ScreenLifecycle
DWakefulnessLifecycle.java29 public class WakefulnessLifecycle extends Lifecycle<WakefulnessLifecycle.Observer> implements
48 dispatch(Observer::onStartedWakingUp); in dispatchStartedWakingUp()
56 dispatch(Observer::onFinishedWakingUp); in dispatchFinishedWakingUp()
64 dispatch(Observer::onStartedGoingToSleep); in dispatchStartedGoingToSleep()
72 dispatch(Observer::onFinishedGoingToSleep); in dispatchFinishedGoingToSleep()
86 public interface Observer { interface in WakefulnessLifecycle
/frameworks/support/lifecycle/livedata-core/src/main/java/androidx/lifecycle/
DLiveData.java64 private SafeIterableMap<Observer<? super T>, ObserverWrapper> mObservers =
124 for (Iterator<Map.Entry<Observer<? super T>, ObserverWrapper>> iterator = in dispatchingValue()
165 public void observe(@NonNull LifecycleOwner owner, @NonNull Observer<? super T> observer) { in observe()
198 public void observeForever(@NonNull Observer<? super T> observer) { in observeForever()
218 public void removeObserver(@NonNull final Observer<? super T> observer) { in removeObserver()
237 for (Map.Entry<Observer<? super T>, ObserverWrapper> entry : mObservers) { in removeObservers()
354 LifecycleBoundObserver(@NonNull LifecycleOwner owner, Observer<? super T> observer) { in LifecycleBoundObserver()
385 final Observer<? super T> mObserver;
389 ObserverWrapper(Observer<? super T> observer) { in ObserverWrapper()
425 AlwaysActiveObserver(Observer<? super T> observer) { in AlwaysActiveObserver()
/frameworks/support/room/rxjava2/src/test/java/androidx/room/
DRxRoomTest.java59 private List<InvalidationTracker.Observer> mAddedObservers = new ArrayList<>();
69 mAddedObservers.add((InvalidationTracker.Observer) invocation.getArguments()[0]); in init()
72 }).when(mInvalidationTracker).addObserver(any(InvalidationTracker.Observer.class)); in init()
78 verify(mInvalidationTracker, never()).addObserver(any(InvalidationTracker.Observer.class)); in basicAddRemove()
80 verify(mInvalidationTracker).addObserver(any(InvalidationTracker.Observer.class)); in basicAddRemove()
83 InvalidationTracker.Observer observer = mAddedObservers.get(0); in basicAddRemove()
90 .addObserver(any(InvalidationTracker.Observer.class)); in basicAddRemove()
93 InvalidationTracker.Observer observer2 = mAddedObservers.get(1); in basicAddRemove()
106 InvalidationTracker.Observer observer = mAddedObservers.get(0); in basicNotify()
131 InvalidationTracker.Observer observer = mAddedObservers.get(0); in internalCallable()
/frameworks/support/room/runtime/src/main/java/androidx/room/
DInvalidationTracker.java118 final SafeIterableMap<Observer, ObserverWrapper> mObserverMap = new SafeIterableMap<>();
225 public void addObserver(@NonNull Observer observer) { in addObserver()
261 public void addWeakObserver(Observer observer) { in addWeakObserver()
272 public void removeObserver(@NonNull final Observer observer) { in removeObserver()
347 for (Map.Entry<Observer, ObserverWrapper> entry : mObserverMap) {
475 final Observer mObserver;
478 ObserverWrapper(Observer observer, int[] tableIds, String[] tableNames, long[] versions) { in ObserverWrapper()
521 public abstract static class Observer { class in InvalidationTracker
531 protected Observer(@NonNull String firstTable, String... rest) { in Observer() method in InvalidationTracker.Observer
541 public Observer(@NonNull String[] tables) { in Observer() method in InvalidationTracker.Observer
[all …]
/frameworks/support/fragment/src/androidTest/java/androidx/fragment/app/
DFragmentViewLifecycleTest.java39 import androidx.lifecycle.Observer;
135 new Observer<LifecycleOwner>() { in testFragmentViewLifecycleOwnerLiveData()
220 private Observer<Boolean> mOnCreateViewObserver = new Observer<Boolean>() {
240 private Observer<Boolean> mOnCreateViewObserver = new Observer<Boolean>() {
245 private Observer<Boolean> mOnViewCreatedObserver = new Observer<Boolean>() {
250 private Observer<Boolean> mOnViewStateRestoredObserver = new Observer<Boolean>() {
/frameworks/support/lifecycle/livedata-core/api/
Dcurrent.txt8 …method public void observe(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Observer<? super …
9 method public void observeForever(androidx.lifecycle.Observer<? super T>);
13 method public void removeObserver(androidx.lifecycle.Observer<? super T>);
24 public abstract interface Observer<T> {
/frameworks/support/lifecycle/livedata-core/api_legacy/
Dcurrent.txt8 …ic void observe(android.arch.lifecycle.LifecycleOwner, android.arch.lifecycle.Observer<? super T>);
9 method public void observeForever(android.arch.lifecycle.Observer<? super T>);
13 method public void removeObserver(android.arch.lifecycle.Observer<? super T>);
24 public abstract interface Observer<T> {
D1.1.0.txt8 …hod public void observe(android.arch.lifecycle.LifecycleOwner, android.arch.lifecycle.Observer<T>);
9 method public void observeForever(android.arch.lifecycle.Observer<T>);
13 method public void removeObserver(android.arch.lifecycle.Observer<T>);
24 public abstract interface Observer<T> {
/frameworks/support/room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/
DWriteAheadLoggingTest.java40 import androidx.lifecycle.Observer;
129 Observer<User> observer = startObserver(user1); in observeLiveData()
140 Observer<User> observer = startObserver(user1); in observeLiveDataWithTransaction()
162 Observer<List<User>> observer = startObserver(usersList); in parallelWrites()
205 new InvalidationTracker.Observer("User") { in observeInvalidationInBackground()
227 mDatabase.getInvalidationTracker().addObserver(new InvalidationTracker.Observer("User") { in invalidation()
239 private static <T> Observer<T> startObserver(LiveData<T> liveData) { in startObserver()
241 Observer<T> observer = mock(Observer.class); in startObserver()
247 private static <T> void stopObserver(LiveData<T> liveData, Observer<T> observer) { in stopObserver()
/frameworks/support/lifecycle/livedata/src/main/java/androidx/lifecycle/
DMediatorLiveData.java85 public <S> void addSource(@NonNull LiveData<S> source, @NonNull Observer<? super S> onChanged) { in addSource()
130 private static class Source<V> implements Observer<V> {
132 final Observer<? super V> mObserver;
135 Source(LiveData<V> liveData, final Observer<? super V> observer) { in Source()
DTransformations.java72 result.addSource(source, new Observer<X>() { in map()
136 result.addSource(source, new Observer<X>() { in switchMap()
150 result.addSource(mSource, new Observer<Y>() { in switchMap()
/frameworks/av/media/libmedia/include/media/
DSingleStateQueue.h33 class Observer; variable
45 friend class Observer; member
107 class Observer {
109 Observer(Shared *shared) in Observer() function
/frameworks/av/include/media/
DSingleStateQueue.h33 class Observer; variable
45 friend class Observer; member
107 class Observer {
109 Observer(Shared *shared) in Observer() function
/frameworks/base/core/tests/coretests/src/android/os/
DFileObserverTest.java33 private Observer mObserver;
36 private static class Observer extends FileObserver { class in FileObserverTest
40 public Observer(String path) { in Observer() method in FileObserverTest.Observer
77 mObserver = new Observer(mTestFile.getParent()); in testRun()
/frameworks/support/room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/
DLiveDataTestUtil.kt20 import androidx.lifecycle.Observer
27 val observer = object : Observer<T> { in getValue()
/frameworks/support/paging/integration-tests/testapp/src/main/java/androidx/paging/integration/testapp/
DPagedListSampleActivity.java25 import androidx.lifecycle.Observer;
45 viewModel.getLivePagedList().observe(this, new Observer<PagedList<Item>>() { in onCreate()
/frameworks/support/room/runtime/api_legacy/
D1.0.0.txt14 method public void addObserver(android.arch.persistence.room.InvalidationTracker.Observer);
16 method public void removeObserver(android.arch.persistence.room.InvalidationTracker.Observer);
19 public static abstract class InvalidationTracker.Observer {
20 ctor protected InvalidationTracker.Observer(java.lang.String, java.lang.String...);
21 ctor public InvalidationTracker.Observer(java.lang.String[]);
/frameworks/native/services/vr/hardware_composer/impl/
Dvr_hwc.h95 class Observer {
97 virtual ~Observer() {} in ~Observer()
107 virtual void RegisterObserver(Observer* observer) = 0;
108 virtual void UnregisterObserver(Observer* observer) = 0;
298 void RegisterObserver(Observer* observer) override;
299 void UnregisterObserver(Observer* observer) override;
313 Observer* observer_ = nullptr;

1234