Lines Matching refs:pid

44     DeathNotifier(const wp<ResourceManagerService> &service, int pid, int64_t clientId)  in DeathNotifier()  argument
45 : mService(service), mPid(pid), mClientId(clientId) {} in DeathNotifier()
93 int pid, in getResourceInfosForEdit() argument
95 ssize_t index = map.indexOfKey(pid); in getResourceInfosForEdit()
99 map.add(pid, infosForPid); in getResourceInfosForEdit()
102 return map.editValueFor(pid); in getResourceInfosForEdit()
124 static void notifyResourceGranted(int pid, const Vector<MediaResource> &resources) { in notifyResourceGranted() argument
131 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_AUDIO_CODEC); in notifyResourceGranted()
133 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_VIDEO_CODEC); in notifyResourceGranted()
306 int pid, in addResource() argument
312 pid, (long long) clientId, getString(resources).string()); in addResource()
316 if (!mProcessInfo->isValidPid(pid)) { in addResource()
320 ResourceInfos& infos = getResourceInfosForEdit(pid, mMap); in addResource()
334 info.deathNotifier = new DeathNotifier(this, pid, clientId); in addResource()
337 notifyResourceGranted(pid, resources); in addResource()
340 void ResourceManagerService::removeResource(int pid, int64_t clientId, in removeResource() argument
343 pid, (long long) clientId, getString(resources).string()); in removeResource()
347 if (!mProcessInfo->isValidPid(pid)) { in removeResource()
351 ssize_t index = mMap.indexOfKey(pid); in removeResource()
353 ALOGV("removeResource: didn't find pid %d for clientId %lld", pid, (long long) clientId); in removeResource()
384 void ResourceManagerService::removeClient(int pid, int64_t clientId) { in removeClient() argument
385 removeResource(pid, clientId, true); in removeClient()
388 void ResourceManagerService::removeResource(int pid, int64_t clientId, bool checkValid) { in removeResource() argument
391 pid, (long long) clientId); in removeResource()
395 if (checkValid && !mProcessInfo->isValidPid(pid)) { in removeResource()
399 ssize_t index = mMap.indexOfKey(pid); in removeResource()
401 ALOGV("removeResource: didn't find pid %d for clientId %lld", pid, (long long) clientId); in removeResource()
610 int pid = -1; in getLowestPriorityPid_l() local
628 if (pid == -1 || tempPriority > priority) { in getLowestPriorityPid_l()
630 pid = tempPid; in getLowestPriorityPid_l()
634 if (pid != -1) { in getLowestPriorityPid_l()
635 *lowestPriorityPid = pid; in getLowestPriorityPid_l()
638 return (pid != -1); in getLowestPriorityPid_l()
641 bool ResourceManagerService::isCallingPriorityHigher_l(int callingPid, int pid) { in isCallingPriorityHigher_l() argument
648 if (!mProcessInfo->getPriority(pid, &priority)) { in isCallingPriorityHigher_l()
656 int pid, MediaResource::Type type, sp<IResourceManagerClient> *client) { in getBiggestClient_l() argument
657 ssize_t index = mMap.indexOfKey(pid); in getBiggestClient_l()
659 ALOGE("getBiggestClient_l: can't find resource info for pid %d", pid); in getBiggestClient_l()
680 ALOGE("getBiggestClient_l: can't find resource type %s for pid %d", asString(type), pid); in getBiggestClient_l()