public
static
class
InputDriver.Builder
extends Object
java.lang.Object
|
↳ |
com.google.android.things.userdriver.input.InputDriver.Builder
|
Builder class for InputDriver
objects.
Summary
Inherited methods |
From
class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Public constructors
InputDriver.Builder ()
Constructs a new builder.
Public methods
setAxisConfiguration
InputDriver.Builder setAxisConfiguration (int axis,
int min,
int max,
int fuzz,
int flat)
Configure an absolute axis supported by this driver.
This method should be called for each axis supported.
Parameters |
axis |
int : One of the axis constants from MotionEvent
. Currently only X and Y are supported. |
min |
int : An inclusive minimum value of positions on this axis. |
max |
int : An inclusive maximum value of positions on this axis. |
fuzz |
int : An int to denote the error tolerance of the axis measurements. |
flat |
int : An int denoting the extent of the center flat position. |
setName
InputDriver.Builder setName (String name)
Set the name of the input driver.
Parameters |
name |
String : A String representing the name of the driver. If a name is not provided, one
will be auto-generated. |
setProductId
InputDriver.Builder setProductId (int productId)
Set the product id for the driver.
A product id uniquely identifies which product within the address space
of a given vendor, identified by the device's vendor id. A value of 0 will
indicates a product id is not available.
Parameters |
productId |
int : An int representing the input device. Defaults to 0. |
setSupportedKeys
InputDriver.Builder setSupportedKeys (int[] supportedKeyCodes)
Set the keys supported by this driver.
Parameters |
supportedKeyCodes |
int : An array of key codes representing the keys this input driver
supports. The codes must be values from KeyEvent. |
setVendorId
InputDriver.Builder setVendorId (int vendorId)
Set the vendor id for the driver.
A vendor id uniquely identifies the company who manufactured the device.
A value of 0 indicates a vendor id is not available.
Parameters |
vendorId |
int : An int representing the vendor code. Defaults to 0. |