1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16#define private public 17#define protected public 18#include "ability_manager_client.h" 19#undef private 20#undef protected 21 22namespace OHOS { 23namespace AAFwk { 24std::shared_ptr<AbilityManagerClient> AbilityManagerClient::instance_ = nullptr; 25std::once_flag AbilityManagerClient::singletonFlag_; 26 27AbilityManagerClient::AbilityManagerClient() 28{} 29AbilityManagerClient::~AbilityManagerClient() 30{} 31 32std::shared_ptr<AbilityManagerClient> AbilityManagerClient::GetInstance() 33{ 34 std::call_once(singletonFlag_, [] () { 35 instance_ = std::make_shared<AbilityManagerClient>(); 36 }); 37 return instance_; 38} 39 40ErrCode AbilityManagerClient::ConnectAbility( 41 const Want& want, sptr<IAbilityConnection> connect, sptr<IRemoteObject> callerToken, int32_t userId) 42{ 43 return NO_ERROR; 44} 45 46ErrCode AbilityManagerClient::DisconnectAbility(sptr<IAbilityConnection> connect) 47{ 48 return NO_ERROR; 49} 50 51ErrCode AbilityManagerClient::SetAbilityController( 52 sptr<AppExecFwk::IAbilityController> abilityController, bool imAStabilityTest) 53{ 54 return NO_ERROR; 55} 56} // namespace AAFwk 57} // namespace OHOS