Merge "vibrator: clarify behavior for repeated commands" am: ea49733bb4 am: 3f92e5526e
am: 2b8ffb99d9
Change-Id: Ib18a2fde0b77029f678a7b5394b2e15868dd6d0d
diff --git a/vibrator/aidl/android/hardware/vibrator/IVibrator.aidl b/vibrator/aidl/android/hardware/vibrator/IVibrator.aidl
index ceaa0a0..8c4fd05 100644
--- a/vibrator/aidl/android/hardware/vibrator/IVibrator.aidl
+++ b/vibrator/aidl/android/hardware/vibrator/IVibrator.aidl
@@ -51,7 +51,8 @@
/**
* Turn off vibrator
*
- * Cancel a previously-started vibration, if any.
+ * Cancel a previously-started vibration, if any. If a previously-started vibration is
+ * associated with a callback, then onComplete should still be called on that callback.
*/
void off();
@@ -62,6 +63,9 @@
* was canceled (through off()). A callback is only expected to be supported when
* getCapabilities CAP_ON_CALLBACK is specified.
*
+ * Doing this operation while the vibrator is already on is undefined behavior. Clients should
+ * explicitly call off.
+ *
* @param timeoutMs number of milliseconds to vibrate.
* @param callback A callback used to inform Frameworks of state change, if supported.
*/
@@ -73,6 +77,9 @@
* A callback is only expected to be supported when getCapabilities CAP_PERFORM_CALLBACK
* is specified.
*
+ * Doing this operation while the vibrator is already on is undefined behavior. Clients should
+ * explicitly call off.
+ *
* @param effect The type of haptic event to trigger.
* @param strength The intensity of haptic event to trigger.
* @param callback A callback used to inform Frameworks of state change, if supported.