• 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 "mock_iability_manager_collaborator.h"
17 #include "hilog_tag_wrapper.h"
18 
19 namespace OHOS {
20 namespace AAFwk {
21 
IAbilityManagerCollaborator()22 IAbilityManagerCollaborator::IAbilityManagerCollaborator()
23 {
24     TAG_LOGI(AAFwkTag::URIPERMMGR, "IAbilityManagerCollaborator init");
25 }
26 
~IAbilityManagerCollaborator()27 IAbilityManagerCollaborator::~IAbilityManagerCollaborator()
28 {
29     TAG_LOGI(AAFwkTag::URIPERMMGR, "IAbilityManagerCollaborator release");
30 }
31 
GrantUriPermission(const std::vector<std::string> & uriVec,uint32_t flag,uint32_t targetTokenId,const std::string & targetBundleName)32 int32_t IAbilityManagerCollaborator::GrantUriPermission(const std::vector<std::string> &uriVec, uint32_t flag,
33     uint32_t targetTokenId, const std::string &targetBundleName)
34 {
35     TAG_LOGI(AAFwkTag::URIPERMMGR, "GrantUriPermission: %{public}d", grantResult);
36     return grantResult;
37 }
38 
RevokeUriPermission(uint32_t tokenId)39 int32_t IAbilityManagerCollaborator::RevokeUriPermission(uint32_t tokenId)
40 {
41     TAG_LOGI(AAFwkTag::URIPERMMGR, "RevokeUriPermission: %{public}d", revokeResult);
42     return revokeResult;
43 }
44 
45 int32_t IAbilityManagerCollaborator::grantResult = 0;
46 int32_t IAbilityManagerCollaborator::revokeResult = 0;
47 }  // namespace AAFwk
48 }  // namespace OHOS