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

Commit 53d14177 authored by Chris Manton's avatar Chris Manton
Browse files

mock: Introduce TestMockMainShimStack

Bug: 326004343
Test: m .
Flag: EXEMPT, test infrastructure
Change-Id: Id1c40a949e5b210d09e5a1b0e96b6c73a71df0ac
parent 072c39e5
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -341,6 +341,13 @@ filegroup {
    ],
    ],
}
}


filegroup {
    name: "TestMockMainShimStack",
    srcs: [
        "mock/mock_main_shim_stack.cc",
    ],
}

filegroup {
filegroup {
    name: "TestMockMainShimLeScanning",
    name: "TestMockMainShimLeScanning",
    srcs: [
    srcs: [
+58 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright 2024 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 "hci/acl_manager.h"
#include "main/shim/stack.h"

namespace bluetooth {
namespace shim {

Stack* Stack::GetInstance() {
  static Stack instance;
  return &instance;
}

void Stack::StartEverything() {}

void Stack::StartModuleStack(const ModuleList* /* modules */,
                             const os::Thread* /* thread */) {}

void Stack::Start(ModuleList* /* modules */) {}

void Stack::Stop() {}

bool Stack::IsRunning() { return stack_thread_ != nullptr; }

StackManager* Stack::GetStackManager() { return nullptr; }

const StackManager* Stack::GetStackManager() const { return nullptr; }

legacy::Acl* Stack::GetAcl() { return acl_; }

LinkPolicyInterface* Stack::LinkPolicy() { return nullptr; }

Btm* Stack::GetBtm() { return btm_; }

os::Handler* Stack::GetHandler() { return stack_handler_; }

bool Stack::IsDumpsysModuleStarted() const { return false; }

bool Stack::LockForDumpsys(std::function<void()> /* dumpsys_callback */) {
  return false;
}

}  // namespace shim
}  // namespace bluetooth