Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 369) sorted by relevance

12345678910>>...15

/frameworks/base/media/java/android/media/session/
DISessionCallback.aidl29 void onCommand(String packageName, int pid, int uid, ISessionControllerCallback caller, in onCommand() argument
31 void onMediaButton(String packageName, int pid, int uid, in Intent mediaButtonIntent, in onMediaButton() argument
33 void onMediaButtonFromController(String packageName, int pid, int uid, in onMediaButtonFromController() argument
37 void onPrepare(String packageName, int pid, int uid, ISessionControllerCallback caller); in onPrepare() argument
38 void onPrepareFromMediaId(String packageName, int pid, int uid, in onPrepareFromMediaId() argument
40 void onPrepareFromSearch(String packageName, int pid, int uid, in onPrepareFromSearch() argument
42 void onPrepareFromUri(String packageName, int pid, int uid, in onPrepareFromUri() argument
44 void onPlay(String packageName, int pid, int uid, ISessionControllerCallback caller); in onPlay() argument
45 void onPlayFromMediaId(String packageName, int pid, int uid, in onPlayFromMediaId() argument
47 void onPlayFromSearch(String packageName, int pid, int uid, in onPlayFromSearch() argument
[all …]
DMediaSession.java1157 private static RemoteUserInfo createRemoteUserInfo(String packageName, int pid, int uid) { in createRemoteUserInfo() argument
1158 return new RemoteUserInfo(packageName, pid, uid); in createRemoteUserInfo()
1162 public void onCommand(String packageName, int pid, int uid, in onCommand() argument
1166 session.dispatchCommand(createRemoteUserInfo(packageName, pid, uid), in onCommand()
1172 public void onMediaButton(String packageName, int pid, int uid, Intent mediaButtonIntent, in onMediaButton() argument
1177 session.dispatchMediaButton(createRemoteUserInfo(packageName, pid, uid), in onMediaButton()
1188 public void onMediaButtonFromController(String packageName, int pid, int uid, in onMediaButtonFromController() argument
1192 session.dispatchMediaButton(createRemoteUserInfo(packageName, pid, uid), in onMediaButtonFromController()
1198 public void onPrepare(String packageName, int pid, int uid, in onPrepare() argument
1202 session.dispatchPrepare(createRemoteUserInfo(packageName, pid, uid)); in onPrepare()
[all …]
/frameworks/av/services/oboeservice/
DAAudioClientTracker.cpp66 aaudio_result_t AAudioClientTracker::registerClient(pid_t pid, in registerClient() argument
68 ALOGV("registerClient(), calling pid = %d, getpid() = %d\n", pid, getpid()); in registerClient()
77 if (mNotificationClients.count(pid) == 0) { in registerClient()
79 sp<NotificationClient> notificationClient = new NotificationClient(pid, binder); in registerClient()
80 mNotificationClients[pid] = notificationClient; in registerClient()
86 ALOGW("registerClient(%d) already registered!", pid); in registerClient()
91 void AAudioClientTracker::unregisterClient(pid_t pid) { in unregisterClient() argument
92 ALOGV("unregisterClient(), calling pid = %d, getpid() = %d\n", pid, getpid()); in unregisterClient()
94 mNotificationClients.erase(pid); in unregisterClient()
97 int32_t AAudioClientTracker::getStreamCount(pid_t pid) { in getStreamCount() argument
[all …]
/frameworks/native/cmds/rss_hwm_reset/
Drss_hwm_reset.cc41 void reset_rss_hwm(const char* pid) { in reset_rss_hwm() argument
43 ::android::base::StringPrintf("/proc/%s/clear_refs", pid); in reset_rss_hwm()
60 const char* pid = entry->d_name; in main() local
61 while (*pid) { in main()
62 if (*pid < '0' || *pid > '9') break; in main()
63 pid++; in main()
65 if (*pid != 0) continue; in main()
67 pid = entry->d_name; in main()
68 reset_rss_hwm(pid); in main()
/frameworks/base/cmds/incidentd/tests/
DFdBuffer_test.cpp125 int pid = fork(); in TEST_F() local
126 ASSERT_TRUE(pid != -1); in TEST_F()
128 if (pid == 0) { in TEST_F()
142 kill(pid, SIGKILL); // reap the child process in TEST_F()
151 int pid = fork(); in TEST_F() local
152 ASSERT_TRUE(pid != -1); in TEST_F()
154 if (pid == 0) { in TEST_F()
172 wait(&pid); in TEST_F()
181 int pid = fork(); in TEST_F() local
182 ASSERT_TRUE(pid != -1); in TEST_F()
[all …]
/frameworks/native/services/vr/virtual_touchpad/
DVirtualTouchpadService.cpp29 pid_t pid; in attach() local
30 if (!CheckTouchPermission(&pid)) { in attach()
33 if (client_pid_ == pid) { in attach()
38 ALOGE("pid=%ld attached twice", static_cast<long>(pid)); in attach()
46 ALOGE("pid=%ld replaces %ld", static_cast<long>(pid), in attach()
48 client_pid_ = pid; in attach()
51 client_pid_ = pid; in attach()
104 const pid_t pid = ipc->getCallingPid(); in dump() local
107 !PermissionCache::checkPermission(kDumpPermission, pid, uid)) { in dump()
110 static_cast<long>(pid), static_cast<long>(uid)); in dump()
[all …]
/frameworks/native/cmds/lshal/libprocpartition/
Dprocpartition.cpp35 std::string getExe(pid_t pid) { in getExe() argument
38 if (!android::base::Readlink("/proc/" + std::to_string(pid) + "/exe", &exe)) { in getExe()
47 std::string getCmdline(pid_t pid) { in getCmdline() argument
49 if (!android::base::ReadFileToString("/proc/" + std::to_string(pid) + "/cmdline", &content, in getCmdline()
81 Partition getPartitionFromCmdline(pid_t pid) { in getPartitionFromCmdline() argument
82 const auto& cmdline = getCmdline(pid); in getPartitionFromCmdline()
92 Partition getPartitionFromExe(pid_t pid) { in getPartitionFromExe() argument
93 const auto& real = getExe(pid); in getPartitionFromExe()
101 Partition getPartition(pid_t pid) { in getPartition() argument
102 Partition partition = getPartitionFromExe(pid); in getPartition()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DMemoryStatUtil.java100 public static MemoryStat readMemoryStatFromFilesystem(int uid, int pid) { in readMemoryStatFromFilesystem() argument
101 return hasMemcg() ? readMemoryStatFromMemcg(uid, pid) : readMemoryStatFromProcfs(pid); in readMemoryStatFromFilesystem()
110 static MemoryStat readMemoryStatFromMemcg(int uid, int pid) { in readMemoryStatFromMemcg() argument
111 final String statPath = String.format(Locale.US, MEMORY_STAT_FILE_FMT, uid, pid); in readMemoryStatFromMemcg()
121 public static MemoryStat readMemoryStatFromProcfs(int pid) { in readMemoryStatFromProcfs() argument
122 final String statPath = String.format(Locale.US, PROC_STAT_FILE_FMT, pid); in readMemoryStatFromProcfs()
123 final String statusPath = String.format(Locale.US, PROC_STATUS_FILE_FMT, pid); in readMemoryStatFromProcfs()
131 public static long readRssHighWaterMarkFromProcfs(int pid) { in readRssHighWaterMarkFromProcfs() argument
132 final String statusPath = String.format(Locale.US, PROC_STATUS_FILE_FMT, pid); in readRssHighWaterMarkFromProcfs()
142 public static String readCmdlineFromProcfs(int pid) { in readCmdlineFromProcfs() argument
[all …]
/frameworks/av/media/utils/
DServiceUtilities.cpp62 static bool checkRecordingInternal(const String16& opPackageName, pid_t pid, in checkRecordingInternal() argument
75 const bool ok = permissionController.checkPermission(sAndroidPermissionRecordAudio, pid, uid); in checkRecordingInternal()
105 bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid) { in recordingAllowed() argument
106 return checkRecordingInternal(opPackageName, pid, uid, /*start*/ false); in recordingAllowed()
109 bool startRecording(const String16& opPackageName, pid_t pid, uid_t uid) { in startRecording() argument
110 return checkRecordingInternal(opPackageName, pid, uid, /*start*/ true); in startRecording()
130 bool captureAudioOutputAllowed(pid_t pid, uid_t uid) { in captureAudioOutputAllowed() argument
133 bool ok = PermissionCache::checkPermission(sCaptureAudioOutput, pid, uid); in captureAudioOutputAllowed()
138 bool captureMediaOutputAllowed(pid_t pid, uid_t uid) { in captureMediaOutputAllowed() argument
141 bool ok = PermissionCache::checkPermission(sCaptureMediaOutput, pid, uid); in captureMediaOutputAllowed()
[all …]
DProcessInfo.cpp32 bool ProcessInfo::getPriority(int pid, int* priority) { in getPriority() argument
41 status_t err = service->getProcessStatesAndOomScoresFromPids(length, &pid, &state, &score); in getPriority()
46 ALOGV("pid %d state %d score %d", pid, state, score); in getPriority()
48 ALOGE("pid %d invalid OOM adjustments value %d", pid, score); in getPriority()
57 bool ProcessInfo::isValidPid(int pid) { in isValidPid() argument
61 return (callingPid == getpid()) || (callingPid == pid) || (callingUid == AID_MEDIA); in isValidPid()
/frameworks/av/services/mediaresourcemanager/
DResourceManagerService.cpp44 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
[all …]
/frameworks/base/core/java/android/os/
DProcess.java755 public static final int getUidForPid(int pid) { in getUidForPid() argument
759 Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues); in getUidForPid()
770 public static final int getParentPid(int pid) { in getParentPid() argument
774 Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues); in getParentPid()
875 public static final native void setProcessGroup(int pid, int group) in setProcessGroup() argument
883 public static final native int getProcessGroup(int pid) in getProcessGroup() argument
1006 public static final native boolean setSwappiness(int pid, boolean is_increased); in setSwappiness() argument
1030 public static final void killProcess(int pid) { in killProcess() argument
1031 sendSignal(pid, SIGNAL_KILL); in killProcess()
1046 public static final native void sendSignal(int pid, int signal); in sendSignal() argument
[all …]
/frameworks/base/services/core/java/com/android/server/os/
DSchedulingPolicyService.java83 public int requestPriority(int pid, int tid, int prio, boolean isForApp) { in requestPriority() argument
93 prio > PRIORITY_MAX || Process.getThreadGroupLeader(tid) != pid) { in requestPriority()
140 private int enableCpusetBoost(int pid, IBinder client) { in enableCpusetBoost() argument
141 if (mBoostedPid == pid) { in enableCpusetBoost()
161 Log.i(TAG, "Moving " + pid + " to group " + Process.THREAD_GROUP_TOP_APP); in enableCpusetBoost()
162 Process.setProcessGroup(pid, Process.THREAD_GROUP_TOP_APP); in enableCpusetBoost()
164 mBoostedPid = pid; in enableCpusetBoost()
179 private int disableCpusetBoost(int pid) { in disableCpusetBoost() argument
195 if (boostedPid == pid) { in disableCpusetBoost()
197 Log.i(TAG, "Moving " + pid + " back to group default"); in disableCpusetBoost()
[all …]
/frameworks/base/cmds/incidentd/src/
Dincidentd_util.cpp69 pid_t pid = fork(); in fork_execute_cmd() local
70 if (pid == 0) { in fork_execute_cmd()
89 return pid; in fork_execute_cmd()
137 status_t kill_child(pid_t pid) { in kill_child() argument
139 VLOG("try to kill child process %d", pid); in kill_child()
140 kill(pid, SIGKILL); in kill_child()
141 if (waitpid(pid, &status, 0) == -1) return -1; in kill_child()
145 status_t wait_child(pid_t pid) { in wait_child() argument
150 if (waitpid(pid, &status, WNOHANG) == pid) died = true; in wait_child()
154 if (!died) return kill_child(pid); in wait_child()
/frameworks/ml/nn/tools/systrace_parser/
Dparse_systrace.py31 for pid in tracked_pids:
32 tgid = tracked_pids[pid]
33 tracker_map[pid] = Tracker(pid, driver_tgids.get(tgid, False), app_phase)
42 for [task, pid, tgid, time, mark, line, lineno] in parsed:
44 assert tracker_map.get(pid), "Cannot find PID %s in tracker_map" % pid
45 if tracker_map.get(pid):
59 tracker_map[pid].handle_mark(time, mark)
/frameworks/native/cmds/dumpstate/
DDumpstateUtil.cpp46 static bool waitpid_with_timeout(pid_t pid, int timeout_ms, int* status) { in waitpid_with_timeout() argument
79 pid_t child_pid = waitpid(pid, status, WNOHANG); in waitpid_with_timeout()
80 if (child_pid != pid) { in waitpid_with_timeout()
82 printf("*** Waiting for pid %d, got pid %d instead\n", pid, child_pid); in waitpid_with_timeout()
288 pid_t pid = fork(); in RunCommandToFd() local
291 if (pid < 0) { in RunCommandToFd()
294 return pid; in RunCommandToFd()
298 if (pid == 0) { in RunCommandToFd()
337 bool ret = waitpid_with_timeout(pid, options.TimeoutInMs(), &status); in RunCommandToFd()
345 static_cast<float>(elapsed) / NANOS_PER_SEC, pid); in RunCommandToFd()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DWindowProcessControllerMap.java33 WindowProcessController getProcess(int pid) { in getProcess() argument
34 return mPidMap.get(pid); in getProcess()
46 void put(int pid, WindowProcessController proc) { in put() argument
49 final WindowProcessController prevProc = mPidMap.get(pid); in put()
54 mPidMap.put(pid, proc); in put()
63 void remove(int pid) { in remove() argument
64 final WindowProcessController proc = mPidMap.get(pid); in remove()
67 mPidMap.remove(pid); in remove()
/frameworks/ml/nn/tools/systrace_parser/parser/
Dinput.py68 [task, pid, tgid, time, mark] = m.groups()
70 [task, pid, time, mark] = m_old.groups()
74 tgid = pid_to_tgid[pid]
75 assert pid
76 pid_to_tgid[pid] = tgid
81 parsed.append( [task, pid, tgid, time, mark, line, lineno] )
83 tracked_pids[pid] = tgid
87 tracked_pids[pid] = tgid
/frameworks/av/media/utils/fuzzers/
DServiceUtilitiesFuzz.cpp46 pid_t pid = data_provider.ConsumeIntegral<pid_t>(); in LLVMFuzzerTestOneInput() local
56 android::recordingAllowed(opPackageName, pid, uid); in LLVMFuzzerTestOneInput()
57 android::startRecording(opPackageName, pid, uid); in LLVMFuzzerTestOneInput()
59 android::captureAudioOutputAllowed(pid, uid); in LLVMFuzzerTestOneInput()
60 android::captureMediaOutputAllowed(pid, uid); in LLVMFuzzerTestOneInput()
61 android::captureHotwordAllowed(opPackageName, pid, uid); in LLVMFuzzerTestOneInput()
62 android::modifyPhoneStateAllowed(uid, pid); in LLVMFuzzerTestOneInput()
63 android::bypassInterruptionPolicyAllowed(uid, pid); in LLVMFuzzerTestOneInput()
/frameworks/av/media/utils/include/mediautils/
DServiceUtilities.h79 bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid);
80 bool startRecording(const String16& opPackageName, pid_t pid, uid_t uid);
82 bool captureAudioOutputAllowed(pid_t pid, uid_t uid);
83 bool captureMediaOutputAllowed(pid_t pid, uid_t uid);
84 bool captureHotwordAllowed(const String16& opPackageName, pid_t pid, uid_t uid);
88 bool modifyDefaultAudioEffectsAllowed(pid_t pid, uid_t uid);
90 bool modifyPhoneStateAllowed(pid_t pid, uid_t uid);
91 bool bypassInterruptionPolicyAllowed(pid_t pid, uid_t uid);
/frameworks/base/core/java/android/net/
DCredentials.java25 private final int pid; field in Credentials
31 public Credentials (int pid, int uid, int gid) { in Credentials() argument
32 this.pid = pid; in Credentials()
38 return pid; in getPid()
/frameworks/av/media/libmedia/
DIResourceManagerService.cpp75 int pid, in addResource() argument
82 data.writeInt32(pid); in addResource()
91 virtual void removeResource(int pid, int64_t clientId, const Vector<MediaResource> &resources) { in removeResource() argument
94 data.writeInt32(pid); in removeResource()
101 virtual void removeClient(int pid, int64_t clientId) { in removeClient() argument
104 data.writeInt32(pid); in removeClient()
144 int pid = data.readInt32(); in onTransact() local
154 addResource(pid, uid, clientId, client, resources); in onTransact()
160 int pid = data.readInt32(); in onTransact() local
164 removeResource(pid, clientId, resources); in onTransact()
[all …]
/frameworks/base/services/core/java/com/android/server/media/
DMediaSessionRecord.java267 public void adjustVolume(String packageName, String opPackageName, int pid, int uid, in adjustVolume() argument
277 postAdjustLocalVolume(stream, direction, flags, opPackageName, pid, uid, in adjustVolume()
294 mSessionCb.adjustVolume(packageName, pid, uid, caller, asSystemService, direction); in adjustVolume()
313 private void setVolumeTo(String packageName, String opPackageName, int pid, int uid, in setVolumeTo() argument
336 mSessionCb.setVolumeTo(packageName, pid, uid, caller, value); in setVolumeTo()
483 public boolean sendMediaButton(String packageName, int pid, int uid, boolean asSystemService, in sendMediaButton() argument
485 return mSessionCb.sendMediaButton(packageName, pid, uid, asSystemService, ke, sequenceId, in sendMediaButton()
841 int pid = Binder.getCallingPid(); in setFlags() local
843 mService.enforcePhoneStatePermission(pid, uid); in setFlags()
994 public boolean sendMediaButton(String packageName, int pid, int uid, in sendMediaButton() argument
[all …]
/frameworks/base/core/java/android/app/
DProcessMemoryState.java28 public final int pid; field in ProcessMemoryState
32 public ProcessMemoryState(int uid, int pid, String processName, int oomScore) { in ProcessMemoryState() argument
34 this.pid = pid; in ProcessMemoryState()
41 pid = in.readInt(); in ProcessMemoryState()
66 parcel.writeInt(pid); in writeToParcel()
/frameworks/native/cmds/installd/
Dotapreopt_utils.cpp50 pid_t pid = fork(); in Exec() local
51 if (pid == 0) { in Exec()
63 if (pid == -1) { in Exec()
71 pid_t got_pid = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0)); in Exec()
72 if (got_pid != pid) { in Exec()
75 command_line.c_str(), pid, got_pid, strerror(errno)); in Exec()

12345678910>>...15