• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "ability_manager_client.h"
17 
18 namespace OHOS {
19 namespace AAFwk {
20 std::shared_ptr<AbilityManagerClient> AbilityManagerClient::instance_ = nullptr;
21 std::once_flag AbilityManagerClient::singletonFlag_;
22 
AbilityManagerClient()23 AbilityManagerClient::AbilityManagerClient()
24 {}
~AbilityManagerClient()25 AbilityManagerClient::~AbilityManagerClient()
26 {}
27 
GetInstance()28 std::shared_ptr<AbilityManagerClient> AbilityManagerClient::GetInstance()
29 {
30     std::call_once(singletonFlag_, [] () {
31         instance_ = std::shared_ptr<AbilityManagerClient>(new AbilityManagerClient());
32     });
33     return instance_;
34 }
35 
ConnectAbility(const Want & want,sptr<IAbilityConnection> connect,sptr<IRemoteObject> callerToken,int32_t userId)36 ErrCode AbilityManagerClient::ConnectAbility(
37     const Want& want, sptr<IAbilityConnection> connect, sptr<IRemoteObject> callerToken, int32_t userId)
38 {
39     return NO_ERROR;
40 }
41 
DisconnectAbility(sptr<IAbilityConnection> connect)42 ErrCode AbilityManagerClient::DisconnectAbility(sptr<IAbilityConnection> connect)
43 {
44     return NO_ERROR;
45 }
46 
SetAbilityController(sptr<AppExecFwk::IAbilityController> abilityController,bool imAStabilityTest)47 ErrCode AbilityManagerClient::SetAbilityController(
48     sptr<AppExecFwk::IAbilityController> abilityController, bool imAStabilityTest)
49 {
50     return NO_ERROR;
51 }
52 } // namespace AAFwk
53 } // namespace OHOS