Methods Summary |
---|
public int | describeContents()
return Parcelable.CONTENTS_FILE_DESCRIPTOR;
|
public void | dispose()Disposes the input channel.
Explicitly releases the reference this object is holding on the input channel.
When all references are released, the input channel will be closed.
nativeDispose(false);
|
public android.view.InputChannel | dup()Duplicates the input channel.
InputChannel target = new InputChannel();
nativeDup(target);
return target;
|
protected void | finalize()
try {
nativeDispose(true);
} finally {
super.finalize();
}
|
public java.lang.String | getName()Gets the name of the input channel.
String name = nativeGetName();
return name != null ? name : "uninitialized";
|
private native void | nativeDispose(boolean finalized)
|
private native void | nativeDup(android.view.InputChannel target)
|
private native java.lang.String | nativeGetName()
|
private static native android.view.InputChannel[] | nativeOpenInputChannelPair(java.lang.String name)
|
private native void | nativeReadFromParcel(android.os.Parcel parcel)
|
private native void | nativeTransferTo(android.view.InputChannel other)
|
private native void | nativeWriteToParcel(android.os.Parcel parcel)
|
public static android.view.InputChannel[] | openInputChannelPair(java.lang.String name)Creates a new input channel pair. One channel should be provided to the input
dispatcher and the other to the application's input queue.
if (name == null) {
throw new IllegalArgumentException("name must not be null");
}
if (DEBUG) {
Slog.d(TAG, "Opening input channel pair '" + name + "'");
}
return nativeOpenInputChannelPair(name);
|
public void | readFromParcel(android.os.Parcel in)
if (in == null) {
throw new IllegalArgumentException("in must not be null");
}
nativeReadFromParcel(in);
|
public java.lang.String | toString()
return getName();
|
public void | transferTo(android.view.InputChannel outParameter)Transfers ownership of the internal state of the input channel to another
instance and invalidates this instance. This is used to pass an input channel
as an out parameter in a binder call.
if (outParameter == null) {
throw new IllegalArgumentException("outParameter must not be null");
}
nativeTransferTo(outParameter);
|
public void | writeToParcel(android.os.Parcel out, int flags)
if (out == null) {
throw new IllegalArgumentException("out must not be null");
}
nativeWriteToParcel(out);
if ((flags & PARCELABLE_WRITE_RETURN_VALUE) != 0) {
dispose();
}
|