From ef5d8751e6fadd325f5209a02d731c05d5a4ac0f Mon Sep 17 00:00:00 2001 From: Lais Andrade Date: Thu, 11 Jun 2020 16:36:10 +0000 Subject: [PATCH] Add details to VibrationEffect waveform documentation Explain the time unit of timings argument and copy explanation of amplitude values to the summary segments of the javadocs. Fix: 140846849 Test: N/A Change-Id: Ia6fd6cb5d0e16076a54f24f7c3d2f3d4ca78d5bd --- core/java/android/os/VibrationEffect.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/java/android/os/VibrationEffect.java b/core/java/android/os/VibrationEffect.java index fd7cdda3808a4..06254574401b7 100644 --- a/core/java/android/os/VibrationEffect.java +++ b/core/java/android/os/VibrationEffect.java @@ -221,15 +221,16 @@ public abstract class VibrationEffect implements Parcelable { * * Waveform vibrations are a potentially repeating series of timing and amplitude pairs. For * each pair, the value in the amplitude array determines the strength of the vibration and the - * value in the timing array determines how long it vibrates for. An amplitude of 0 implies no - * vibration (i.e. off), and any pairs with a timing value of 0 will be ignored. + * value in the timing array determines how long it vibrates for, in milliseconds. Amplitude + * values must be between 0 and 255, and an amplitude of 0 implies no vibration (i.e. off). Any + * pairs with a timing value of 0 will be ignored. *

* To cause the pattern to repeat, pass the index into the timings array at which to start the * repetition, or -1 to disable repeating. *

* - * @param timings The timing values of the timing / amplitude pairs. Timing values of 0 - * will cause the pair to be ignored. + * @param timings The timing values, in milliseconds, of the timing / amplitude pairs. Timing + * values of 0 will cause the pair to be ignored. * @param amplitudes The amplitude values of the timing / amplitude pairs. Amplitude values * must be between 0 and 255, or equal to {@link #DEFAULT_AMPLITUDE}. An * amplitude value of 0 implies the motor is off.