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

Commit 56303154 authored by Myles Watson's avatar Myles Watson
Browse files

Make ShimModuleStartup static

Remove unused mocks, as well.

Bug: 301661850
Test: mma -j32
Flag: EXEMPT, no logical change
Change-Id: Ibdb2b212e0097cb47c273460ab05e3c2d09eb1af
parent 9bae1793
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ static void post_to_main_message_loop(const base::Location& from_here,
  }
}

future_t* ShimModuleStartUp() {
static future_t* ShimModuleStartUp() {
  hci = bluetooth::shim::hci_layer_get_interface();
  ASSERT_LOG(hci, "%s could not get hci layer interface.", __func__);

@@ -48,7 +48,7 @@ future_t* ShimModuleStartUp() {
  return kReturnImmediate;
}

future_t* GeneralShutDown() {
static future_t* GeneralShutDown() {
  bluetooth::shim::Stack::GetInstance()->Stop();
  return kReturnImmediate;
}
+0 −2
Original line number Diff line number Diff line
@@ -991,7 +991,6 @@ cc_test {
        "gatt/gatt_utils.cc",
        "test/common/mock_eatt.cc",
        "test/common/mock_gatt_layer.cc",
        "test/common/mock_main_shim.cc",
        "test/gatt/gatt_sr_test.cc",
    ],
    shared_libs: [
@@ -1287,7 +1286,6 @@ cc_test {
        "gatt/gatt_utils.cc",
        "test/common/mock_eatt.cc",
        "test/common/mock_gatt_layer.cc",
        "test/common/mock_main_shim.cc",
        "test/gatt/mock_gatt_utils_ref.cc",
        "test/stack_gatt_sr_hash_test.cc",
    ],
+0 −46
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.
 */

/*
 * Generated mock file from original source file
 *   Functions generated:14
 */

#define LOG_TAG "bt_shim"
#include "common/init_flags.h"
#include "main/shim/shim.h"
#include "test/common/mock_functions.h"

#ifndef UNUSED_ATTR
#define UNUSED_ATTR
#endif

bool bluetooth::shim::is_gd_stack_started_up() {
  inc_func_call_count(__func__);
  return false;
}
future_t* GeneralShutDown() {
  inc_func_call_count(__func__);
  return nullptr;
}
future_t* IdleModuleStartUp() {
  inc_func_call_count(__func__);
  return nullptr;
}
future_t* ShimModuleStartUp() {
  inc_func_call_count(__func__);
  return nullptr;
}
+0 −12
Original line number Diff line number Diff line
@@ -37,15 +37,3 @@ bool bluetooth::shim::is_gd_stack_started_up() {
  inc_func_call_count(__func__);
  return test::mock::bluetooth_shim_is_gd_stack_started_up;
}
future_t* GeneralShutDown() {
  inc_func_call_count(__func__);
  return nullptr;
}
future_t* IdleModuleStartUp() {
  inc_func_call_count(__func__);
  return nullptr;
}
future_t* ShimModuleStartUp() {
  inc_func_call_count(__func__);
  return nullptr;
}