Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 360) 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()
78 sp<NotificationClient> notificationClient = new NotificationClient(pid); in registerClient()
79 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/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/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/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/base/core/java/android/os/
DProcess.java692 public static final int getUidForPid(int pid) { in getUidForPid() argument
696 Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues); in getUidForPid()
707 public static final int getParentPid(int pid) { in getParentPid() argument
711 Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues); in getParentPid()
811 public static final native void setProcessGroup(int pid, int group) in setProcessGroup() argument
819 public static final native int getProcessGroup(int pid) in getProcessGroup() argument
942 public static final native boolean setSwappiness(int pid, boolean is_increased); in setSwappiness() argument
966 public static final void killProcess(int pid) { in killProcess() argument
967 sendSignal(pid, SIGNAL_KILL); in killProcess()
982 public static final native void sendSignal(int pid, int signal); in sendSignal() argument
[all …]
/frameworks/av/services/mediaresourcemanager/
DResourceManagerService.cpp42 DeathNotifier(const wp<ResourceManagerService> &service, int pid, int64_t clientId) in DeathNotifier() argument
43 : mService(service), mPid(pid), mClientId(clientId) {} in DeathNotifier()
91 int pid, in getResourceInfosForEdit() argument
93 ssize_t index = map.indexOfKey(pid); in getResourceInfosForEdit()
97 map.add(pid, infosForPid); in getResourceInfosForEdit()
100 return map.editValueFor(pid); in getResourceInfosForEdit()
120 static void notifyResourceGranted(int pid, const Vector<MediaResource> &resources) { in notifyResourceGranted() argument
127 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_AUDIO_CODEC); in notifyResourceGranted()
129 service->notifyResourceGranted(pid, IMediaResourceMonitor::TYPE_VIDEO_CODEC); in notifyResourceGranted()
228 int pid, in addResource() argument
[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/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/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/av/media/utils/
DServiceUtilities.cpp62 static bool checkRecordingInternal(const String16& opPackageName, pid_t pid, in checkRecordingInternal() argument
72 const bool ok = permissionController.checkPermission(sAndroidPermissionRecordAudio, pid, uid); in checkRecordingInternal()
102 bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid) { in recordingAllowed() argument
103 return checkRecordingInternal(opPackageName, pid, uid, /*start*/ false); in recordingAllowed()
106 bool startRecording(const String16& opPackageName, pid_t pid, uid_t uid) { in startRecording() argument
107 return checkRecordingInternal(opPackageName, pid, uid, /*start*/ true); in startRecording()
127 bool captureAudioOutputAllowed(pid_t pid, uid_t uid) { in captureAudioOutputAllowed() argument
130 bool ok = PermissionCache::checkPermission(sCaptureAudioOutput, pid, uid); in captureAudioOutputAllowed()
135 bool captureMediaOutputAllowed(pid_t pid, uid_t uid) { in captureMediaOutputAllowed() argument
138 bool ok = PermissionCache::checkPermission(sCaptureMediaOutput, pid, uid); in captureMediaOutputAllowed()
[all …]
DProcessInfo.cpp31 bool ProcessInfo::getPriority(int pid, int* priority) { in getPriority() argument
40 status_t err = service->getProcessStatesAndOomScoresFromPids(length, &pid, &state, &score); in getPriority()
45 ALOGV("pid %d state %d score %d", pid, state, score); in getPriority()
47 ALOGE("pid %d invalid OOM adjustments value %d", pid, score); in getPriority()
56 bool ProcessInfo::isValidPid(int pid) { in isValidPid() argument
59 return (callingPid == getpid()) || (callingPid == pid); in isValidPid()
/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/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/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)
45 if tracker_map.get(pid):
59 tracker_map[pid].handle_mark(time, mark)
/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/av/drm/libmediadrm/
DDrmSessionManager.cpp68 int pid, const sp<DrmSessionClientInterface>& drm, const Vector<uint8_t> &sessionId) { in addSession() argument
69 ALOGV("addSession(pid %d, drm %p, sessionId %s)", pid, drm.get(), in addSession()
77 ssize_t index = mSessionMap.indexOfKey(pid); in addSession()
82 mSessionMap.add(pid, infosForPid); in addSession()
181 int pid = -1; in getLowestPriority_l() local
194 if (pid == -1) { in getLowestPriority_l()
195 pid = tempPid; in getLowestPriority_l()
199 pid = tempPid; in getLowestPriority_l()
204 if (pid != -1) { in getLowestPriority_l()
205 *lowestPriorityPid = pid; in getLowestPriority_l()
[all …]
/frameworks/av/media/utils/include/mediautils/
DServiceUtilities.h73 bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid);
74 bool startRecording(const String16& opPackageName, pid_t pid, uid_t uid);
76 bool captureAudioOutputAllowed(pid_t pid, uid_t uid);
77 bool captureMediaOutputAllowed(pid_t pid, uid_t uid);
78 bool captureHotwordAllowed(const String16& opPackageName, pid_t pid, uid_t uid);
83 bool modifyPhoneStateAllowed(pid_t pid, uid_t uid);
84 bool bypassInterruptionPolicyAllowed(pid_t pid, uid_t uid);
/frameworks/base/telephony/java/com/android/internal/telephony/
DTelephonyPermissions.java135 Context context, int subId, int pid, int uid, String callingPackage, String message) { in checkReadPhoneState() argument
137 context, TELEPHONY_SUPPLIER, subId, pid, uid, callingPackage, message); in checkReadPhoneState()
155 Context context, Supplier<ITelephony> telephonySupplier, int subId, int pid, int uid, in checkReadPhoneState() argument
159 android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, pid, uid, message); in checkReadPhoneState()
166 android.Manifest.permission.READ_PHONE_STATE, pid, uid, message); in checkReadPhoneState()
200 Context context, int pid, int uid, String callingPackage, String message) { in checkReadPhoneStateOnAnyActiveSub() argument
201 return checkReadPhoneStateOnAnyActiveSub(context, TELEPHONY_SUPPLIER, pid, uid, in checkReadPhoneStateOnAnyActiveSub()
207 Context context, Supplier<ITelephony> telephonySupplier, int pid, int uid, in checkReadPhoneStateOnAnyActiveSub() argument
211 android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, pid, uid, message); in checkReadPhoneStateOnAnyActiveSub()
218 android.Manifest.permission.READ_PHONE_STATE, pid, uid, message); in checkReadPhoneStateOnAnyActiveSub()
[all …]
/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()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DBinderUtilTest.java60 final int pid = Binder.getCallingPid(); in setUid() local
66 assertEquals(pid, Binder.getCallingPid()); in setUid()
72 assertEquals(pid, Binder.getCallingPid()); in setUid()
82 final int pid = Binder.getCallingPid(); in setUidAndRestoreCallingIdentity() local
88 assertEquals(pid, Binder.getCallingPid()); in setUidAndRestoreCallingIdentity()
93 assertEquals(pid, Binder.getCallingPid()); in setUidAndRestoreCallingIdentity()

12345678910>>...15