mirror of
https://gitee.com/openharmony/security_security_component_manager
synced 2024-11-23 06:29:45 +00:00
fix code alarm
Change-Id: I68a90fdd194d99201f798425005a0aa2139839ed Signed-off-by: j21p3 <yanjun59@huawei.com>
This commit is contained in:
parent
42e9ee6a8c
commit
1a68eb5e27
@ -43,7 +43,6 @@ public:
|
||||
private:
|
||||
static float GetWindowScale(int32_t windowId);
|
||||
static void AdjustSecCompRect(SecCompBase* comp, float scale);
|
||||
static bool IsDlpSandboxCalling(AccessToken::AccessTokenID tokenId);
|
||||
};
|
||||
} // namespace SecurityComponent
|
||||
} // namespace Security
|
||||
|
@ -268,6 +268,13 @@ void SecCompPermManager::InitEventHandler(const std::shared_ptr<SecEventHandler>
|
||||
secHandler_ = secHandler;
|
||||
}
|
||||
|
||||
namespace {
|
||||
inline bool IsDlpSandboxCalling(AccessToken::AccessTokenID tokenId)
|
||||
{
|
||||
return AccessToken::AccessTokenKit::GetHapDlpFlag(tokenId) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
int32_t SecCompPermManager::GrantTempPermission(AccessToken::AccessTokenID tokenId,
|
||||
const std::shared_ptr<SecCompBase>& componentInfo)
|
||||
{
|
||||
@ -313,11 +320,6 @@ int32_t SecCompPermManager::GrantTempPermission(AccessToken::AccessTokenID token
|
||||
}
|
||||
return SC_SERVICE_ERROR_PERMISSION_OPER_FAIL;
|
||||
}
|
||||
|
||||
inline bool SecCompPermManager::IsDlpSandboxCalling(AccessToken::AccessTokenID tokenId)
|
||||
{
|
||||
return AccessToken::AccessTokenKit::GetHapDlpFlag(tokenId) != 0;
|
||||
}
|
||||
} // namespace SecurityComponent
|
||||
} // namespace Security
|
||||
} // namespace OHOS
|
||||
|
@ -59,7 +59,6 @@ private:
|
||||
const std::string& permissionName);
|
||||
void RemoveAppGrantPermissionRecord(AccessToken::AccessTokenID tokenId,
|
||||
const std::string& permissionName);
|
||||
bool IsDlpSandboxCalling(AccessToken::AccessTokenID tokenId);
|
||||
|
||||
std::unordered_map<AccessToken::AccessTokenID, int32_t> applySaveCountMap_;
|
||||
std::unordered_map<AccessToken::AccessTokenID, std::deque<std::string>> saveTaskDequeMap_;
|
||||
|
Loading…
Reference in New Issue
Block a user