Searched refs:observer (Results 1 - 25 of 87) sorted by relevance

1234

/frameworks/base/core/java/android/database/
H A DObservable.java27 * @param T The observer type.
31 * The list of observers. An observer can be in the list at most
37 * Adds an observer to the list. The observer cannot be null and it must not already
39 * @param observer the observer to register
40 * @throws IllegalArgumentException the observer is null
41 * @throws IllegalStateException the observer is already registered
43 public void registerObserver(T observer) { argument
44 if (observer
62 unregisterObserver(T observer) argument
[all...]
H A DContentObservable.java31 public void registerObserver(ContentObserver observer) { argument
32 super.registerObserver(observer);
36 * Invokes {@link ContentObserver#dispatchChange(boolean)} on each observer.
39 * to the observer if it has indicated that it wants to receive self-change
54 * Invokes {@link ContentObserver#dispatchChange(boolean, Uri)} on each observer.
58 * to the observer if it has indicated that it wants to receive self-change
68 for (ContentObserver observer : mObservers) {
69 if (!selfChange || observer.deliverSelfNotifications()) {
70 observer.dispatchChange(selfChange, uri);
77 * Invokes {@link ContentObserver#onChange} on each observer
[all...]
H A DCursorWrapper.java177 public void registerContentObserver(ContentObserver observer) { argument
178 mCursor.registerContentObserver(observer);
181 public void registerDataSetObserver(DataSetObserver observer) { argument
182 mCursor.registerDataSetObserver(observer);
197 public void unregisterContentObserver(ContentObserver observer) { argument
198 mCursor.unregisterContentObserver(observer);
201 public void unregisterDataSetObserver(DataSetObserver observer) { argument
202 mCursor.unregisterDataSetObserver(observer);
H A DCursor.java381 * Register an observer that is called when changes happen to the content backing this cursor.
384 * @param observer the object that gets notified when the content backing the cursor changes.
387 void registerContentObserver(ContentObserver observer); argument
390 * Unregister an observer that has previously been registered with this
393 * @param observer the object to unregister.
396 void unregisterContentObserver(ContentObserver observer); argument
399 * Register an observer that is called when changes happen to the contents
403 * @param observer the object that gets notified when the cursors data set changes.
406 void registerDataSetObserver(DataSetObserver observer); argument
409 * Unregister an observer tha
415 unregisterDataSetObserver(DataSetObserver observer) argument
[all...]
H A DMergeCursor.java181 public void registerContentObserver(ContentObserver observer) { argument
185 mCursors[i].registerContentObserver(observer);
190 public void unregisterContentObserver(ContentObserver observer) { argument
194 mCursors[i].unregisterContentObserver(observer);
200 public void registerDataSetObserver(DataSetObserver observer) { argument
204 mCursors[i].registerDataSetObserver(observer);
210 public void unregisterDataSetObserver(DataSetObserver observer) { argument
214 mCursors[i].unregisterDataSetObserver(observer);
H A DCursorToBulkCursorAdaptor.java91 public CursorToBulkCursorAdaptor(Cursor cursor, IContentObserver observer, argument
101 createAndRegisterObserverProxyLocked(observer);
217 public int requery(IContentObserver observer) { argument
235 createAndRegisterObserverProxyLocked(observer);
241 * Create a ContentObserver from the observer and register it as an observer on the
243 * @param observer the IContentObserver that wants to monitor the cursor
244 * @throws IllegalStateException if an observer is already registered
246 private void createAndRegisterObserverProxyLocked(IContentObserver observer) { argument
248 throw new IllegalStateException("an observer i
[all...]
H A DAbstractCursor.java312 public void registerContentObserver(ContentObserver observer) { argument
313 mContentObservable.registerObserver(observer);
316 public void unregisterContentObserver(ContentObserver observer) { argument
319 mContentObservable.unregisterObserver(observer);
323 public void registerDataSetObserver(DataSetObserver observer) { argument
324 mDataSetObservable.registerObserver(observer);
327 public void unregisterDataSetObserver(DataSetObserver observer) { argument
328 mDataSetObservable.unregisterObserver(observer);
357 /** @hide - set the notification uri but with an observer for a particular user's view */
/frameworks/base/core/java/android/app/backup/
H A DIRestoreSession.aidl32 * @param observer This binder points to an object whose onRestoreSetsAvailable()
34 * @return Zero on success; nonzero on error. The observer will only receive a
37 int getAvailableRestoreSets(IRestoreObserver observer);
45 * @return Zero on success; nonzero on error. The observer will only receive
49 * @param observer If non-null, this binder points to an object that will receive
52 int restoreAll(long token, IRestoreObserver observer);
61 * @return Zero on success, nonzero on error. The observer will only receive
65 * @param observer If non-null, this binder points to an object that will receive
71 int restoreSome(long token, IRestoreObserver observer, in String[] packages);
80 * @return Zero on success; nonzero on error. The observer wil
[all...]
H A DRestoreSession.java43 * @param observer a RestoreObserver object whose restoreSetsAvailable() method will
47 * @return Zero on success, nonzero on error. The observer's restoreSetsAvailable()
50 public int getAvailableRestoreSets(RestoreObserver observer) { argument
52 RestoreObserverWrapper obsWrapper = new RestoreObserverWrapper(mContext, observer);
67 * @return Zero on success; nonzero on error. The observer will only receive
71 * @param observer If non-null, this binder points to an object that will receive
74 public int restoreAll(long token, RestoreObserver observer) { argument
80 mObserver = new RestoreObserverWrapper(mContext, observer);
96 * @return Zero on success, nonzero on error. The observer will only receive
100 * @param observer I
108 restoreSome(long token, RestoreObserver observer, String[] packages) argument
138 restorePackage(String packageName, RestoreObserver observer) argument
[all...]
/frameworks/base/core/java/android/widget/
H A DBaseAdapter.java37 public void registerDataSetObserver(DataSetObserver observer) { argument
38 mDataSetObservable.registerObserver(observer);
41 public void unregisterDataSetObserver(DataSetObserver observer) { argument
42 mDataSetObservable.unregisterObserver(observer);
H A DBaseExpandableListAdapter.java37 public void registerDataSetObserver(DataSetObserver observer) { argument
38 mDataSetObservable.registerObserver(observer);
41 public void unregisterDataSetObserver(DataSetObserver observer) { argument
42 mDataSetObservable.unregisterObserver(observer);
H A DAdapter.java35 * Register an observer that is called when changes happen to the data used by this adapter.
37 * @param observer the object that gets notified when the data set changes.
39 void registerDataSetObserver(DataSetObserver observer); argument
42 * Unregister an observer that has previously been registered with this
45 * @param observer the object to unregister.
47 void unregisterDataSetObserver(DataSetObserver observer); argument
H A DExpandableListAdapter.java33 void registerDataSetObserver(DataSetObserver observer); argument
38 void unregisterDataSetObserver(DataSetObserver observer); argument
/frameworks/base/core/java/android/os/
H A DFileObserver.java91 public int startWatching(String path, int mask, FileObserver observer) { argument
97 m_observers.put(i, new WeakReference(observer));
109 // look up our observer, fixing up the map if necessary...
110 FileObserver observer = null;
115 observer = (FileObserver) weak.get();
116 if (observer == null) {
122 // ...then call out to the observer without the sync lock held
123 if (observer != null) {
125 observer.onEvent(mask, path);
127 Log.wtf(LOG_TAG, "Unhandled exception in FileObserver " + observer, throwabl
[all...]
H A DUEventObserver.java164 /** Many to many mapping of string match to observer.
167 * elements the corresponding UEventObserver observer */
198 final UEventObserver observer =
200 mTempObserversToSignal.add(observer);
209 final UEventObserver observer = mTempObserversToSignal.get(i);
210 observer.onUEvent(event);
216 public void addObserver(String match, UEventObserver observer) { argument
219 mKeysAndObservers.add(observer);
224 /** Removes every key/value pair where value=observer from mObservers */
225 public void removeObserver(UEventObserver observer) { argument
[all...]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/
H A DScreenshotTest.java53 NewScreenshotObserver observer = new NewScreenshotObserver(
55 observer.startWatching();
58 if (observer.getCreatedPath() == null) {
60 synchronized(observer) {
61 observer.wait(SCREEN_WAIT_TIME_SEC*1000);
65 SCREEN_WAIT_TIME_SEC), observer.getCreatedPath());
67 File screenshotFile = new File(screenshotDir, observer.getCreatedPath());
/frameworks/base/services/tests/servicestests/src/com/android/server/
H A DMountServiceTests.java144 final ObbObserver observer = new ObbObserver();
146 sm.mountObb(file.getPath(), null, observer));
149 observer.waitForCompletion());
156 file.getPath(), observer.getPath());
158 assertEquals(expectedState, observer.getState());
165 final ObbObserver observer = new ObbObserver();
167 .getPath(), null, observer));
169 return observer;
173 final ObbObserver observer, int expectedState, boolean checkPath) {
174 assertTrue("Mount should have completed", observer
172 waitForObbActionCompletion(final StorageManager sm, final File file, final ObbObserver observer, int expectedState, boolean checkPath) argument
[all...]
/frameworks/base/test-runner/src/android/test/mock/
H A DMockCursor.java164 public void registerContentObserver(ContentObserver observer) { argument
168 public void registerDataSetObserver(DataSetObserver observer) { argument
186 public void unregisterContentObserver(ContentObserver observer) { argument
191 public void unregisterDataSetObserver(DataSetObserver observer) { argument
/frameworks/support/v4/java/android/support/v4/view/
H A DPagerAdapter.java279 void registerDataSetObserver(DataSetObserver observer) { argument
280 mObservable.registerObserver(observer);
283 void unregisterDataSetObserver(DataSetObserver observer) { argument
284 mObservable.unregisterObserver(observer);
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
H A DBridgeContentResolver.java85 ContentObserver observer) {
93 public void unregisterContentObserver(ContentObserver observer) { argument
101 public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) { argument
84 registerContentObserver(Uri uri, boolean notifyForDescendents, ContentObserver observer) argument
/frameworks/base/core/java/android/view/
H A DViewTreeObserver.java26 * A view tree observer is used to register listeners that can be notified of global
268 * Merges all the listeners registered on the specified observer with the listeners
269 * registered on this object. After this method is invoked, the specified observer
272 * @param observer The ViewTreeObserver whose listeners must be added to this observer
274 void merge(ViewTreeObserver observer) { argument
275 if (observer.mOnGlobalFocusListeners != null) {
277 mOnGlobalFocusListeners.addAll(observer.mOnGlobalFocusListeners);
279 mOnGlobalFocusListeners = observer.mOnGlobalFocusListeners;
283 if (observer
[all...]
/frameworks/base/core/java/android/content/
H A DContentService.java144 * Register a content observer tied to a specific user's view of the provider.
152 IContentObserver observer, int userHandle) {
153 if (observer == null || uri == null) {
154 throw new IllegalArgumentException("You must pass a valid uri and observer");
173 mRootNode.addObserverLocked(uri, observer, notifyForDescendants, mRootNode,
175 if (false) Log.v(TAG, "Registered observer " + observer + " at " + uri +
181 IContentObserver observer) {
182 registerContentObserver(uri, notifyForDescendants, observer,
186 public void unregisterContentObserver(IContentObserver observer) { argument
151 registerContentObserver(Uri uri, boolean notifyForDescendants, IContentObserver observer, int userHandle) argument
180 registerContentObserver(Uri uri, boolean notifyForDescendants, IContentObserver observer) argument
204 notifyChange(Uri uri, IContentObserver observer, boolean observerWantsSelfNotifications, boolean syncToNetwork, int userHandle) argument
276 notifyChange(Uri uri, IContentObserver observer, boolean observerWantsSelfNotifications, boolean syncToNetwork) argument
293 ObserverCall(ObserverNode node, IContentObserver observer, boolean selfChange) argument
607 public final IContentObserver observer; field in class:ContentService.ObserverNode.ObserverEntry
710 addObserverLocked(Uri uri, IContentObserver observer, boolean notifyForDescendants, Object observersLock, int uid, int pid, int userHandle) argument
717 addObserverLocked(Uri uri, int index, IContentObserver observer, boolean notifyForDescendants, Object observersLock, int uid, int pid, int userHandle) argument
749 removeObserverLocked(IContentObserver observer) argument
778 collectMyObserversLocked(boolean leaf, IContentObserver observer, boolean observerWantsSelfNotifications, int targetUserHandle, ArrayList<ObserverCall> calls) argument
808 collectObserversLocked(Uri uri, int index, IContentObserver observer, boolean observerWantsSelfNotifications, int targetUserHandle, ArrayList<ObserverCall> calls) argument
[all...]
H A DIContentService.aidl33 void unregisterContentObserver(IContentObserver observer);
36 * Register a content observer tied to a specific user's view of the provider.
43 IContentObserver observer, int userHandle);
52 void notifyChange(in Uri uri, IContentObserver observer,
/frameworks/base/core/tests/coretests/src/android/os/storage/
H A DAsecTests.java564 StorageListener observer = new StorageListener();
566 sm.registerListener(observer);
568 // Wait on observer
569 synchronized(observer) {
572 while((!observer.isDone()) && (waitTime < MAX_WAIT_TIME) ) {
573 observer.wait(WAIT_TIME_INCR);
576 if(!observer.isDone()) {
581 sm.unregisterListener(observer);
626 MultipleStorageLis observer = new MultipleStorageLis();
633 sm.registerListener(observer);
[all...]
/frameworks/base/cmds/bmgr/src/com/android/commands/bmgr/
H A DBmgr.java254 RestoreObserver observer = new RestoreObserver();
255 int err = mRestore.getAvailableRestoreSets(observer);
259 observer.waitForCompletion();
260 printRestoreSets(observer.sets);
357 RestoreObserver observer = new RestoreObserver();
358 int err = mRestore.restorePackage(pkg, observer);
361 observer.waitForCompletion();
375 RestoreObserver observer = new RestoreObserver();
385 int err = mRestore.getAvailableRestoreSets(observer);
387 observer
[all...]

Completed in 338 milliseconds

1234