Home
last modified time | relevance | path

Searched refs:firstTokenId (Results 1 – 13 of 13) sorted by relevance

/base/location/frameworks/location_common/common/source/
Dcommon_utils.cpp36 bool CommonUtils::CheckLocationPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckLocationPermission() argument
38 return CheckPermission(ACCESS_LOCATION, tokenId, firstTokenId); in CheckLocationPermission()
63 bool CommonUtils::CheckBackgroundPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckBackgroundPermission() argument
65 return CheckPermission(ACCESS_BACKGROUND_LOCATION, tokenId, firstTokenId); in CheckBackgroundPermission()
68 bool CommonUtils::CheckApproximatelyPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckApproximatelyPermission() argument
70 return CheckPermission(ACCESS_APPROXIMATELY_LOCATION, tokenId, firstTokenId); in CheckApproximatelyPermission()
73 bool CommonUtils::CheckSecureSettings(uint32_t tokenId, uint32_t firstTokenId) in CheckSecureSettings() argument
75 return CheckPermission(MANAGE_SECURE_SETTINGS, tokenId, firstTokenId); in CheckSecureSettings()
88 int CommonUtils::GetPermissionLevel(uint32_t tokenId, uint32_t firstTokenId) in GetPermissionLevel() argument
91 if (CheckPermission(ACCESS_APPROXIMATELY_LOCATION, tokenId, firstTokenId) && in GetPermissionLevel()
[all …]
Dapp_identity.cpp29 AppIdentity::AppIdentity(pid_t uid, pid_t pid, uint32_t tokenId, uint32_t firstTokenId) in AppIdentity() argument
30 : uid_(uid), pid_(pid), tokenId_(tokenId), firstTokenId_(firstTokenId) in AppIdentity()
/base/location/interfaces/inner_api/include/
Dapp_identity.h26 explicit AppIdentity(pid_t uid, pid_t pid, uint32_t tokenId, uint32_t firstTokenId);
64 inline void SetFirstTokenId(uint32_t firstTokenId) in SetFirstTokenId() argument
66 firstTokenId_ = firstTokenId; in SetFirstTokenId()
Dcommon_utils.h143 static bool CheckLocationPermission(uint32_t tokenId, uint32_t firstTokenId);
144 static bool CheckApproximatelyPermission(uint32_t tokenId, uint32_t firstTokenId);
145 static bool CheckBackgroundPermission(uint32_t tokenId, uint32_t firstTokenId);
146 …tatic bool CheckPermission(const std::string &permission, uint32_t tokenId, uint32_t firstTokenId);
147 static bool CheckSecureSettings(uint32_t tokenId, uint32_t firstTokenId);
155 static int GetPermissionLevel(uint32_t tokenId, uint32_t firstTokenId);
/base/location/services/location_locator/locator/source/
Dreport_manager.cpp96 uint32_t firstTokenId = request->GetFirstTokenId(); in ProcessRequestForReport() local
97 std::unique_ptr<Location> finalLocation = GetPermittedLocation(tokenId, firstTokenId, location); in ProcessRequestForReport()
116 …::unique_ptr<Location> ReportManager::GetPermittedLocation(uint32_t tokenId, uint32_t firstTokenId, in GetPermittedLocation() argument
124 if (!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in GetPermittedLocation()
125 CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) { in GetPermittedLocation()
127 } else if (!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in GetPermittedLocation()
128 !CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) { in GetPermittedLocation()
Drequest.cpp92 void Request::SetFirstTokenId(uint32_t firstTokenId) in SetFirstTokenId() argument
94 this->firstTokenId_ = firstTokenId; in SetFirstTokenId()
Dlocator_background_proxy.cpp248 uint32_t firstTokenId = request->GetFirstTokenId(); in CheckPermission() local
249 return ((CommonUtils::CheckLocationPermission(tokenId, firstTokenId) || in CheckPermission()
250 CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) && in CheckPermission()
251 CommonUtils::CheckBackgroundPermission(tokenId, firstTokenId)); in CheckPermission()
Drequest_manager.cpp419 uint32_t firstTokenId = request->GetFirstTokenId(); in AddRequestToWorkRecord() local
421 if (!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in AddRequestToWorkRecord()
422 !CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) { in AddRequestToWorkRecord()
/base/location/test/fuzztest/locator/reportmanager_fuzzer/
Dreportmanager_fuzzer.cpp52 uint32_t firstTokenId = data[index++]; in ReportManagerFuzzerTest() local
53 reportManager->GetPermittedLocation(tokenId, firstTokenId, location); in ReportManagerFuzzerTest()
/base/useriam/user_auth_framework/services/ipc/src/
Dipc_common.cpp150 uint32_t firstTokenId = stub.GetFirstTokenID(); in CheckDirectCallerAndFirstCallerIfSet() local
153 …if ((firstTokenId != 0 && AccessTokenKit::VerifyAccessToken(firstTokenId, permission) != RET_SUCCE… in CheckDirectCallerAndFirstCallerIfSet()
/base/location/test/location_common/source/
Dcommon_utils_test.cpp183 uint32_t firstTokenId = 0; variable
185 EXPECT_EQ(false, CommonUtils::CheckLocationPermission(invalidTokenId, firstTokenId));
186 EXPECT_EQ(false, CommonUtils::CheckApproximatelyPermission(invalidTokenId, firstTokenId));
187 EXPECT_EQ(false, CommonUtils::CheckBackgroundPermission(invalidTokenId, firstTokenId));
188 EXPECT_EQ(false, CommonUtils::CheckSecureSettings(invalidTokenId, firstTokenId));
/base/location/services/location_locator/locator/include/
Dreport_manager.h38 std::unique_ptr<Location> GetPermittedLocation(uint32_t tokenId, uint32_t firstTokenId,
Drequest.h52 void SetFirstTokenId(uint32_t firstTokenId);