• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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_record.h"
17 
18 namespace OHOS {
19 namespace AAFwk {
20 std::shared_ptr<AbilityRecord> Token::abilityRecord = nullptr;
21 
Token()22 Token::Token()
23 {}
24 
~Token()25 Token::~Token()
26 {}
27 
GetAbilityRecordByToken(sptr<IRemoteObject> token)28 std::shared_ptr<AbilityRecord> Token::GetAbilityRecordByToken(sptr<IRemoteObject> token)
29 {
30     return abilityRecord;
31 }
32 
AbilityRecord()33 AbilityRecord::AbilityRecord()
34 {}
35 
~AbilityRecord()36 AbilityRecord::~AbilityRecord()
37 {}
38 
GetAbilityInfo() const39 const AppExecFwk::AbilityInfo &AbilityRecord::GetAbilityInfo() const
40 {
41     return abilityInfo;
42 }
43 
GetInstanceKey()44 std::string AbilityRecord::GetInstanceKey()
45 {
46     return instanceKey;
47 }
48 
IsTerminating()49 bool AbilityRecord::IsTerminating()
50 {
51     return isTerminating;
52 }
53 
GetApplicationInfo() const54 const AppExecFwk::ApplicationInfo &AbilityRecord::GetApplicationInfo() const
55 {
56     return appInfo;
57 }
58 }  // namespace AAFwk
59 }  // namespace OHOS
60