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

Commit 7cc8f12c authored by Michael Sun's avatar Michael Sun
Browse files

btaa: add btaa btif implementation

Implement the btaa btif layer to connect gd with btif through the shim
layer.

Tag: #feature
Bug: 172501038
Test: m
Change-Id: I5a463f854e6b4cd7cfae5f6b8100c62a1b8903d5
parent 38220e2e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ cc_library_static {
        "src/btif_a2dp_control.cc",
        "src/btif_a2dp_sink.cc",
        "src/btif_a2dp_source.cc",
        "src/btif_activity_attribution.cc",
        "src/btif_av.cc",
        "src/btif_avrcp_audio_track.cc",
        "src/btif_ble_advertiser.cc",
+25 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 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.
 */

#include <hardware/bt_activity_attribution.h>

namespace bluetooth {
namespace activity_attribution {

ActivityAttributionInterface* get_activity_attribution_instance();

}
}  // namespace bluetooth
+2 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@
#include "bta/include/bta_hf_client_api.h"
#include "btif/avrcp/avrcp_service.h"
#include "btif_a2dp.h"
#include "btif_activity_attribution.h"
#include "btif_api.h"
#include "btif_av.h"
#include "btif_bqr.h"
@@ -437,7 +438,7 @@ static const void* get_profile_interface(const char* profile_id) {
    return bluetooth::bluetooth_keystore::getBluetoothKeystoreInterface();

  if (is_profile(profile_id, BT_ACTIVITY_ATTRIBUTION_ID)) {
    return NULL;
    return bluetooth::activity_attribution::get_activity_attribution_instance();
  }

  if (is_profile(profile_id, BT_PROFILE_LE_AUDIO_ID))
+36 −0
Original line number Diff line number Diff line
/******************************************************************************
 *
 *  Copyright 2020 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.
 *
 ******************************************************************************/

#define LOG_TAG "bt_btif_activity_attribution"

#include "btif_activity_attribution.h"
#include "main/shim/activity_attribution.h"
#include "main/shim/shim.h"

using base::Bind;
using base::Unretained;

namespace bluetooth {
namespace activity_attribution {

ActivityAttributionInterface* get_activity_attribution_instance() {
  return bluetooth::shim::get_activity_attribution_instance();
}

}  // namespace activity_attribution
}  // namespace bluetooth