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