public class VibratorService extends IVibratorService.Stub implements InputManager.InputDeviceListener
Modifier and Type | Method and Description |
---|---|
void |
cancelVibrate(IBinder token) |
protected void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
boolean |
hasVibrator() |
void |
onInputDeviceAdded(int deviceId)
Called whenever an input device has been added to the system.
|
void |
onInputDeviceChanged(int deviceId)
Called whenever the properties of an input device have changed since they
were last queried.
|
void |
onInputDeviceRemoved(int deviceId)
Called whenever an input device has been removed from the system.
|
void |
systemReady() |
void |
vibrate(int uid,
String opPkg,
long milliseconds,
int usageHint,
IBinder token) |
void |
vibratePattern(int uid,
String packageName,
long[] pattern,
int repeat,
int usageHint,
IBinder token) |
public void systemReady()
public boolean hasVibrator()
public void vibratePattern(int uid, String packageName, long[] pattern, int repeat, int usageHint, IBinder token)
public void cancelVibrate(IBinder token)
public void onInputDeviceAdded(int deviceId)
InputManager.InputDeviceListener
InputManager.getInputDevice(int)
to get more information about the device.onInputDeviceAdded
in interface InputManager.InputDeviceListener
deviceId
- The id of the input device that was added.public void onInputDeviceChanged(int deviceId)
InputManager.InputDeviceListener
InputManager.getInputDevice(int)
to get
a fresh InputDevice
object with the new properties.onInputDeviceChanged
in interface InputManager.InputDeviceListener
deviceId
- The id of the input device that changed.public void onInputDeviceRemoved(int deviceId)
InputManager.InputDeviceListener
onInputDeviceRemoved
in interface InputManager.InputDeviceListener
deviceId
- The id of the input device that was removed.protected void dump(FileDescriptor fd, PrintWriter pw, String[] args)