Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -37,7 +37,9 @@ interface SliderStateListener {
     * Notification that the slider reached a certain progress on the slider track.
     * 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
     * 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).
     * @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)
    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).
     * @param[progress] The progress of the slider in the range from 0F to 1F (inclusive).
     */
     */
+1 −5
Original line number Original line Diff line number Diff line
@@ -167,12 +167,8 @@ public class VibratorHelper {
     * @see Vibrator#getPrimitiveDurations(int...)
     * @see Vibrator#getPrimitiveDurations(int...)
     */
     */
    public int[] getPrimitiveDurations(int... primitiveIds) {
    public int[] getPrimitiveDurations(int... primitiveIds) {
        if (!hasVibrator()) {
            return new int[]{0};
        } else {
        return mVibrator.getPrimitiveDurations(primitiveIds);
        return mVibrator.getPrimitiveDurations(primitiveIds);
    }
    }
    }


    /**
    /**
     * Perform a vibration using a view and the one-way API with flags
     * Perform a vibration using a view and the one-way API with flags