/foundation/communication/wifi/services/wifi_standard/wifi_framework/wifi_manage/ |
D | wifi_auth_center.cpp | 39 int WifiAuthCenter::InitPermission(const int &pid, const int &uid) in InitPermission() argument 41 return WifiPermissionHelper::InitPermission(pid, uid); in InitPermission() 44 …er::ChangePermission(const std::map<std::string, int> &permissions, const int &pid, const int &uid) in ChangePermission() argument 49 return WifiPermissionHelper::ChangePermission(permissions, pid, uid); in ChangePermission() 52 int WifiAuthCenter::VerifySetWifiInfoPermission(const int &pid, const int &uid) in VerifySetWifiInfoPermission() argument 57 return WifiPermissionHelper::VerifySetWifiInfoPermission(pid, uid); in VerifySetWifiInfoPermission() 60 int WifiAuthCenter::VerifyGetWifiInfoPermission(const int &pid, const int &uid) in VerifyGetWifiInfoPermission() argument 65 return WifiPermissionHelper::VerifyGetWifiInfoPermission(pid, uid); in VerifyGetWifiInfoPermission() 68 int WifiAuthCenter::VerifyGetScanInfosPermission(const int &pid, const int &uid) in VerifyGetScanInfosPermission() argument 73 return WifiPermissionHelper::VerifyGetScanInfosPermission(pid, uid); in VerifyGetScanInfosPermission() [all …]
|
D | wifi_auth_center.h | 41 int InitPermission(const int &pid, const int &uid); 51 …nt ChangePermission(const std::map<std::string, int> &permissions, const int &pid, const int &uid); 60 int VerifySetWifiInfoPermission(const int &pid, const int &uid); 69 int VerifyGetWifiInfoPermission(const int &pid, const int &uid); 78 int VerifyGetScanInfosPermission(const int &pid, const int &uid); 87 int VerifyGetWifiLocalMacPermission(const int &pid, const int &uid); 96 int VerifyWifiConnectionPermission(const int &pid, const int &uid); 105 int VerifySetWifiConfigPermission(const int &pid, const int &uid); 114 int VerifyGetWifiConfigPermission(const int &pid, const int &uid); 123 int VerifyGetWifiDirectDevicePermission(const int &pid, const int &uid); [all …]
|
/foundation/resourceschedule/memmgr/test/unittest/phone/ |
D | reclaim_priority_manager_test.cpp | 82 int uid = 100; variable 83 int account_id = ReclaimPriorityManager::GetInstance().GetOsAccountLocalIdFromUid(uid); 86 ReclaimPriorityManager::GetInstance().UpdateReclaimPriorityInner(pid, uid, 89 bool isProcExist = ReclaimPriorityManager::GetInstance().IsProcExist(pid, uid, account_id); 93 isProcExist = ReclaimPriorityManager::GetInstance().IsProcExist(pid, uid, account_id); 96 ReclaimPriorityManager::GetInstance().UpdateReclaimPriorityInner(pid, uid, 121 int uid = 104; variable 122 int account_id = ReclaimPriorityManager::GetInstance().GetOsAccountLocalIdFromUid(uid); 125 ReclaimPriorityManager::GetInstance().UpdateReclaimPriorityInner(pid, uid, 129 bool hasBundle = account->HasBundle(uid); [all …]
|
/foundation/communication/wifi/services/wifi_standard/wifi_framework/wifi_manage/common/ |
D | wifi_permission_helper.h | 33 static int InitPermission(const int &pid, const int &uid); 42 static int ClearPermission(const int &pid, const int &uid); 52 …nt ChangePermission(const std::map<std::string, int> &permissions, const int &pid, const int &uid); 62 … IsGranted MockVerifyPermission(const std::string &permissionName, const int &pid, const int &uid); 72 static int VerifyPermission(const std::string &permissionName, const int &pid, const int &uid); 81 static int VerifySetWifiInfoPermission(const int &pid, const int &uid); 90 static int VerifyGetWifiInfoPermission(const int &pid, const int &uid); 99 static int VerifyGetScanInfosPermission(const int &pid, const int &uid); 108 static int VerifyGetWifiLocalMacPermission(const int &pid, const int &uid); 117 static int VerifyWifiConnectionPermission(const int &pid, const int &uid); [all …]
|
D | wifi_permission_helper.cpp | 53 int WifiPermissionHelper::InitPermission(const int &pid, const int &uid) in InitPermission() argument 67 g_uidPermissionMap[uid] = permissionMap; in InitPermission() 73 const std::map<std::string, int> &permissions, const int &pid, const int &uid) in ChangePermission() argument 88 g_uidPermissionMap[uid] = permissionMap; in ChangePermission() 93 int WifiPermissionHelper::ClearPermission(const int &pid, const int &uid) in ClearPermission() argument 97 g_uidPermissionMap.erase(uid); in ClearPermission() 101 …sionHelper::MockVerifyPermission(const std::string &permissionName, const int &pid, const int &uid) in MockVerifyPermission() argument 131 iter = g_uidPermissionMap.find(uid); in MockVerifyPermission() 134 LOGD("can't find UID=%{public}d in g_uidPermissionMap!", uid); in MockVerifyPermission() 160 …rmissionHelper::VerifyPermission(const std::string &permissionName, const int &pid, const int &uid) in VerifyPermission() argument [all …]
|
/foundation/resourceschedule/resource_schedule_service/cgroup_sched/framework/sched_controller/ |
D | app_state_observer.cpp | 39 auto uid = appStateData.uid; in OnForegroundApplicationChanged() local 43 cgHander->PostTask([cgHander, uid, bundleName, state] { in OnForegroundApplicationChanged() 44 cgHander->HandleForegroundApplicationChanged(uid, bundleName, state); in OnForegroundApplicationChanged() 49 payload["uid"] = appStateData.uid; in OnForegroundApplicationChanged() 62 auto uid = abilityStateData.uid; in OnAbilityStateChanged() local 70 …cgHander->PostTask([cgHander, uid, pid, bundleName, abilityName, token, abilityState, abilityType]… in OnAbilityStateChanged() 71 cgHander->HandleAbilityStateChanged(uid, pid, bundleName, abilityName, in OnAbilityStateChanged() 78 payload["uid"] = abilityStateData.uid; in OnAbilityStateChanged() 92 auto uid = abilityStateData.uid; in OnExtensionStateChanged() local 100 …cgHander->PostTask([cgHander, uid, pid, bundleName, abilityName, token, abilityState, abilityType]… in OnExtensionStateChanged() [all …]
|
D | cgroup_event_handler.cpp | 118 void CgroupEventHandler::HandleForegroundApplicationChanged(uid_t uid, std::string bundleName, int3… in HandleForegroundApplicationChanged() argument 124 …CGS_LOGD("%{public}s : %{public}d, %{public}s, %{public}d", __func__, uid, bundleName.c_str(), sta… in HandleForegroundApplicationChanged() 126 std::shared_ptr<Application> app = supervisor_->GetAppRecordNonNull(uid); in HandleForegroundApplicationChanged() 132 void CgroupEventHandler::HandleApplicationStateChanged(uid_t uid, std::string bundleName, int32_t s… in HandleApplicationStateChanged() argument 138 …CGS_LOGD("%{public}s : %{public}d, %{public}s, %{public}d", __func__, uid, bundleName.c_str(), sta… in HandleApplicationStateChanged() 142 supervisor_->RemoveApplication(uid); in HandleApplicationStateChanged() 145 std::shared_ptr<Application> app = supervisor_->GetAppRecordNonNull(uid); in HandleApplicationStateChanged() 150 void CgroupEventHandler::HandleAbilityStateChanged(uid_t uid, pid_t pid, std::string bundleName, in HandleAbilityStateChanged() argument 158 __func__, uid, pid, bundleName.c_str(), abilityName.c_str(), abilityState, abilityType); in HandleAbilityStateChanged() 161 auto app = supervisor_->GetAppRecord(uid); in HandleAbilityStateChanged() [all …]
|
D | window_state_observer.cpp | 34 auto uid = focusChangeInfo->uid_; in OnFocused() local 36 cgHander->PostTask([cgHander, windowId, token, windowType, displayId, pid, uid] { in OnFocused() 37 cgHander->HandleFocusedWindow(windowId, token, windowType, displayId, pid, uid); in OnFocused() 51 auto uid = focusChangeInfo->uid_; in OnUnfocused() local 53 cgHander->PostTask([cgHander, windowId, token, windowType, displayId, pid, uid] { in OnUnfocused() 54 cgHander->HandleUnfocusedWindow(windowId, token, windowType, displayId, pid, uid); in OnUnfocused() 73 auto uid = info->uid_; in OnWindowVisibilityChanged() local 74 cgHander->PostTask([cgHander, windowId, isVisible, pid, uid] { in OnWindowVisibilityChanged() 75 cgHander->HandleWindowVisibilityChanged(windowId, isVisible, pid, uid); in OnWindowVisibilityChanged()
|
D | background_task_observer.cpp | 48 auto uid = info->GetUid(); in OnTransientTaskStart() local 52 cgHander->PostTask([cgHander, uid, pid, pkgName] { in OnTransientTaskStart() 53 cgHander->HandleTransientTaskStart(uid, pid, pkgName); in OnTransientTaskStart() 72 auto uid = info->GetUid(); in OnTransientTaskEnd() local 76 cgHander->PostTask([cgHander, uid, pid, pkgName] { in OnTransientTaskEnd() 77 cgHander->HandleTransientTaskEnd(uid, pid, pkgName); in OnTransientTaskEnd() 97 auto uid = continuousTaskCallbackInfo->GetCreatorUid(); in OnContinuousTaskStart() local 101 cgHander->PostTask([cgHander, uid, pid, abilityName] { in OnContinuousTaskStart() 102 cgHander->HandleContinuousTaskStart(uid, pid, abilityName); in OnContinuousTaskStart() 122 auto uid = continuousTaskCallbackInfo->GetCreatorUid(); in OnContinuousTaskStop() local [all …]
|
/foundation/communication/netmanager_base/services/common/src/ |
D | net_settings.cpp | 33 bool NetSettings::IsUidForeground(uint32_t uid) in IsUidForeground() argument 35 if (foregroundUid_ == uid) { in IsUidForeground() 42 void NetSettings::SetForegroundUid(uint32_t uid) in SetForegroundUid() argument 44 foregroundUid_ = uid; in SetForegroundUid() 47 bool NetSettings::IsSystem(uint32_t uid) in IsSystem() argument 49 if (std::find(systemUids_.begin(), systemUids_.end(), uid) != systemUids_.end()) { in IsSystem() 56 void NetSettings::AddSystemUid(uint32_t uid) in AddSystemUid() argument 58 systemUids_.push_back(uid); in AddSystemUid() 61 void NetSettings::RemoveSystemUid(uint32_t uid) in RemoveSystemUid() argument 63 if (uid == 0) { in RemoveSystemUid() [all …]
|
/foundation/resourceschedule/work_scheduler/services/native/src/ |
D | work_policy_manager.cpp | 88 bool WorkPolicyManager::AddWork(shared_ptr<WorkStatus> workStatus, int32_t uid) in AddWork() argument 92 if (uidQueueMap_.count(uid) > 0) { in AddWork() 93 if (uidQueueMap_.at(uid)->Contains(make_shared<string>(workStatus->workId_))) { in AddWork() 96 } else if (uidQueueMap_.at(uid)->GetSize() >= MAX_WORK_COUNT_PER_UID) { in AddWork() 100 uidQueueMap_.at(uid)->Push(workStatus); in AddWork() 102 WS_HILOGD("uidQueue(%{public}d) not exists, create", uid); in AddWork() 103 uidQueueMap_.emplace(uid, make_shared<WorkQueue>()); in AddWork() 104 uidQueueMap_.at(uid)->Push(workStatus); in AddWork() 106 …HILOGI("push workStatus ID: %{public}s to uidQueue(%{public}d)", workStatus->workId_.c_str(), uid); in AddWork() 110 bool WorkPolicyManager::RemoveWork(shared_ptr<WorkStatus> workStatus, int32_t uid) in RemoveWork() argument [all …]
|
/foundation/communication/wifi/tests/wifi_standard/wifi_framework/wifi_manage/unittest/ |
D | wifi_auth_center_test.cpp | 24 EXPECT_EQ(0, WifiAuthCenter::GetInstance().InitPermission(pid, uid)); 46 EXPECT_EQ(0, WifiAuthCenter::GetInstance().ChangePermission(permissions, pid, uid)); 56 WifiAuthCenter::GetInstance().ChangePermission(permissions, pid, uid); 57 …EXPECT_EQ(PERMISSION_GRANTED, WifiAuthCenter::GetInstance().VerifySetWifiInfoPermission(pid, uid)); 67 WifiAuthCenter::GetInstance().ChangePermission(permissions, pid, uid); 68 … EXPECT_EQ(PERMISSION_DENIED, WifiAuthCenter::GetInstance().VerifySetWifiInfoPermission(pid, uid)); 78 WifiAuthCenter::GetInstance().ChangePermission(permissions, pid, uid); 79 …EXPECT_EQ(PERMISSION_GRANTED, WifiAuthCenter::GetInstance().VerifyGetWifiInfoPermission(pid, uid)); 89 WifiAuthCenter::GetInstance().ChangePermission(permissions, pid, uid); 90 … EXPECT_EQ(PERMISSION_DENIED, WifiAuthCenter::GetInstance().VerifyGetWifiInfoPermission(pid, uid)); [all …]
|
/foundation/resourceschedule/memmgr/services/memmgrservice/src/event/ |
D | mem_mgr_bg_task_subscriber.cpp | 44 int uid = ttInfo->GetUid(); in OnTransientTaskStart() local 46 HILOGD("called, pkg=%{public}s, uid=%{public}d, pid=%{public}d", pkgName.c_str(), uid, pid); in OnTransientTaskStart() 47 ReclaimPriorityManager::GetInstance().UpdateReclaimPriority(pid, uid, pkgName, in OnTransientTaskStart() 59 int uid = ttInfo->GetUid(); in OnTransientTaskEnd() local 61 HILOGD("called, pkg=%{public}s, uid=%{public}d, pid=%{public}d", pkgName.c_str(), uid, pid); in OnTransientTaskEnd() 62 ReclaimPriorityManager::GetInstance().UpdateReclaimPriority(pid, uid, pkgName, in OnTransientTaskEnd() 74 uid_t uid = ctInfo->GetCreatorUid(); in OnContinuousTaskStart() local 78 abilityName.c_str(), type, uid, pid); in OnContinuousTaskStart() 79 ReclaimPriorityManager::GetInstance().UpdateReclaimPriority(pid, uid, abilityName, in OnContinuousTaskStart() 91 uid_t uid = ctInfo->GetCreatorUid(); in OnContinuousTaskStop() local [all …]
|
D | app_state_observer.cpp | 42 appStateData.uid, appStateData.bundleName.c_str(), appStateData.state); in OnForegroundApplicationChanged() 45 … IGNORE_PID, appStateData.uid, appStateData.bundleName, AppStateUpdateReason::APPLICATION_SUSPEND); in OnForegroundApplicationChanged() 58 abilityStateData.pid, abilityStateData.uid, abilityStateData.bundleName, reason); in OnAbilityStateChanged() 60 …abilityStateData.uid, abilityStateData.pid, abilityStateData.bundleName.c_str(), reasonStr.c_str()… in OnAbilityStateChanged() 63 … abilityStateData.uid, abilityStateData.pid, abilityStateData.bundleName.c_str(), "Skiped!"); in OnAbilityStateChanged() 74 processData.uid, processData.pid, processData.bundleName.c_str()); in OnProcessCreated() 75 ReclaimPriorityManager::GetInstance().UpdateReclaimPriority(processData.pid, processData.uid, in OnProcessCreated() 82 processData.uid, processData.pid, processData.bundleName.c_str()); in OnProcessDied() 83 ReclaimPriorityManager::GetInstance().UpdateReclaimPriority(processData.pid, processData.uid, in OnProcessDied()
|
/foundation/resourceschedule/resource_schedule_service/cgroup_sched/framework/sched_controller/include/ |
D | cgroup_event_handler.h | 45 void HandleForegroundApplicationChanged(uid_t uid, std::string bundleName, int32_t state); 46 void HandleApplicationStateChanged(uid_t uid, std::string bundleName, int32_t state); 47 …void HandleAbilityStateChanged(uid_t uid, pid_t pid, std::string bundleName, std::string abilityNa… 49 …void HandleExtensionStateChanged(uid_t uid, pid_t pid, std::string bundleName, std::string ability… 51 void HandleProcessCreated(uid_t uid, pid_t pid, std::string bundleName); 52 void HandleProcessDied(uid_t uid, pid_t pid, std::string bundleName); 53 void HandleTransientTaskStart(uid_t uid, pid_t pid, std::string packageName); 54 void HandleTransientTaskEnd(uid_t uid, pid_t pid, std::string packageName); 55 void HandleContinuousTaskStart(uid_t uid, pid_t pid, std::string abilityName); 56 void HandleContinuousTaskCancel(uid_t uid, pid_t pid, std::string abilityName); [all …]
|
/foundation/aafwk/standard/services/test/moduletest/common/ams/app_running_processes_info_module_test/ |
D | app_running_processes_info_module_test.cpp | 117 appInfo->name, processName, appInfo->uid, bundleInfo); in CheckAppRunningRecording() 185 int uid = 100; variable 188 abilityInfo->applicationInfo.uid = uid; 191 appInfo->uid = uid; 199 record->SetUid(uid); 220 appInfo->name, processName, appInfo->uid, bundleInfo); 222 newRecord->SetUid(uid); 229 EXPECT_TRUE(info.uid_ == uid); 244 int uid = 0; variable 247 abilityInfo->applicationInfo.uid = uid; [all …]
|
/foundation/communication/bluetooth/services/bluetooth_standard/service/src/permission/ |
D | auth_center.cpp | 36 int AuthCenter::VerifyUseBluetoothPermission(const int &pid, const int &uid) in VerifyUseBluetoothPermission() argument 42 return PermissionHelper::VerifyUseBluetoothPermission(pid, uid); in VerifyUseBluetoothPermission() 45 int AuthCenter::VerifyDiscoverBluetoothPermission(const int &pid, const int &uid) in VerifyDiscoverBluetoothPermission() argument 50 return PermissionHelper::VerifyDiscoverBluetoothPermission(pid, uid); in VerifyDiscoverBluetoothPermission() 53 int AuthCenter::VerifyManageBluetoothPermission(const int &pid, const int &uid) in VerifyManageBluetoothPermission() argument 58 return PermissionHelper::VerifyManageBluetoothPermission(pid, uid); in VerifyManageBluetoothPermission()
|
D | permission_helper.cpp | 25 …rmissionHelper::VerifyPermission(const std::string &permissionName, const int &pid, const int &uid) in VerifyPermission() argument 46 int PermissionHelper::VerifyUseBluetoothPermission(const int &pid, const int &uid) in VerifyUseBluetoothPermission() argument 48 if (VerifyPermission("ohos.permission.USE_BLUETOOTH", pid, uid) == PERMISSION_DENIED) { in VerifyUseBluetoothPermission() 55 int PermissionHelper::VerifyDiscoverBluetoothPermission(const int &pid, const int &uid) in VerifyDiscoverBluetoothPermission() argument 57 if (VerifyPermission("ohos.permission.DISCOVER_BLUETOOTH", pid, uid) == PERMISSION_DENIED) { in VerifyDiscoverBluetoothPermission() 64 int PermissionHelper::VerifyManageBluetoothPermission(const int &pid, const int &uid) in VerifyManageBluetoothPermission() argument 66 if (VerifyPermission("ohos.permission.MANAGE_BLUETOOTH", pid, uid) == PERMISSION_DENIED) { in VerifyManageBluetoothPermission()
|
D | permission_helper.h | 31 static int VerifyPermission(const std::string &permissionName, const int &pid, const int &uid); 40 static int VerifyUseBluetoothPermission(const int &pid, const int &uid); 49 static int VerifyDiscoverBluetoothPermission(const int &pid, const int &uid); 58 static int VerifyManageBluetoothPermission(const int &pid, const int &uid);
|
/foundation/distributeddatamgr/distributeddatamgr/services/distributeddataservice/framework/checker/default/ |
D | system_checker.cpp | 42 std::string SystemChecker::GetAppId(pid_t uid, const std::string &bundleName) in GetAppId() argument 44 if (uid >= SYSTEM_UID || uid == CheckerManager::INVALID_UID) { in GetAppId() 48 …ZLOGD("bundleName:%{public}s, uid:%{public}d, appId:%{public}s", bundleName.c_str(), uid, appId.c_… in GetAppId() 52 bool SystemChecker::IsValid(pid_t uid, const std::string &bundleName) in IsValid() argument 54 return (uid < SYSTEM_UID && uid != CheckerManager::INVALID_UID); in IsValid()
|
D | bundle_checker.cpp | 47 std::string BundleChecker::GetAppId(pid_t uid, const std::string &bundleName) in GetAppId() argument 49 if (uid < SYSTEM_UID && uid != CheckerManager::INVALID_UID) { in GetAppId() 55 if (uid != CheckerManager::INVALID_UID) { in GetAppId() 56 auto success = bmsClient.GetBundleNameForUid(uid, bundle); in GetAppId() 71 ZLOGD("bundleName:%{public}s, uid:%{public}d, appId:%{public}s", bundleName.c_str(), uid, in GetAppId() 76 bool BundleChecker::IsValid(pid_t uid, const std::string &bundleName) in IsValid() argument 78 if (uid < SYSTEM_UID) { in IsValid() 84 auto success = bmsClient.GetBundleNameForUid(uid, bundle); in IsValid()
|
/foundation/distributeddatamgr/distributeddatamgr/services/distributeddataservice/adapter/permission/src/ |
D | meida_lib_checker.cpp | 47 std::string MeidaLibChecker::GetAppId(pid_t uid, const std::string &bundleName) in GetAppId() argument 49 if (!IsValid(uid, bundleName)) { in GetAppId() 54 (void)bmsClient.GetBundleNameForUid(uid, orionBundle); in GetAppId() 61 …rion: %{public}s, uid: %{public}d, bundle: %{public}s appId: %{public}s", orionBundle.c_str(), uid, in GetAppId() 66 bool MeidaLibChecker::IsValid(pid_t uid, const std::string &bundleName) in IsValid() argument 71 if (uid < SYSTEM_UID && uid != CheckerManager::INVALID_UID) { in IsValid()
|
/foundation/communication/netmanager_base/interfaces/kits/js/ |
D | @ohos.net.statistics.d.ts | 82 function getUidRxBytes(uid: number, callback: AsyncCallback<number>): void; 83 function getUidRxBytes(uid: number): Promise<number>; 92 function getUidTxBytes(uid: number, callback: AsyncCallback<number>): void; 93 function getUidTxBytes(uid: number): Promise<number>; 101 function on(type: 'netStatsChange', callback: Callback<{ iface: string, uid?: number }>): void; 106 function off(type: 'netStatsChange', callback?: Callback<{ iface: string, uid?: number }>): void; 143 uid: number; property
|
/foundation/communication/netmanager_base/services/common/include/ |
D | net_settings.h | 33 bool IsUidForeground(uint32_t uid); 34 void SetForegroundUid(uint32_t uid); 36 bool IsSystem(uint32_t uid); 37 void AddSystemUid(uint32_t uid); 38 void RemoveSystemUid(uint32_t uid);
|
/foundation/communication/netmanager_base/frameworks/js/napi/netstats/include/ |
D | net_stats_callback.h | 33 UidStatsEvent(std::string iface, uint32_t uid) : iface(iface), uid(uid) {} in UidStatsEvent() 35 uint32_t uid; member 41 int32_t NetUidStatsChanged(const std::string &iface, uint32_t uid);
|