Reputation: 3481
I am using the class RemoteCallbackList in Android, but when I am calling the callback in the remote process, the callback hangs, and then so do my calling thread. Now, is it possible to "kill" the callback and free my process (from another thread in my process), i.e. can I force a RemoteException to happen in my process to disconnect the callback so I can proceed?
Upvotes: 0
Views: 114
Reputation: 1
just Unregister for the Remotecallback, no need to kill the Remotecallabck
unregister( callback ) : Boolean Remove from the list a callback that was previously added with register. This uses the callback.asBinder() object to correctly find the previous registration. Registrations are not counted; a single unregister call will remove a callback after any number calls to register for it.
Parameters callback : Object {IInterface} The callback to be removed from the list. Passing null here will cause a NullPointerException, so you will generally want to check for null before calling.
Returns Boolean Returns true if the callback was found and unregistered. Returns false if the given callback was not found on the list. @see register
Upvotes: 0