package android.os;
import libcore.util.NativeAllocationRegistry;
public class HwRemoteBinder implements IHwBinder {
private static final String TAG = "HwRemoteBinder";
private static final NativeAllocationRegistry sNativeRegistry;
public HwRemoteBinder() {
native_setup_empty();
sNativeRegistry.registerNativeAllocation(
this,
mNativeContext);
}
@Override
public IHwInterface queryLocalInterface(String descriptor) {
return null;
}
@Override
public native final void transact(
int code, HwParcel request, HwParcel reply, int flags)
throws RemoteException;
public native boolean linkToDeath(DeathRecipient recipient, long cookie);
public native boolean unlinkToDeath(DeathRecipient recipient);
private static native final long native_init();
private native final void native_setup_empty();
static {
long freeFunction = native_init();
sNativeRegistry = new NativeAllocationRegistry(
HwRemoteBinder.class.getClassLoader(),
freeFunction,
128 );
}
private static final void sendDeathNotice(DeathRecipient recipient, long cookie) {
recipient.serviceDied(cookie);
}
private long mNativeContext;
@Override
public final native boolean equals(Object other);
@Override
public final native int hashCode();
}