1 /*
2  * Copyright (c) 2021-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 "app_context.h"
17 
18 namespace OHOS {
19 namespace AppExecFwk {
AppContext()20 AppContext::AppContext()
21 {}
~AppContext()22 AppContext::~AppContext()
23 {}
24 
GetAbilityInfo()25 const std::shared_ptr<AbilityInfo> AppContext::GetAbilityInfo()
26 {
27     return nullptr;
28 }
29 
StartAbility(const AAFwk::Want & want,int requestCode)30 ErrCode AppContext::StartAbility(const AAFwk::Want &want, int requestCode)
31 {
32     return ERR_INVALID_VALUE;
33 }
34 
StartAbility(const Want & want,int requestCode,const AbilityStartSetting & abilityStartSetting)35 ErrCode AppContext::StartAbility(const Want &want, int requestCode,
36     const AbilityStartSetting &abilityStartSetting)
37 {
38     return ERR_INVALID_VALUE;
39 }
40 
TerminateAbility()41 ErrCode AppContext::TerminateAbility()
42 {
43     return ERR_INVALID_VALUE;
44 }
45 
GetCallingBundle()46 std::string AppContext::GetCallingBundle()
47 {
48     return "";
49 }
50 
ConnectAbility(const Want & want,const sptr<AAFwk::IAbilityConnection> & conn)51 bool AppContext::ConnectAbility(const Want &want, const sptr<AAFwk::IAbilityConnection> &conn)
52 {
53     return false;
54 }
55 
DisconnectAbility(const sptr<AAFwk::IAbilityConnection> & conn)56 ErrCode AppContext::DisconnectAbility(const sptr<AAFwk::IAbilityConnection> &conn)
57 {
58     return ERR_INVALID_VALUE;
59 }
60 
StopAbility(const AAFwk::Want & want)61 bool AppContext::StopAbility(const AAFwk::Want &want)
62 {
63     return false;
64 }
65 
GetToken()66 sptr<IRemoteObject> AppContext::GetToken()
67 {
68     return nullptr;
69 }
70 
StartAbilities(const std::vector<AAFwk::Want> & wants)71 void AppContext::StartAbilities(const std::vector<AAFwk::Want> &wants)
72 {}
73 
GetMissionId()74 int AppContext::GetMissionId()
75 {
76     return -1;
77 }
78 }  // namespace AppExecFwk
79 }  // namespace OHOS
80