• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 "mock_ecological_rule_interceptor.h"
17 #include "mock_my_status.h"
18 
19 namespace OHOS {
20 namespace AAFwk {
21 
DoProcess(AbilityInterceptorParam param)22 ErrCode EcologicalRuleInterceptor::DoProcess(AbilityInterceptorParam param)
23 {
24     return ERR_OK;
25 }
26 
DoProcess(Want & want,int32_t userId)27 bool EcologicalRuleInterceptor::DoProcess(Want &want, int32_t userId)
28 {
29     return true;
30 }
31 
QueryAtomicServiceStartupRule(Want & want,sptr<IRemoteObject> callerToken,int32_t userId,AtomicServiceStartupRule & rule,sptr<Want> & replaceWant)32 ErrCode EcologicalRuleInterceptor::QueryAtomicServiceStartupRule(Want &want, sptr<IRemoteObject> callerToken,
33     int32_t userId, AtomicServiceStartupRule &rule, sptr<Want> &replaceWant)
34 {
35     return MyStatus::GetInstance().eriQueryAtomicServiceStartupRule_;
36 }
37 
GetEcologicalTargetInfo(const Want & want,const std::shared_ptr<AppExecFwk::AbilityInfo> & abilityInfo,ErmsCallerInfo & callerInfo)38 void EcologicalRuleInterceptor::GetEcologicalTargetInfo(const Want &want,
39     const std::shared_ptr<AppExecFwk::AbilityInfo> &abilityInfo, ErmsCallerInfo &callerInfo)
40 {
41 }
42 
GetEcologicalCallerInfo(const Want & want,ErmsCallerInfo & callerInfo,int32_t userId,const sptr<IRemoteObject> & callerToken)43 void EcologicalRuleInterceptor::GetEcologicalCallerInfo(const Want &want, ErmsCallerInfo &callerInfo, int32_t userId,
44     const sptr<IRemoteObject> &callerToken)
45 {
46 }
47 
InitErmsCallerInfo(const Want & want,const std::shared_ptr<AppExecFwk::AbilityInfo> & abilityInfo,ErmsCallerInfo & callerInfo,int32_t userId,const sptr<IRemoteObject> & callerToken)48 void EcologicalRuleInterceptor::InitErmsCallerInfo(const Want &want,
49     const std::shared_ptr<AppExecFwk::AbilityInfo> &abilityInfo,
50     ErmsCallerInfo &callerInfo, int32_t userId, const sptr<IRemoteObject> &callerToken)
51 {
52 }
53 
GetAppTypeByBundleType(int32_t bundleType)54 int32_t EcologicalRuleInterceptor::GetAppTypeByBundleType(int32_t bundleType)
55 {
56     return 0;
57 }
58 } // namespace AAFwk
59 } // namespace OHOS
60