From 7314fe03b6cc7c16d49aacbe59840d8724f6852e Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 4 Nov 2010 11:40:08 -0700 Subject: Add an API to find out whether there is a vibrator. Change-Id: Ic0d967bc72c542fc6a97331c9197114f3f571c08 --- include/hardware_legacy/vibrator.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/hardware_legacy/vibrator.h') diff --git a/include/hardware_legacy/vibrator.h b/include/hardware_legacy/vibrator.h index 15fd942..7994f62 100644 --- a/include/hardware_legacy/vibrator.h +++ b/include/hardware_legacy/vibrator.h @@ -22,6 +22,13 @@ extern "C" { #endif /** + * Return whether the device has a vibrator. + * + * @return 1 if a vibrator exists, 0 if it doesn't. + */ +int vibrator_exists(); + +/** * Turn on vibrator * * @param timeout_ms number of milliseconds to vibrate -- cgit v1.1