Skip to content
Snippets Groups Projects
Commit 041f21a8 authored by Juan Sebastian Martinez's avatar Juan Sebastian Martinez Committed by Android (Google) Code Review
Browse files

Merge "Improved docstring of SliderStateListener and delegating primitive...

Merge "Improved docstring of SliderStateListener and delegating primitive durations call to the vibrator service." into main
parents 4ca16947 70f9869e
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,9 @@ interface SliderStateListener {
* Notification that the slider reached a certain progress on the slider track.
*
* This method is called in all intermediate steps of a continuous progress change as the slider
* moves through the slider track.
* moves through the slider track. A single discrete movement of the handle by an external
* button or by a jump on the slider track will not trigger this callback. See
* [onSelectAndArrow] and [onProgressJump] for these cases.
*
* @param[progress] The progress of the slider in the range from 0F to 1F (inclusive).
*/
......@@ -56,7 +58,7 @@ interface SliderStateListener {
fun onProgressJump(@FloatRange(from = 0.0, to = 1.0) progress: Float)
/**
* Notification that the slider handle was moved by a button press.
* Notification that the slider handle was moved discretely by one step via a button press.
*
* @param[progress] The progress of the slider in the range from 0F to 1F (inclusive).
*/
......
......@@ -167,11 +167,7 @@ public class VibratorHelper {
* @see Vibrator#getPrimitiveDurations(int...)
*/
public int[] getPrimitiveDurations(int... primitiveIds) {
if (!hasVibrator()) {
return new int[]{0};
} else {
return mVibrator.getPrimitiveDurations(primitiveIds);
}
return mVibrator.getPrimitiveDurations(primitiveIds);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment