mirror of
https://gitee.com/openharmony/base_location
synced 2024-11-23 23:10:05 +00:00
!734 adapter for car parking
Merge pull request !734 from smilebear/master
This commit is contained in:
commit
1c5896687c
@ -20,6 +20,8 @@
|
||||
"ohos.permission.MANAGE_SECURE_SETTINGS",
|
||||
"ohos.permission.GET_TELEPHONY_STATE",
|
||||
"ohos.permission.LOCATION",
|
||||
"ohos.permission.APPROXIMATELY_LOCATION",
|
||||
"ohos.permission.LOCATION_IN_BACKGROUND",
|
||||
"ohos.permission.GET_WIFI_INFO",
|
||||
"ohos.permission.SET_WIFI_INFO",
|
||||
"ohos.permission.GET_RUNNING_INFO",
|
||||
|
@ -1337,6 +1337,17 @@ int32_t LocatorAbilityStub::OnRemoteRequest(uint32_t code,
|
||||
MessageParcel &data, MessageParcel &reply, MessageOption &option)
|
||||
{
|
||||
int ret = ERRCODE_SUCCESS;
|
||||
pid_t callingPid = IPCSkeleton::GetCallingPid();
|
||||
pid_t callingUid = IPCSkeleton::GetCallingUid();
|
||||
uint32_t callingTokenId = IPCSkeleton::GetCallingTokenID();
|
||||
uint64_t callingTokenIdEx = IPCSkeleton::GetCallingFullTokenID();
|
||||
uint32_t callingFirstTokenid = IPCSkeleton::GetFirstTokenID();
|
||||
// first token id is invalid
|
||||
if (callingUid == callingFirstTokenid && callingUid == static_cast<pid_t>(getuid())
|
||||
&& callingPid == getpid()) {
|
||||
callingFirstTokenid = 0;
|
||||
}
|
||||
|
||||
AppIdentity identity;
|
||||
identity.SetPid(IPCSkeleton::GetCallingPid());
|
||||
identity.SetUid(IPCSkeleton::GetCallingUid());
|
||||
|
Loading…
Reference in New Issue
Block a user