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

Commit d5c9b995 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7068015 from d119e97c to sc-release

Change-Id: I28de6e539091140466d237f54a4a401b320e7ed6
parents 2b9cbab5 d119e97c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ cc_library_shared {
        "android/bluetooth/IBluetoothCallback.aidl",
        "android/bluetooth/IBluetoothProfileServiceConnection.aidl",
        "android/bluetooth/IBluetoothHeadset.aidl",
        "android/bluetooth/IBluetoothHeadsetPhone.aidl",
        "android/bluetooth/IBluetoothHearingAid.aidl",
        "android/bluetooth/IBluetoothHidHost.aidl",
        "android/bluetooth/IBluetoothPan.aidl",
@@ -93,7 +92,6 @@ filegroup {
        "android/bluetooth/IBluetoothCallback.aidl",
        "android/bluetooth/IBluetoothProfileServiceConnection.aidl",
        "android/bluetooth/IBluetoothHeadset.aidl",
        "android/bluetooth/IBluetoothHeadsetPhone.aidl",
        "android/bluetooth/IBluetoothHearingAid.aidl",
        "android/bluetooth/IBluetoothHidHost.aidl",
        "android/bluetooth/IBluetoothLeAudio.aidl",
+0 −39
Original line number Diff line number Diff line
/*
 * Copyright 2012 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.bluetooth;

/**
 * API for Bluetooth Headset Phone Service in phone app
 *
 * {@hide}
 */
interface IBluetoothHeadsetPhone {
  // Internal functions, not be made public
  boolean answerCall();
  boolean hangupCall();
  boolean sendDtmf(int dtmf);
  boolean processChld(int chld);
  String getNetworkOperator();
  String getSubscriberNumber();
  boolean listCurrentCalls();
  boolean queryPhoneState();

  // Internal for phone app to call
  void updateBtHandsfreeAfterRadioTechnologyChange();
  void cdmaSwapSecondCallState();
  void cdmaSetSecondCallState(boolean state);
}
+14 −11
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include "bta_ag_int.h"
#include "bta_api.h"
#include "bta_sys.h"
#include "main/shim/dumpsys.h"
#include "osi/include/log.h"
#include "osi/include/osi.h"
#include "utl.h"
@@ -509,7 +510,7 @@ void bta_ag_api_result(uint16_t handle, tBTA_AG_RES result,
  if (handle != BTA_AG_HANDLE_ALL) {
    p_scb = bta_ag_scb_by_idx(handle);
    if (p_scb) {
      APPL_TRACE_DEBUG("bta_ag_api_result: p_scb 0x%08x ", p_scb);
      LOG_DEBUG("AG event scb:%s", p_scb->ToString().c_str());
      bta_ag_sm_execute(p_scb, static_cast<uint16_t>(BTA_AG_API_RESULT_EVT),
                        event_data);
    }
@@ -518,7 +519,7 @@ void bta_ag_api_result(uint16_t handle, tBTA_AG_RES result,
    for (i = 0, p_scb = &bta_ag_cb.scb[0]; i < BTA_AG_MAX_NUM_CLIENTS;
         i++, p_scb++) {
      if (p_scb->in_use && p_scb->svc_conn) {
        APPL_TRACE_DEBUG("bta_ag_api_result p_scb 0x%08x ", p_scb);
        LOG_DEBUG("AG event for all scb:%s", p_scb->ToString().c_str());
        bta_ag_sm_execute(p_scb, static_cast<uint16_t>(BTA_AG_API_RESULT_EVT),
                          event_data);
      }
@@ -713,20 +714,21 @@ void bta_ag_sm_execute(tBTA_AG_SCB* p_scb, uint16_t event,
  uint16_t previous_event = event;
  uint8_t previous_state = p_scb->state;

  APPL_TRACE_EVENT(
      "%s: handle=0x%04x, bd_addr=%s, state=%s(0x%02x), "
      "event=%s(0x%04x), result=%s(0x%02x)",
      __func__, bta_ag_scb_to_idx(p_scb), p_scb->peer_addr.ToString().c_str(),
  LOG_DEBUG(
      "Execute AG event handle:0x%04x bd_addr:%s state:%s[0x%02x]"
      " event:%s[0x%04x] result:%s[0x%02x]",
      bta_ag_scb_to_idx(p_scb), PRIVATE_ADDRESS(p_scb->peer_addr),
      bta_ag_state_str(p_scb->state), p_scb->state, bta_ag_evt_str(event),
      event, bta_ag_res_str(data.api_result.result), data.api_result.result);

  bta_ag_better_state_machine(p_scb, event, data);

  if (p_scb->state != previous_state) {
    APPL_TRACE_EVENT(
        "%s: handle=0x%04x, bd_addr=%s, state_change[%s(0x%02x)]->[%s(0x%02x)],"
        " event[%s(0x%04x)], result[%s(0x%02x)]",
        __func__, bta_ag_scb_to_idx(p_scb), p_scb->peer_addr.ToString().c_str(),
    LOG_DEBUG(
        "State changed handle:0x%04x bd_addr:%s "
        "state_change:%s[0x%02x]->%s[0x%02x]"
        " event:%s[0x%04x] result:%s[0x%02x]",
        bta_ag_scb_to_idx(p_scb), PRIVATE_ADDRESS(p_scb->peer_addr),
        bta_ag_state_str(previous_state), previous_state,
        bta_ag_state_str(p_scb->state), p_scb->state,
        bta_ag_evt_str(previous_event), previous_event,
@@ -738,7 +740,8 @@ void bta_ag_sm_execute_by_handle(uint16_t handle, uint16_t event,
                                 const tBTA_AG_DATA& data) {
  tBTA_AG_SCB* p_scb = bta_ag_scb_by_idx(handle);
  if (p_scb) {
    APPL_TRACE_DEBUG("%s: p_scb 0x%08x ", __func__, p_scb);
    LOG_DEBUG("AG state machine event:%s[0x%04x] handle:0x%04x",
              bta_ag_evt_str(event), event, handle);
    bta_ag_sm_execute(p_scb, event, data);
  }
}
+7 −8
Original line number Diff line number Diff line
@@ -437,19 +437,18 @@ static void bta_ag_create_sco(tBTA_AG_SCB* p_scb, bool is_orig) {

    /* Send pending commands to create SCO connection to peer */
    bta_ag_create_pending_sco(p_scb, bta_ag_cb.sco.is_local);
    APPL_TRACE_API("%s: orig %d, inx 0x%04x, pkt types 0x%04x", __func__,
                   is_orig, p_scb->sco_idx, params.packet_types);
    LOG_DEBUG("Initiating AG SCO inx 0x%04x, pkt types 0x%04x", p_scb->sco_idx,
              params.packet_types);
  } else {
    /* Not initiating, go to listen mode */
    tBTM_STATUS status = BTM_CreateSco(
    tBTM_STATUS btm_status = BTM_CreateSco(
        &p_scb->peer_addr, false, params.packet_types, &p_scb->sco_idx,
        bta_ag_sco_conn_cback, bta_ag_sco_disc_cback);
    if (status == BTM_CMD_STARTED) {
    if (btm_status == BTM_CMD_STARTED) {
      BTM_RegForEScoEvts(p_scb->sco_idx, bta_ag_esco_connreq_cback);
    }

    APPL_TRACE_API("%s: orig %d, inx 0x%04x, status 0x%x, pkt types 0x%04x",
                   __func__, is_orig, p_scb->sco_idx, status,
    LOG_DEBUG("Listening AG SCO inx 0x%04x status:%s pkt types 0x%04x",
              p_scb->sco_idx, btm_status_text(btm_status).c_str(),
              params.packet_types);
  }
  APPL_TRACE_DEBUG(
+3 −1
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#include "osi/include/osi.h"
#include "osi/include/properties.h"
#include "stack/include/acl_api.h"
#include "stack/include/btm_client_interface.h"
#include "utl.h"

/*****************************************************************************
@@ -3170,7 +3171,8 @@ static void bta_av_offload_codec_builder(tBTA_AV_SCB* p_scb,
  p_a2dp_offload->max_latency = 0;
  p_a2dp_offload->mtu = mtu;
  p_a2dp_offload->acl_hdl =
      BTM_GetHCIConnHandle(p_scb->PeerAddress(), BT_TRANSPORT_BR_EDR);
      get_btm_client_interface().lifecycle.BTM_GetHCIConnHandle(
          p_scb->PeerAddress(), BT_TRANSPORT_BR_EDR);
  btav_a2dp_scmst_info_t scmst_info =
      p_scb->p_cos->get_scmst_info(p_scb->PeerAddress());
  p_a2dp_offload->scms_t_enable[0] = scmst_info.enable_status;
Loading