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

Commit d13df368 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge changes Ia4f1260c,I629f44f4

* changes:
  Disable volume control popup after HFP connected
  Handle AVDT_SCB_HDL_TC_CLOSE in avdt_scb idle state
parents b5f47ebf 57d7a8c9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.ParcelUuid;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.util.Log;
import android.util.Pair;

@@ -1602,8 +1603,11 @@ public class HeadsetClientStateMachine extends StateMachine {
                            if (event.valueInt == HeadsetClientHalConstants.VOLUME_TYPE_SPK) {
                                mCommandedSpeakerVolume = hfToAmVol(event.valueInt2);
                                logD("AM volume set to " + mCommandedSpeakerVolume);
                                boolean show_volume = SystemProperties
                                        .getBoolean("bluetooth.hfp_volume_control.enabled", true);
                                mAudioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL,
                                        +mCommandedSpeakerVolume, AudioManager.FLAG_SHOW_UI);
                                        +mCommandedSpeakerVolume,
                                        show_volume ? AudioManager.FLAG_SHOW_UI : 0);
                            } else if (event.valueInt
                                    == HeadsetClientHalConstants.VOLUME_TYPE_MIC) {
                                mAudioManager.setMicrophoneMute(event.valueInt2 == 0);
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ const uint8_t avdt_scb_st_idle[][AVDT_SCB_NUM_COLS] = {
    /* TC_DATA_EVT */
    {AVDT_SCB_DROP_PKT, AVDT_SCB_IGNORE, AVDT_SCB_IDLE_ST},
    /* CC_CLOSE_EVT */
    {AVDT_SCB_CLR_VARS, AVDT_SCB_IGNORE, AVDT_SCB_IDLE_ST}};
    {AVDT_SCB_HDL_TC_CLOSE, AVDT_SCB_CLR_VARS, AVDT_SCB_IDLE_ST}};

/* state table for configured state */
const uint8_t avdt_scb_st_conf[][AVDT_SCB_NUM_COLS] = {