/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | PermissionUtils.java | 63 public static boolean checkPermissionSelf(@NonNull Context context, int pid, int uid) { in checkPermissionSelf() argument 67 public static boolean checkPermissionShell(@NonNull Context context, int pid, int uid) { in checkPermissionShell() argument 81 public static boolean checkPermissionManager(@NonNull Context context, int pid, in checkPermissionManager() argument 83 return checkPermissionForDataDelivery(context, MANAGE_EXTERNAL_STORAGE, pid, uid, in checkPermissionManager() 100 public static boolean checkPermissionDelegator(@NonNull Context context, int pid, int uid) { in checkPermissionDelegator() argument 101 return (context.checkPermission(BACKUP, pid, uid) == PERMISSION_GRANTED) in checkPermissionDelegator() 102 || (context.checkPermission(UPDATE_DEVICE_STATS, pid, uid) == PERMISSION_GRANTED); in checkPermissionDelegator() 105 public static boolean checkPermissionWriteStorage(@NonNull Context context, int pid, int uid, in checkPermissionWriteStorage() argument 107 return checkPermissionForDataDelivery(context, WRITE_EXTERNAL_STORAGE, pid, uid, in checkPermissionWriteStorage() 112 public static boolean checkPermissionReadStorage(@NonNull Context context, int pid, int uid, in checkPermissionReadStorage() argument [all …]
|
/packages/services/Car/tests/obd2_test/src/com/android/car/obd2/test/ |
D | Obd2CommandTest.java | 49 void checkLiveFrameIntCommand(int pid, String responseBytes, int expectedResponse) { in checkLiveFrameIntCommand() argument 50 String[] commandToSend = new String[] {String.format("01%02X\r", pid)}; in checkLiveFrameIntCommand() 53 new String[] {String.format("41 %02X %s", pid, responseBytes), OBD2_PROMPT}; in checkLiveFrameIntCommand() 65 Obd2Command.getLiveFrameCommand(Obd2Command.getIntegerCommand(pid)); in checkLiveFrameIntCommand() 71 assertTrue("live frame command " + pid + " caused an exception: " + e, false); in checkLiveFrameIntCommand() 77 void checkLiveFrameFloatCommand(int pid, String responseBytes, float expectedResponse) { in checkLiveFrameFloatCommand() argument 78 String[] commandToSend = new String[] {String.format("01%02X\r", pid)}; in checkLiveFrameFloatCommand() 81 new String[] {String.format("41 %02X %s", pid, responseBytes), OBD2_PROMPT}; in checkLiveFrameFloatCommand() 93 Obd2Command.getLiveFrameCommand(Obd2Command.getFloatCommand(pid)); in checkLiveFrameFloatCommand() 99 assertTrue("live frame command " + pid + " caused an exception: " + e, false); in checkLiveFrameFloatCommand() [all …]
|
/packages/services/Car/service/src/com/android/car/cluster/ |
D | ClusterNavigationService.java | 131 public void onFocusAcquired(int appType, int uid, int pid) { in onFocusAcquired() argument 132 changeNavContextOwner(appType, uid, pid, true); in onFocusAcquired() 136 public void onFocusAbandoned(int appType, int uid, int pid) { in onFocusAbandoned() argument 137 changeNavContextOwner(appType, uid, pid, false); in onFocusAbandoned() 142 int pid = Binder.getCallingPid(); in assertNavigationFocus() local 144 if (uid == mNavContextOwner.uid && pid == mNavContextOwner.pid) { in assertNavigationFocus() 150 if (afs != null && afs.isFocusOwner(uid, pid, in assertNavigationFocus() 157 private void changeNavContextOwner(int appType, int uid, int pid, boolean acquire) { in changeNavContextOwner() argument 161 ContextOwner requester = new ContextOwner(uid, pid); in changeNavContextOwner() 185 final int pid; field in ClusterNavigationService.ContextOwner [all …]
|
/packages/services/Car/procfs-inspector/client/src/com/android/car/procfsinspector/ |
D | ProcessInfo.java | 34 public final int pid; field in ProcessInfo 37 public ProcessInfo(int pid, int uid) { in ProcessInfo() argument 38 this.pid = pid; in ProcessInfo() 43 this.pid = in.readInt(); in ProcessInfo() 54 dest.writeInt(pid); in writeToParcel() 62 return processInfo.pid == pid && processInfo.uid == uid; in equals() 70 return Objects.hash(pid, uid); in hashCode() 75 return String.format("pid = %d, uid = %d", pid, uid); in toString()
|
/packages/services/Car/cpp/watchdog/server/src/ |
D | ProcPidStat.cpp | 90 if (fields.size() < 22 + commEndOffset || !ParseInt(fields[0], &pidStat->pid) || in parsePidStatLine() 243 pid_t pid = 0; in getProcessStatsLocked() local 244 if (pidDir->d_type != DT_DIR || !ParseInt(pidDir->d_name, &pid)) { in getProcessStatsLocked() 248 std::string path = StringPrintf((mPath + kStatFileFormat).c_str(), pid); in getProcessStatsLocked() 263 path = StringPrintf((mPath + kStatusFileFormat).c_str(), curStats.process.pid); in getProcessStatsLocked() 267 return Error() << "Failed to read pid status for pid " << curStats.process.pid in getProcessStatsLocked() 270 ALOGW("Failed to read pid status for pid %" PRIu32 ": %s", curStats.process.pid, in getProcessStatsLocked() 276 const auto& it = mLatestProcessStats.find(curStats.process.pid); in getProcessStatsLocked() 284 if (curStats.tgid != -1 && curStats.tgid != curStats.process.pid) { in getProcessStatsLocked() 286 curStats.process.pid); in getProcessStatsLocked() [all …]
|
D | WatchdogProcessService.cpp | 113 int pid = pids[i]; in pidArrayToString() local 114 StringAppendF(&buffer, ", %d", pid); in pidArrayToString() 259 int32_t pid) { in tellDumpFinished() argument 268 ALOGI("Process(pid: %d) has been dumped and killed", pid); in tellDumpFinished() 375 ALOGW("Sending a ping message to client(pid: %d) failed: %s", clientInfo.pid, in doHealthCheck() 534 pid_t pid = -1; in dumpAndKillClientsIfNotResponding() local 541 pid = cachedClientsIt->pid; in dumpAndKillClientsIfNotResponding() 545 if (pid != -1 && mStoppedUserIds.count(userId) == 0) { in dumpAndKillClientsIfNotResponding() 547 processIds.push_back(pid); in dumpAndKillClientsIfNotResponding() 605 ALOGW("Client(pid: %d) died", it->pid); in handleBinderDeath() [all …]
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/ |
D | PermissionUtilsTest.java | 108 final int pid = android.os.Process.myPid(); in testSelfPermissions() local 112 assertThat(checkPermissionSelf(context, pid, uid)).isTrue(); in testSelfPermissions() 113 assertThat(checkPermissionShell(context, pid, uid)).isFalse(); in testSelfPermissions() 114 assertThat(checkPermissionManager(context, pid, uid, packageName, null)).isFalse(); in testSelfPermissions() 115 assertThat(checkPermissionDelegator(context, pid, uid)).isFalse(); in testSelfPermissions() 116 assertThat(checkPermissionManageMedia(context, pid, uid, packageName, null)).isFalse(); in testSelfPermissions() 117 assertThat(checkPermissionAccessMediaLocation(context, pid, uid, in testSelfPermissions() 120 assertThat(checkPermissionReadStorage(context, pid, uid, packageName, null)).isTrue(); in testSelfPermissions() 121 assertThat(checkPermissionWriteStorage(context, pid, uid, packageName, null)).isTrue(); in testSelfPermissions() 123 assertThat(checkPermissionReadAudio(context, pid, uid, packageName, null)).isTrue(); in testSelfPermissions() [all …]
|
/packages/services/Car/cpp/watchdog/server/tests/ |
D | ProcPidDir.cpp | 59 uint32_t pid = it.first; in populateProcPidDir() local 60 if (processStat.find(pid) != processStat.end()) { in populateProcPidDir() 61 std::string path = StringPrintf((procDirPath + kStatFileFormat).c_str(), pid); in populateProcPidDir() 62 if (!WriteStringToFile(processStat.at(pid), path)) { in populateProcPidDir() 68 if (processStatus.find(pid) != processStatus.end()) { in populateProcPidDir() 69 std::string path = StringPrintf((procDirPath + kStatusFileFormat).c_str(), pid); in populateProcPidDir() 70 if (!WriteStringToFile(processStatus.at(pid), path)) { in populateProcPidDir() 76 const auto& taskDirRes = makeDir(StringPrintf((procDirPath + kTaskDirFormat).c_str(), pid)); in populateProcPidDir() 84 StringPrintf((procDirPath + kTaskDirFormat + "/%" PRIu32).c_str(), pid, tid)); in populateProcPidDir() 90 StringPrintf((procDirPath + kTaskDirFormat + kStatFileFormat).c_str(), pid, in populateProcPidDir()
|
D | ProcPidStatTest.cpp | 43 stat.pid, stat.ppid, stat.comm.c_str(), stat.state.c_str(), in toString() 72 return lhs.pid == rhs.pid && lhs.comm == rhs.comm && lhs.state == rhs.state && in isEqual() 82 return l.process.pid < r.process.pid; in isEqual() 85 return l.process.pid < r.process.pid; in isEqual() 108 std::string pidStatusStr(pid_t pid, uid_t uid) { in pidStatusStr() argument 109 return StringPrintf("Pid:\t%" PRIu32 "\nTgid:\t%" PRIu32 "\nUid:\t%" PRIu32 "\n", pid, pid, in pidStatusStr() 113 std::string pidStatusStr(pid_t pid, uid_t uid, uint64_t vmPeakKb, uint64_t vmSizeKb, in pidStatusStr() argument 117 pidStatusStr(pid, uid).c_str(), vmPeakKb, vmSizeKb, vmHwmKb, vmRssKb); in pidStatusStr()
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | LocalCallingIdentity.java | 71 public final int pid; field in LocalCallingIdentity 80 private LocalCallingIdentity(Context context, int pid, int uid, UserHandle user, in LocalCallingIdentity() argument 83 this.pid = pid; in LocalCallingIdentity() 318 return checkPermissionSelf(context, pid, uid); in hasPermissionInternal() 320 return checkPermissionShell(context, pid, uid); in hasPermissionInternal() 322 return checkPermissionManager(context, pid, uid, getPackageName(), attributionTag); in hasPermissionInternal() 324 return checkPermissionDelegator(context, pid, uid); in hasPermissionInternal() 337 context, pid, uid, getPackageName(), attributionTag); in hasPermissionInternal() 341 context, pid, uid, getPackageName(), attributionTag); in hasPermissionInternal() 344 context, pid, uid, getPackageName(), attributionTag); in hasPermissionInternal() [all …]
|
/packages/services/Car/cpp/bugreport/ |
D | main.cpp | 279 bool waitpid_with_timeout(pid_t pid, int timeout_secs, int* status) { in waitpid_with_timeout() argument 310 pid_t child_pid = waitpid(pid, status, WNOHANG); in waitpid_with_timeout() 311 if (child_pid != pid) { in waitpid_with_timeout() 313 ALOGE("*** Waiting for pid %d, got pid %d instead\n", pid, child_pid); in waitpid_with_timeout() 324 pid_t pid = fork(); in runCommand() local 327 if (pid < 0) { in runCommand() 329 return pid; in runCommand() 333 if (pid == 0) { in runCommand() 352 bool ret = waitpid_with_timeout(pid, timeout_secs, &status); in runCommand() 356 ALOGE("command %s timed out (killing pid %d)", file, pid); in runCommand() [all …]
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/ts/ |
D | TsParser.java | 85 void onEitPidDetected(int pid); in onEitPidDetected() argument 91 void onEttPidDetected(int pid); in onEttPidDetected() argument 122 public SectionStream(int pid) { in SectionStream() argument 123 mPid = pid; in SectionStream() 341 public final int pid; field in TsParser.EventSourceEntry 344 public EventSourceEntry(int pid, int sourceId) { in EventSourceEntry() argument 345 this.pid = pid; in EventSourceEntry() 352 result = 31 * result + pid; in hashCode() 361 return pid == another.pid && sourceId == another.sourceId; in equals() 407 for (int pid : mEITPids) { in handleEvents() [all …]
|
/packages/modules/NeuralNetworks/tools/systrace_parser/ |
D | parse_systrace.py | 31 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)
|
/packages/services/Car/service/src/com/android/car/ |
D | SystemActivityMonitoringService.java | 205 public boolean isInForeground(int pid, int uid) { in isInForeground() argument 211 if (pids.contains(pid)) { in isInForeground() 366 private void handleForegroundActivitiesChanged(int pid, int uid, boolean foregroundActivities) { in handleForegroundActivitiesChanged() argument 374 pids.add(pid); in handleForegroundActivitiesChanged() 376 doHandlePidGoneLocked(pid, uid); in handleForegroundActivitiesChanged() 381 private void handleProcessDied(int pid, int uid) { in handleProcessDied() argument 383 doHandlePidGoneLocked(pid, uid); in handleProcessDied() 387 private void doHandlePidGoneLocked(int pid, int uid) { in doHandlePidGoneLocked() argument 390 pids.remove(pid); in doHandlePidGoneLocked() 443 public void onForegroundActivitiesChanged(int pid, int uid, boolean foregroundActivities) { in onForegroundActivitiesChanged() argument [all …]
|
/packages/modules/NeuralNetworks/tools/systrace_parser/parser/ |
D | input.py | 68 [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
|
D | aggregate.py | 41 for pid in tracker_map: 42 execution_count = max(execution_count, tracker_map[pid].get_execution_count(app_phase)) 75 for pid in tracker_map: 76 begins = begins + tracker_map[pid].get_ld_pe_begins(app_phase) 77 ends = ends + tracker_map[pid].get_ld_pe_ends(app_phase) 84 for pid in tracker_map: 85 t0 += tracker_map[pid].get_stat(tag, app_phase, special_case_lr_pe)
|
/packages/services/Car/service/src/com/android/car/watchdog/ |
D | WatchdogProcessHandler.java | 113 clientInfo.pid); in dump() 144 + "registered", clientInfo.pid); in registerClient() 148 int pid = Binder.getCallingPid(); in registerClient() local 150 ClientInfo clientInfo = new ClientInfo(client, pid, userId, timeout); in registerClient() 160 Slogf.d(CarWatchdogService.TAG, "Client(pid: %d) is registered", pid); in registerClient() 180 clientInfo.pid); in unregisterClient() 300 "Sending a ping message to client(pid: %d) failed: %s", clientInfo.pid, e); in sendPingToClients() 352 clientInfo.pid, e); in reportHealthCheckResult() 370 intArray[i] = list.get(i).pid; in toIntArray() 405 public final int pid; field in WatchdogProcessHandler.ClientInfo [all …]
|
/packages/apps/Nfc/src/com/android/nfc/ |
D | ForegroundUtils.java | 147 public void onForegroundActivitiesChanged(int pid, int uid, in onForegroundActivitiesChanged() argument 154 foregroundPids.put(pid, true); in onForegroundActivitiesChanged() 156 foregroundPids.delete(pid); in onForegroundActivitiesChanged() 169 if (DBG) Log.d(TAG, "Foreground changed, PID: " + Integer.toString(pid) + " UID: " + in onForegroundActivitiesChanged() 189 public void onForegroundServicesChanged(int pid, int uid, int fgServiceTypes) { in onForegroundServicesChanged() argument 193 public void onProcessDied(int pid, int uid) throws RemoteException { in onProcessDied() argument 195 Integer.toString(pid)); in onProcessDied() 196 onForegroundActivitiesChanged(pid, uid, false); in onProcessDied()
|
/packages/modules/adb/daemon/ |
D | jdwp_service.cpp | 153 CHECK(process.pid != 0); in JdwpProcess() 196 std::string next = std::to_string(proc->process.pid) + "\n"; in jdwp_process_list() 218 entry->set_pid(proc->process.pid); in app_process_list() 265 D("terminating JDWP connection %" PRId64, proc->process.pid); in jdwp_process_event() 275 D("sending new file descriptor to JDWP %" PRId64 " failed: %s", proc->process.pid, in jdwp_process_event() 280 D("sent file descriptor %d to JDWP process %" PRId64, fd, proc->process.pid); in jdwp_process_event() 298 unique_fd create_jdwp_connection_fd(int pid) { in create_jdwp_connection_fd() argument 299 D("looking for pid %d in JDWP process list", pid); in create_jdwp_connection_fd() 304 if (proc->process.pid == static_cast<uint64_t>(pid)) { in create_jdwp_connection_fd() 497 LOG(INFO) << "jdwp connection from " << process.pid; in init_jdwp() [all …]
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | BinderUtilTest.java | 60 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()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/aware/ |
D | WifiAwareStateManagerTest.java | 369 final int pid = 2000; in testAwareDataPathInterfaceUpDown() local 386 mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback, in testAwareDataPathInterfaceUpDown() 414 final int pid = 2000; in testDisableUsageDisablesApis() local 440 mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback, in testDisableUsageDisablesApis() 457 final int pid = 2000; in testDisableUsageFlow() local 477 mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback, in testDisableUsageFlow() 504 mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback, in testDisableUsageFlow() 523 mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback, in testDisableUsageFlow() 545 final int pid = 2000; in testHalFailureEnableAndConfigure() local 563 mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback, in testHalFailureEnableAndConfigure() [all …]
|
/packages/modules/adb/libs/adbconnection/ |
D | adbconnection_client.cpp | 64 std::optional<uint64_t> pid; in adbconnection_client_new() local 72 case AdbConnectionClientInfoType::pid: in adbconnection_client_new() 73 if (pid) { in adbconnection_client_new() 77 pid = info->data.pid; in adbconnection_client_new() 106 if (!pid) { in adbconnection_client_new() 170 ProcessInfo process(*pid, *debuggable, *profileable, *architecture); in adbconnection_client_new()
|
/packages/modules/adb/libs/adbconnection/include/adbconnection/ |
D | process_info.h | 26 uint64_t pid; member 32 ProcessInfo() : pid(0), debuggable(false), profileable(false), arch_name_length(0) {} in ProcessInfo() 34 ProcessInfo(uint64_t pid, bool dbg, bool prof, const std::string& arch) in ProcessInfo() 35 : pid(pid), debuggable(dbg), profileable(prof) { in ProcessInfo()
|
/packages/modules/DnsResolver/ |
D | resolv_private.h | 94 pid(netcontext->pid), in ResState() 105 copy.pid = pid; 132 pid_t pid; // pid of the app that sent the DNS lookup member 201 inline void resolv_tag_socket(int sock, uid_t uid, pid_t pid) { in resolv_tag_socket() argument 204 if (int err = android::net::gResNetdCallbacks.tagSocket(sock, TAG_SYSTEM_DNS, uid, pid)) { in resolv_tag_socket()
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | MediaSource.java | 79 PathId pid = list.get(i); in mapMediaItems() local 82 obj = pid.path.getObject(); in mapMediaItems() 85 obj = createMediaObject(pid.path); in mapMediaItems() 87 Log.w(TAG, "cannot create media object: " + pid.path, th); in mapMediaItems() 92 consumer.consume(pid.id, (MediaItem) obj); in mapMediaItems()
|