FileDocCategorySizeDatePackage
RemoteCallback.javaAPI DocAndroid 5.1 API3020Thu Mar 12 22:22:10 GMT 2015android.os

RemoteCallback

public abstract class RemoteCallback extends Object implements Parcelable
TODO: Make this a public API? Let's see how it goes with a few use cases first.
hide

Fields Summary
final Handler
mHandler
final IRemoteCallback
mTarget
public static final Parcelable.Creator
CREATOR
Constructors Summary
public RemoteCallback(Handler handler)

        mHandler = handler;
        mTarget = new LocalCallback();
    
RemoteCallback(IRemoteCallback target)

        mHandler = null;
        mTarget = target;
    
Methods Summary
public intdescribeContents()

        return 0;
    
public booleanequals(java.lang.Object otherObj)

        if (otherObj == null) {
            return false;
        }
        try {
            return mTarget.asBinder().equals(((RemoteCallback)otherObj)
                    .mTarget.asBinder());
        } catch (ClassCastException e) {
        }
        return false;
    
public inthashCode()

        return mTarget.asBinder().hashCode();
    
protected abstract voidonResult(Bundle bundle)

public voidsendResult(Bundle bundle)

        mTarget.sendResult(bundle);
    
public voidwriteToParcel(Parcel out, int flags)

        out.writeStrongBinder(mTarget.asBinder());