Home
last modified time | relevance | path

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

12345678910>>...18

/frameworks/base/media/java/android/media/session/
DISessionCallback.aidl28 void onCommand(String packageName, int pid, int uid, String command, in Bundle args, in onCommand() argument
30 void onMediaButton(String packageName, int pid, int uid, in Intent mediaButtonIntent, in onMediaButton() argument
32 void onMediaButtonFromController(String packageName, int pid, int uid, in onMediaButtonFromController() argument
36 void onPrepare(String packageName, int pid, int uid); in onPrepare() argument
37 void onPrepareFromMediaId(String packageName, int pid, int uid, String mediaId, in onPrepareFromMediaId() argument
39 void onPrepareFromSearch(String packageName, int pid, int uid, String query, in Bundle extras); in onPrepareFromSearch() argument
40 void onPrepareFromUri(String packageName, int pid, int uid, in Uri uri, in Bundle extras); in onPrepareFromUri() argument
41 void onPlay(String packageName, int pid, int uid); in onPlay() argument
42 void onPlayFromMediaId(String packageName, int pid, int uid, String mediaId, in Bundle extras); in onPlayFromMediaId() argument
43 void onPlayFromSearch(String packageName, int pid, int uid, String query, in Bundle extras); in onPlayFromSearch() argument
[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 …]
DAAudioClientTracker.h49 aaudio_result_t registerClient(pid_t pid, const android::sp<android::IAAudioClient>& client);
51 void unregisterClient(pid_t pid);
53 int32_t getStreamCount(pid_t pid);
55 aaudio_result_t registerClientStream(pid_t pid,
58 aaudio_result_t unregisterClientStream(pid_t pid,
66 void setExclusiveEnabled(pid_t pid, bool enabled);
68 bool isExclusiveEnabled(pid_t pid);
85 NotificationClient(pid_t pid, const android::sp<IBinder>& binder);
117 android::sp<NotificationClient> getNotificationClient_l(pid_t pid);
/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/packages/SystemUI/src/com/android/systemui/statusbar/tv/micdisclosure/
DMicrophoneForegroundServicesObserver.java78 private void onProcessForegroundServicesChanged(int pid, boolean hasMicFgs) { in onProcessForegroundServicesChanged() argument
81 if (mPidToPackages.contains(pid)) { in onProcessForegroundServicesChanged()
85 changedPackages = getPackageNames(pid); in onProcessForegroundServicesChanged()
86 mPidToPackages.append(pid, changedPackages); in onProcessForegroundServicesChanged()
89 changedPackages = mPidToPackages.removeReturnOld(pid); in onProcessForegroundServicesChanged()
117 private void onProcessDied(int pid) { in onProcessDied() argument
118 final String[] packages = mPidToPackages.removeReturnOld(pid); in onProcessDied()
154 private String[] getPackageNames(int pid) { in getPackageNames() argument
159 Log.d(TAG, "Couldn't get package name for pid=" + pid); in getPackageNames()
166 if (app.pid == pid) { in getPackageNames()
[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/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/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/core/java/android/os/
DProcess.java814 public static final int getUidForPid(int pid) { in getUidForPid() argument
818 Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues); in getUidForPid()
829 public static final int getParentPid(int pid) { in getParentPid() argument
833 Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues); in getParentPid()
934 public static final native void setProcessGroup(int pid, int group) in setProcessGroup() argument
946 public static final native void setProcessFrozen(int pid, int uid, boolean frozen); in setProcessFrozen() argument
966 public static final native int getProcessGroup(int pid) in getProcessGroup() argument
1089 public static final native boolean setSwappiness(int pid, boolean is_increased); in setSwappiness() argument
1113 public static final void killProcess(int pid) { in killProcess() argument
1114 sendSignal(pid, SIGNAL_KILL); in killProcess()
[all …]
/frameworks/base/cmds/incidentd/src/
Dincidentd_util.cpp110 pid_t pid = vfork(); in fork_execute_cmd() local
111 if (pid < 0) { in fork_execute_cmd()
115 if (pid == 0) { in fork_execute_cmd()
134 kill_child(pid); in fork_execute_cmd()
137 return pid; in fork_execute_cmd()
182 static bool waitpid_with_timeout(pid_t pid, int timeout_ms, int* status) { in waitpid_with_timeout() argument
215 pid_t child_pid = waitpid(pid, status, WNOHANG); in waitpid_with_timeout()
216 if (child_pid == pid) { in waitpid_with_timeout()
222 ALOGW("Waiting for pid %d, got pid %d instead", pid, child_pid); in waitpid_with_timeout()
227 status_t kill_child(pid_t pid) { in kill_child() argument
[all …]
/frameworks/av/services/mediaresourcemanager/
DResourceManagerService.cpp44 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
[all …]
/frameworks/base/services/core/java/com/android/server/stats/pull/
DProcfsMemoryUtil.java41 public static MemorySnapshot readMemorySnapshotFromProcfs(int pid) { in readMemorySnapshotFromProcfs() argument
46 Process.readProcLines("/proc/" + pid + "/status", STATUS_KEYS, output); in readMemorySnapshotFromProcfs()
66 public static String readCmdlineFromProcfs(int pid) { in readCmdlineFromProcfs() argument
68 if (!Process.readProcFile("/proc/" + pid + "/cmdline", CMDLINE_OUT, cmdline, null, null)) { in readCmdlineFromProcfs()
82 for (int pid : pids) { in getProcessCmdlines()
83 if (pid < 0) { in getProcessCmdlines()
86 String cmdline = readCmdlineFromProcfs(pid); in getProcessCmdlines()
90 cmdlines.append(pid, cmdline); in getProcessCmdlines()
DIonMemoryUtil.java102 final int pid = Integer.parseInt(m.group(1)); in parseProcessIonHeapSizesFromDebugfs() local
104 IonAllocations allocations = entries.get(pid); in parseProcessIonHeapSizesFromDebugfs()
107 entries.put(pid, allocations); in parseProcessIonHeapSizesFromDebugfs()
109 allocations.pid = pid; in parseProcessIonHeapSizesFromDebugfs()
138 public int pid; field in IonMemoryUtil.IonAllocations
151 return pid == that.pid && totalSizeInBytes == that.totalSizeInBytes in equals()
157 return Objects.hash(pid, totalSizeInBytes, count, maxSizeInBytes); in hashCode()
163 + "pid=" + pid in toString()
/frameworks/base/services/core/java/com/android/server/os/
DSchedulingPolicyService.java82 public int requestPriority(int pid, int tid, int prio, boolean isForApp) { in requestPriority() argument
92 prio > PRIORITY_MAX || Process.getThreadGroupLeader(tid) != pid) { in requestPriority()
139 private int enableCpusetBoost(int pid, IBinder client) { in enableCpusetBoost() argument
140 if (mBoostedPid == pid) { in enableCpusetBoost()
160 Log.i(TAG, "Moving " + pid + " to group " + Process.THREAD_GROUP_TOP_APP); in enableCpusetBoost()
161 Process.setProcessGroup(pid, Process.THREAD_GROUP_TOP_APP); in enableCpusetBoost()
163 mBoostedPid = pid; in enableCpusetBoost()
178 private int disableCpusetBoost(int pid) { in disableCpusetBoost() argument
194 if (boostedPid == pid) { in disableCpusetBoost()
196 Log.i(TAG, "Moving " + pid + " back to group default"); in disableCpusetBoost()
[all …]
/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/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/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/include/mediautils/
DServiceUtilities.h81 bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid);
82 bool startRecording(const String16& opPackageName, pid_t pid, uid_t uid);
84 bool captureAudioOutputAllowed(pid_t pid, uid_t uid);
85 bool captureMediaOutputAllowed(pid_t pid, uid_t uid);
86 bool captureVoiceCommunicationOutputAllowed(pid_t pid, uid_t uid);
87 bool captureHotwordAllowed(const String16& opPackageName, pid_t pid, uid_t uid);
90 bool modifyAudioRoutingAllowed(pid_t pid, uid_t uid);
92 bool modifyDefaultAudioEffectsAllowed(pid_t pid, uid_t uid);
94 bool modifyPhoneStateAllowed(pid_t pid, uid_t uid);
95 bool bypassInterruptionPolicyAllowed(pid_t pid, uid_t uid);
/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/
DServiceUtilities.cpp64 static bool checkRecordingInternal(const String16& opPackageName, pid_t pid, in checkRecordingInternal() argument
77 const bool ok = permissionController.checkPermission(sAndroidPermissionRecordAudio, pid, uid); in checkRecordingInternal()
107 bool recordingAllowed(const String16& opPackageName, pid_t pid, uid_t uid) { in recordingAllowed() argument
108 return checkRecordingInternal(opPackageName, pid, uid, /*start*/ false); in recordingAllowed()
111 bool startRecording(const String16& opPackageName, pid_t pid, uid_t uid) { in startRecording() argument
112 return checkRecordingInternal(opPackageName, pid, uid, /*start*/ true); in startRecording()
132 bool captureAudioOutputAllowed(pid_t pid, uid_t uid) { in captureAudioOutputAllowed() argument
135 bool ok = PermissionCache::checkPermission(sCaptureAudioOutput, pid, uid); in captureAudioOutputAllowed()
140 bool captureMediaOutputAllowed(pid_t pid, uid_t uid) { in captureMediaOutputAllowed() argument
143 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/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/base/services/core/java/com/android/server/media/
DMediaSessionRecord.java276 public void adjustVolume(String packageName, String opPackageName, int pid, int uid, in adjustVolume() argument
285 postAdjustLocalVolume(stream, direction, flags, opPackageName, pid, uid, in adjustVolume()
302 mSessionCb.adjustVolume(packageName, pid, uid, asSystemService, direction); in adjustVolume()
321 private void setVolumeTo(String packageName, String opPackageName, int pid, int uid, int value, in setVolumeTo() argument
331 opPackageName, uid, pid); in setVolumeTo()
344 mSessionCb.setVolumeTo(packageName, pid, uid, value); in setVolumeTo()
445 public boolean sendMediaButton(String packageName, int pid, int uid, boolean asSystemService, in sendMediaButton() argument
447 return mSessionCb.sendMediaButton(packageName, pid, uid, asSystemService, ke, sequenceId, in sendMediaButton()
504 final int pid; in postAdjustLocalVolume() local
508 pid = Process.myPid(); in postAdjustLocalVolume()
[all …]
DMediaSessionService.java372 protected void enforcePhoneStatePermission(int pid, int uid) { in enforcePhoneStatePermission() argument
373 if (mContext.checkPermission(android.Manifest.permission.MODIFY_PHONE_STATE, pid, uid) in enforcePhoneStatePermission()
419 enforceMediaPermissions(listener.componentName, listener.pid, listener.uid, in updateActiveSessionListeners()
506 private void enforceMediaPermissions(ComponentName compName, int pid, int uid, in enforceMediaPermissions() argument
508 if (hasStatusBarServicePermission(pid, uid)) return; in enforceMediaPermissions()
510 .checkPermission(android.Manifest.permission.MEDIA_CONTENT_CONTROL, pid, uid) in enforceMediaPermissions()
518 private boolean hasStatusBarServicePermission(int pid, int uid) { in hasStatusBarServicePermission() argument
520 pid, uid) == PackageManager.PERMISSION_GRANTED; in hasStatusBarServicePermission()
523 private void enforceStatusBarServicePermission(String action, int pid, int uid) { in enforceStatusBarServicePermission() argument
524 if (!hasStatusBarServicePermission(pid, uid)) { in enforceStatusBarServicePermission()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DCachedAppOptimizer.java122 long[] getRss(int pid); in getRss() argument
123 void performCompaction(String action, int pid) throws IOException; in performCompaction() argument
337 int pid = entry.getKey(); in dump() local
339 pw.println(" " + pid + ": " in dump()
646 "Skipping unfreeze for process " + app.pid + " " in unfreezeAppLocked()
655 Process.setProcessFrozen(app.pid, app.uid, false); in unfreezeAppLocked()
660 Slog.e(TAG_AM, "Unable to unfreeze " + app.pid + " " + app.processName in unfreezeAppLocked()
666 Slog.d(TAG_AM, "sync unfroze " + app.pid + " " + app.processName); in unfreezeAppLocked()
671 app.pid, in unfreezeAppLocked()
701 int pid; in handleMessage() local
[all …]

12345678910>>...18