Lines Matching refs:pid
44 int pid, int64_t clientId) in DeathNotifier() argument
45 : mService(service), mPid(pid), mClientId(clientId) {} in DeathNotifier()
95 int pid, in getResourceInfosForEdit() argument
97 ssize_t index = map.indexOfKey(pid); in getResourceInfosForEdit()
101 map.add(pid, infosForPid); in getResourceInfosForEdit()
104 return map.editValueFor(pid); in getResourceInfosForEdit()
127 static void notifyResourceGranted(int pid, const std::vector<MediaResourceParcel> &resources) { in notifyResourceGranted() argument
134 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_AUDIO_CODEC); in notifyResourceGranted()
136 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_VIDEO_CODEC); in notifyResourceGranted()
345 int32_t pid, in addResource() argument
351 pid, (long long) clientId, getString(resources).string()); in addResource()
355 if (!mProcessInfo->isValidPid(pid)) { in addResource()
359 ResourceInfos& infos = getResourceInfosForEdit(pid, mMap); in addResource()
384 info.deathNotifier = new DeathNotifier(ref<ResourceManagerService>(), pid, clientId); in addResource()
388 notifyResourceGranted(pid, resources); in addResource()
393 int32_t pid, int64_t clientId, in removeResource() argument
396 pid, (long long) clientId, getString(resources).string()); in removeResource()
400 if (!mProcessInfo->isValidPid(pid)) { in removeResource()
404 ssize_t index = mMap.indexOfKey(pid); in removeResource()
406 ALOGV("removeResource: didn't find pid %d for clientId %lld", pid, (long long) clientId); in removeResource()
441 Status ResourceManagerService::removeClient(int32_t pid, int64_t clientId) { in removeClient() argument
442 removeResource(pid, clientId, true); in removeClient()
446 Status ResourceManagerService::removeResource(int pid, int64_t clientId, bool checkValid) { in removeResource() argument
449 pid, (long long) clientId); in removeResource()
453 if (checkValid && !mProcessInfo->isValidPid(pid)) { in removeResource()
457 ssize_t index = mMap.indexOfKey(pid); in removeResource()
459 ALOGV("removeResource: didn't find pid %d for clientId %lld", pid, (long long) clientId); in removeResource()
654 Status ResourceManagerService::markClientForPendingRemoval(int32_t pid, int64_t clientId) { in markClientForPendingRemoval() argument
657 pid, (long long) clientId); in markClientForPendingRemoval()
661 if (!mProcessInfo->isValidPid(pid)) { in markClientForPendingRemoval()
665 ssize_t index = mMap.indexOfKey(pid); in markClientForPendingRemoval()
668 pid, (long long)clientId); in markClientForPendingRemoval()
684 bool ResourceManagerService::getPriority_l(int pid, int* priority) { in getPriority_l() argument
685 int newPid = pid; in getPriority_l()
687 if (mOverridePidMap.find(pid) != mOverridePidMap.end()) { in getPriority_l()
688 newPid = mOverridePidMap[pid]; in getPriority_l()
690 newPid, pid); in getPriority_l()
757 int pid = -1; in getLowestPriorityPid_l() local
775 if (pid == -1 || tempPriority > priority) { in getLowestPriorityPid_l()
777 pid = tempPid; in getLowestPriorityPid_l()
781 if (pid != -1) { in getLowestPriorityPid_l()
782 *lowestPriorityPid = pid; in getLowestPriorityPid_l()
785 return (pid != -1); in getLowestPriorityPid_l()
788 bool ResourceManagerService::isCallingPriorityHigher_l(int callingPid, int pid) { in isCallingPriorityHigher_l() argument
795 if (!getPriority_l(pid, &priority)) { in isCallingPriorityHigher_l()
803 int pid, MediaResource::Type type, std::shared_ptr<IResourceManagerClient> *client, in getBiggestClient_l() argument
805 ssize_t index = mMap.indexOfKey(pid); in getBiggestClient_l()
807 ALOGE("getBiggestClient_l: can't find resource info for pid %d", pid); in getBiggestClient_l()
831 ALOGE("getBiggestClient_l: can't find resource type %s for pid %d", asString(type), pid); in getBiggestClient_l()