1 /*
2  * Copyright (c) 2022-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 "permission_manager.h"
17 
18 #include "dm_constants.h"
19 
20 namespace OHOS {
21 namespace DistributedHardware {
22 DM_IMPLEMENT_SINGLE_INSTANCE(PermissionManager);
23 
CheckPermission(void)24 bool PermissionManager::CheckPermission(void)
25 {
26     return true;
27 }
28 
CheckNewPermission(void)29 bool PermissionManager::CheckNewPermission(void)
30 {
31     return true;
32 }
33 
CheckMonitorPermission(void)34 bool PermissionManager::CheckMonitorPermission(void)
35 {
36     return true;
37 }
38 
GetCallerProcessName(std::string & processName)39 int32_t PermissionManager::GetCallerProcessName(std::string &processName)
40 {
41     (void)processName;
42     return DM_OK;
43 }
44 
CheckProcessNameValidOnAuthCode(const std::string & processName)45 bool PermissionManager::CheckProcessNameValidOnAuthCode(const std::string &processName)
46 {
47     (void)processName;
48     return true;
49 }
50 
CheckProcessNameValidOnPinHolder(const std::string & processName)51 bool PermissionManager::CheckProcessNameValidOnPinHolder(const std::string &processName)
52 {
53     (void)processName;
54     return true;
55 }
56 
CheckSystemSA(const std::string & pkgName)57 bool PermissionManager::CheckSystemSA(const std::string &pkgName)
58 {
59     (void)pkgName;
60     return true;
61 }
62 
GetSystemSA()63 std::unordered_set<std::string> PermissionManager::GetSystemSA()
64 {
65     return std::unordered_set<std::string>{};
66 }
67 } // namespace DistributedHardware
68 } // namespace OHOS
69