Lines Matching refs:callback

44  * <p>If a registered callback's process goes away, this class will take
60 Callback(E callback, Object cookie) {
61 mCallback = callback;
77 public boolean register(E callback) {
78 return register(callback, null);
82 * Add a new callback to the list. This callback will remain in the list
84 * goes away. If the callback was already registered (determined by
85 * checking to see if the {@link IInterface#asBinder callback.asBinder()}
88 * will remove a callback after any number calls to register it.
90 * @param callback The callback interface to be added to the list. Must
97 * callback.
99 * @return Returns true if the callback was successfully added to the list.
101 * previously been called or the callback's process has gone away.
107 public boolean register(E callback, Object cookie) {
112 IBinder binder = callback.asBinder();
114 Callback cb = new Callback(callback, cookie);
125 * Remove from the list a callback that was previously added with
127 * {@link IInterface#asBinder callback.asBinder()} object to correctly
130 * a callback after any number calls to {@link #register} for it.
132 * @param callback The callback to be removed from the list. Passing
136 * @return Returns true if the callback was found and unregistered. Returns
137 * false if the given callback was not found on the list.
141 public boolean unregister(E callback) {
143 Callback cb = mCallbacks.remove(callback.asBinder());
153 * Disable this callback list. All registered callbacks are unregistered,
175 public void onCallbackDied(E callback) {
179 * Called when the process hosting a callback in the list has gone away.
183 * @param callback The callback whose process has died. Note that, since
192 public void onCallbackDied(E callback, Object cookie) {
193 onCallbackDied(callback);
198 * This creates a copy of the callback list, which you can retrieve items
258 * The callback list itself, however, will take care of unregistering
265 * @return Returns the callback interface that you can call. This will
312 * and the second the number of callback to which the broadcast will be delivered.