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

Commit 60cf4a5b authored by jiabin's avatar jiabin Committed by Jiabin Huang
Browse files

Update doc for audio-coupled-haptic related stuff.

When using audio-coupled-haptic playback, the haptic channels will be
muted if the app doesn't have the vibrate permission. Update the doc to
state that apps should hold vibrate permission to make
audio-coupled-haptic works as expected.

Bug: 236586224
Test: make
Change-Id: I69c1332d39f997a61f3a969d652144d829de9659
parent 5a5a4504
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1200,6 +1200,8 @@ public final class AudioAttributes implements Parcelable {
        /**
         * Specifying if haptic should be muted or not when playing audio-haptic coupled data.
         * By default, haptic channels are disabled.
         * <p>This will be ignored if the caller doesn't have the
         * {@link android.Manifest.permission#VIBRATE} permission.
         * @param muted true to force muting haptic channels.
         * @return the same Builder instance.
         */
+2 −1
Original line number Diff line number Diff line
@@ -91,7 +91,8 @@ public class HapticGenerator extends AudioEffect implements AutoCloseable {
    }

    /**
     * Enable or disable the effect.
     * Enable or disable the effect. The effect can only be enabled if the caller has the
     * {@link android.Manifest.permission#VIBRATE} permission.
     *
     * @param enabled the requested enable state
     * @return {@link #SUCCESS} in case of success, {@link #ERROR_INVALID_OPERATION}