Merge "Update doc for audio-coupled-haptic related stuff." am: fe752fc2b4 am: 1fe0a419aa am: 4ce721d428 am: eddf6d85c2 am: 416d479225

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142192

Change-Id: Ifd203e5ecba0e2df5f9af252cfd7fee9eb80e938
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-07-08 01:03:02 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 1 deletions

View File

@@ -1286,6 +1286,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.
*/

View File

@@ -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}