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

Commit c7be861e authored by Jack He's avatar Jack He Committed by android-build-merger
Browse files

HFP: Remove redundant AG data callout code

am: 476c773f

Change-Id: I11e7c92839657477654ff7838df050cbdbd1ad13
parents 74915f42 476c773f
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
#include <cstring>

#include "bta_ag_api.h"
#include "bta_ag_co.h"
#include "bta_ag_int.h"
#include "bta_api.h"
#include "bta_dm_api.h"
@@ -403,9 +402,6 @@ void bta_ag_rfc_close(tBTA_AG_SCB* p_scb, UNUSED_ATTR tBTA_AG_DATA* p_data) {

  bta_sys_conn_close(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);

  /* call close call-out */
  bta_ag_co_data_close(close.hdr.handle);

  if (bta_ag_get_active_device() == p_scb->peer_addr) {
    bta_clear_active_device();
  }
@@ -477,10 +473,6 @@ void bta_ag_rfc_open(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data) {
  p_scb->at_cb.cmd_max_len = BTA_AG_CMD_MAX;
  bta_ag_at_init(&p_scb->at_cb);

  /* call app open call-out */
  bta_ag_co_data_open(bta_ag_scb_to_idx(p_scb),
                      bta_ag_svc_id[p_scb->conn_service]);

  bta_sys_conn_open(BTA_ID_AG, p_scb->app_id, p_scb->peer_addr);

  bta_ag_cback_open(p_scb, nullptr, BTA_AG_SUCCESS);
+1 −2
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@

#include <string.h>

#include "bta_ag_co.h"
#include "bta_ag_int.h"
#include "bta_api.h"
#include "bta_sys.h"
@@ -589,7 +588,7 @@ static void bta_ag_api_enable(tBTA_AG_DATA* p_data) {
  bta_ag_cb.parse_mode = p_data->api_enable.parse_mode;

  /* call init call-out */
  bta_ag_co_init();
  BTM_WriteVoiceSettings(AG_VOICE_SETTINGS);

  bta_sys_collision_register(BTA_ID_AG, bta_ag_collision_cback);

+0 −3
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@

#include "bt_common.h"
#include "bta_ag_api.h"
#include "bta_ag_co.h"
#include "bta_ag_int.h"
#include "bta_api.h"
#include "bta_sys.h"
@@ -171,8 +170,6 @@ static void bta_ag_mgmt_cback(uint32_t code, uint16_t port_handle,
 ******************************************************************************/
static int bta_ag_data_cback(UNUSED_ATTR uint16_t port_handle, void* p_data,
                             uint16_t len, uint16_t handle) {
  /* call data call-out directly */
  bta_ag_co_tx_write(handle, (uint8_t*)p_data, len);
  return 0;
}

+0 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@

#include "bt_common.h"
#include "bta_ag_api.h"
#include "bta_ag_co.h"
#include "bta_ag_int.h"
#include "bta_api.h"
#include "btm_api.h"

system/bta/include/bta_ag_co.h

deleted100644 → 0
+0 −87
Original line number Diff line number Diff line
/******************************************************************************
 *
 *  Copyright 2003-2012 Broadcom Corporation
 *
 *  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.
 *
 ******************************************************************************/

/******************************************************************************
 *
 *  This is the interface file for audio gateway call-out functions.
 *
 ******************************************************************************/
#ifndef BTA_AG_CO_H
#define BTA_AG_CO_H

#include "bta_ag_api.h"

/*******************************************************************************
 *
 * Function         bta_ag_co_init
 *
 * Description      This callout function is executed by AG when it is
 *                  started by calling BTA_AgEnable().  This function can be
 *                  used by the phone to initialize audio paths or for other
 *                  initialization purposes.
 *
 *
 * Returns          Void.
 *
 ******************************************************************************/
extern void bta_ag_co_init(void);

/*******************************************************************************
 *
 * Function         bta_ag_co_data_open
 *
 * Description      This function is executed by AG when a service level
 *                  connection
 *                  is opened.  The phone can use this function to set
 *                  up data paths or perform any required initialization or
 *                  set up particular to the connected service.
 *
 *
 * Returns          void
 *
 ******************************************************************************/
extern void bta_ag_co_data_open(uint16_t handle, tBTA_SERVICE_ID service);

/*******************************************************************************
 *
 * Function         bta_ag_co_data_close
 *
 * Description      This function is called by AG when a service level
 *                  connection is closed
 *
 *
 * Returns          void
 *
 ******************************************************************************/
extern void bta_ag_co_data_close(uint16_t handle);

/*******************************************************************************
 *
 * Function         bta_ag_co_tx_write
 *
 * Description      This function is called by the AG to send data to the
 *                  phone when the AG is configured for AT command pass-through.
 *                  The implementation of this function must copy the data to
 *                  the phone's memory.
 *
 * Returns          void
 *
 ******************************************************************************/
extern void bta_ag_co_tx_write(uint16_t handle, uint8_t* p_data, uint16_t len);

#endif /* BTA_AG_CO_H */
Loading