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

Commit 48af5aee authored by jiabin's avatar jiabin
Browse files

Mute haptic channels by default.

In case the apps start vibration while playing asserts containing haptic
channels, it will be safer to mute haptic channels by default. Apps will
need to explicitly enable haptic channels if they want haptic via audio.

Bug: 129544270
Test: play with/without enabling haptic channels.
Change-Id: Id35d25c2be1c0b26053389f0b277b1ce321ad29e
parent 35c240e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -504,7 +504,7 @@ public final class AudioAttributes implements Parcelable {
        private int mContentType = CONTENT_TYPE_UNKNOWN;
        private int mContentType = CONTENT_TYPE_UNKNOWN;
        private int mSource = MediaRecorder.AudioSource.AUDIO_SOURCE_INVALID;
        private int mSource = MediaRecorder.AudioSource.AUDIO_SOURCE_INVALID;
        private int mFlags = 0x0;
        private int mFlags = 0x0;
        private boolean mMuteHapticChannels = false;
        private boolean mMuteHapticChannels = true;
        private HashSet<String> mTags = new HashSet<String>();
        private HashSet<String> mTags = new HashSet<String>();
        private Bundle mBundle;
        private Bundle mBundle;


@@ -824,7 +824,7 @@ public final class AudioAttributes implements Parcelable {


        /**
        /**
         * Specifying if haptic should be muted or not when playing audio-haptic coupled data.
         * Specifying if haptic should be muted or not when playing audio-haptic coupled data.
         * By default, haptic channels are enabled.
         * By default, haptic channels are disabled.
         * @param muted true to force muting haptic channels.
         * @param muted true to force muting haptic channels.
         * @return the same Builder instance.
         * @return the same Builder instance.
         */
         */