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 "ability_manager_service.h"
17
18 #include "ability_manager_errors.h"
19
20 namespace OHOS {
21 namespace AAFwk {
22 bool AbilityManagerService::isInStatusBarResult = false;
23 bool AbilityManagerService::isSupportStatusBarResult = true;
24 int32_t AbilityManagerService::userId_ = 0;
25 int32_t AbilityManagerService::startAbilityResult = ERR_OK;
26
AbilityManagerService()27 AbilityManagerService::AbilityManagerService() {}
28
~AbilityManagerService()29 AbilityManagerService::~AbilityManagerService() {}
30
IsInStatusBar(uint32_t accessTokenId,int32_t uid,bool isMultiInstance)31 bool AbilityManagerService::IsInStatusBar(uint32_t accessTokenId, int32_t uid, bool isMultiInstance)
32 {
33 return isInStatusBarResult;
34 }
35
IsSupportStatusBar(int32_t uid)36 bool AbilityManagerService::IsSupportStatusBar(int32_t uid)
37 {
38 return isSupportStatusBarResult;
39 }
40
GetUserId() const41 int32_t AbilityManagerService::GetUserId() const
42 {
43 return userId_;
44 }
45
StartAbility(const Want & want,const StartOptions & startOptions,const sptr<IRemoteObject> & callerToken,int32_t userId,int requestCode)46 int32_t AbilityManagerService::StartAbility(const Want &want, const StartOptions &startOptions,
47 const sptr<IRemoteObject> &callerToken, int32_t userId, int requestCode)
48 {
49 return startAbilityResult;
50 }
51 } // namespace AAFwk
52 } // namespace OHOS
53