diff --git a/contactsCJ/src/contacts_permission.cpp b/contactsCJ/src/contacts_permission.cpp index de9324fa8af27b1d1bb0c64656d4ba879095bec6..80cd6faeae377f1f75cf05198f72a8fece74175e 100644 --- a/contactsCJ/src/contacts_permission.cpp +++ b/contactsCJ/src/contacts_permission.cpp @@ -53,8 +53,9 @@ bool ContactsTelephonyPermission::CheckPermission(const std::string &permissionN auto callerToken = IPCSkeleton::GetCallingTokenID(); auto callerPid = IPCSkeleton::GetCallingPid(); + auto ts = static_cast(time(NULL)); HILOG_INFO("contactsCheckPermission,get callerPid = %{public}d,permission = %{public}s,ts = %{public}lld", - callerPid, permissionName.c_str(), time(NULL)); + callerPid, permissionName.c_str(), ts); auto tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); int result = PermissionState::PERMISSION_DENIED; if (tokenType == ATokenTypeEnum::TOKEN_NATIVE) { @@ -88,4 +89,4 @@ bool ContactsTelephonyPermission::CheckPermission(const std::string &permissionN return true; } } // namespace Telephony -} // namespace OHOS \ No newline at end of file +} // namespace OHOS