FileDocCategorySizeDatePackage
InputBinding.javaAPI DocAndroid 5.1 API4220Thu Mar 12 22:22:10 GMT 2015android.view.inputmethod

InputBinding

public final class InputBinding extends Object implements android.os.Parcelable
Information given to an {@link InputMethod} about a client connecting to it.

Fields Summary
static final String
TAG
final InputConnection
mConnection
The connection back to the client.
final android.os.IBinder
mConnectionToken
A remotable token for the connection back to the client.
final int
mUid
The UID where this binding came from.
final int
mPid
The PID where this binding came from.
public static final Parcelable.Creator
CREATOR
Used to make this class parcelable.
Constructors Summary
public InputBinding(InputConnection conn, android.os.IBinder connToken, int uid, int pid)
Constructor.

param
conn The interface for communicating back with the application.
param
connToken A remoteable token for communicating across processes.
param
uid The user id of the client of this binding.
param
pid The process id of where the binding came from.

    
                                                    
        
                
        mConnection = conn;
        mConnectionToken = connToken;
        mUid = uid;
        mPid = pid;
    
public InputBinding(InputConnection conn, InputBinding binding)
Constructor from an existing InputBinding taking a new local input connection interface.

param
conn The new connection interface.
param
binding Existing binding to copy.

        mConnection = conn;
        mConnectionToken = binding.getConnectionToken();
        mUid = binding.getUid();
        mPid = binding.getPid();
    
InputBinding(android.os.Parcel source)

        mConnection = null;
        mConnectionToken = source.readStrongBinder();
        mUid = source.readInt();
        mPid = source.readInt();
    
Methods Summary
public intdescribeContents()


       
        return 0;
    
public InputConnectiongetConnection()
Return the connection for interacting back with the application.

        return mConnection;
    
public android.os.IBindergetConnectionToken()
Return the token for the connection back to the application. You can not use this directly, it must be converted to a {@link InputConnection} for you.

        return mConnectionToken;
    
public intgetPid()
Return the process id where this binding came from.

        return mPid;
    
public intgetUid()
Return the user id of the client associated with this binding.

        return mUid;
    
public java.lang.StringtoString()

        return "InputBinding{" + mConnectionToken
                + " / uid " + mUid + " / pid " + mPid + "}";
    
public voidwriteToParcel(android.os.Parcel dest, int flags)
Used to package this object into a {@link Parcel}.

param
dest The {@link Parcel} to be written.
param
flags The flags used for parceling.

        dest.writeStrongBinder(mConnectionToken);
        dest.writeInt(mUid);
        dest.writeInt(mPid);