/packages/providers/MediaProvider/jni/ |
D | MediaProviderWrapper.h | 41 FileOpenResult(const int status, const int uid, const uid_t transforms_uid, const int fd, in FileOpenResult() 51 const uid_t transforms_uid; 61 FileLookupResult(int transforms, int transforms_reason, uid_t uid, bool transforms_complete, in FileLookupResult() 80 const uid_t uid; 105 const std::string& io_path, uid_t uid, 116 int InsertFile(const std::string& path, uid_t uid); 125 int DeleteFile(const std::string& path, uid_t uid); 140 std::vector<std::shared_ptr<DirectoryEntry>> GetDirectoryEntries(uid_t uid, 158 uid_t uid, pid_t tid, int transforms_reason, 169 int IsCreatingDirAllowed(const std::string& path, uid_t uid); [all …]
|
D | MediaProviderWrapper.cpp | 40 constexpr uid_t ROOT_UID = 0; 41 constexpr uid_t SHELL_UID = 2000; 53 inline bool shouldBypassMediaProvider(uid_t uid) { in shouldBypassMediaProvider() 80 const string& path, uid_t uid) { in insertFileInternal() 91 const string& path, uid_t uid) { in deleteFileInternal() 102 jmethodID mid_is_diraccess_allowed, const string& path, uid_t uid, in isDirAccessAllowedInternal() 115 jmethodID mid_is_uid_allowed_path_access_, uid_t uid, in isUidAllowedAccessToDataOrObbPathInternal() 128 JNIEnv* env, jobject media_provider_object, jmethodID mid_get_files_in_dir, uid_t uid, in getFilesInDirectoryInternal() 175 const string& old_path, const string& new_path, uid_t uid) { in renameInternal() 282 int MediaProviderWrapper::InsertFile(const string& path, uid_t uid) { in InsertFile() [all …]
|
/packages/services/Car/cpp/watchdog/server/tests/ |
D | UidStatsCollectorTest.cpp | 93 std::unordered_map<uid_t, PackageInfo> samplePackageInfoByUid() { in samplePackageInfoByUid() 98 std::unordered_map<uid_t, UidIoStats> sampleUidIoStatsByUid() { in sampleUidIoStatsByUid() 110 std::unordered_map<uid_t, UidProcStats> sampleUidProcStatsByUid() { in sampleUidProcStatsByUid() 126 std::unordered_map<uid_t, int64_t> sampleUidCpuStatsByUid() { in sampleUidCpuStatsByUid() 231 .WillOnce(Return(std::unordered_map<uid_t, UidIoStats>())); in TEST_F() 233 .WillOnce(Return(std::unordered_map<uid_t, UidProcStats>())); in TEST_F() 236 .WillOnce(Return(std::unordered_map<uid_t, UidIoStats>())); in TEST_F() 238 .WillOnce(Return(std::unordered_map<uid_t, UidProcStats>())); in TEST_F() 260 const std::unordered_map<uid_t, PackageInfo> packageInfoByUid = samplePackageInfoByUid(); in TEST_F() 261 const std::unordered_map<uid_t, UidIoStats> uidIoStatsByUid = sampleUidIoStatsByUid(); in TEST_F() [all …]
|
D | PackageInfoResolverTest.cpp | 59 std::string toString(const std::unordered_map<uid_t, PackageInfo>& mappings) { in toString() argument 91 void injectCacheMapping(const std::unordered_map<uid_t, PackageInfo>& mapping) { in injectCacheMapping() argument 101 void stubGetpwuid(const std::unordered_map<uid_t, std::string>& nativeUidToPackageNameMapping) { in stubGetpwuid() argument 103 PackageInfoResolver::sGetpwuidHandler = [&](uid_t uid) -> struct passwd* { in stubGetpwuid() 114 const std::unordered_map<uid_t, std::string>& mapping) { in updateNativeUidToPackageNameMapping() argument 141 std::unordered_map<uid_t, struct passwd> mNativeUidToPackageNameMapping; 176 std::unordered_map<uid_t, PackageInfo> expectedMappings{ in TEST_F() 219 std::unordered_map<uid_t, PackageInfo> expectedMappings{ in TEST_F() 274 std::unordered_map<uid_t, PackageInfo> expectedMappings{ in TEST_F() 297 std::unordered_map<uid_t, PackageInfo> expectedMappings{ in TEST_F() [all …]
|
D | MockPackageInfoResolver.h | 39 (const std::vector<uid_t>&, 40 const std::function<void(std::unordered_map<uid_t, std::string>)>&), 43 (std::unordered_map<uid_t, aidl::android::automotive::watchdog::internal::PackageInfo>), 44 getPackageInfosForUids, (const std::vector<uid_t>& uids), (override));
|
D | UidIoStatsCollectorTest.cpp | 35 std::string toString(std::unordered_map<uid_t, UidIoStats> uidIoStatsByUid) { in toString() argument 52 std::unordered_map<uid_t, UidIoStats> expectedFirstUsage = in TEST() 85 std::unordered_map<uid_t, UidIoStats> expectedSecondUsage = in TEST()
|
D | UidCpuStatsCollectorTest.cpp | 37 std::string toString(const std::unordered_map<uid_t, int64_t>& cpuTimeMillisByUid) { in toString() argument 53 std::unordered_map<uid_t, int64_t> expectedFirstUsage = {{0, 12'000}, in TEST() 77 std::unordered_map<uid_t, int64_t> expectedSecondUsage = {{0, 500}, {100, 30}, {1009, 300}}; in TEST()
|
D | UidProcStatsCollectorTest.cpp | 52 std::string pidStatusStr(pid_t pid, uid_t uid) { in pidStatusStr() 92 std::string toString(const std::unordered_map<uid_t, UidProcStats>& uidProcStatsByUid) { in toString() argument 106 void applyFeatureFilter(std::unordered_map<uid_t, UidProcStats>* uidProcStatsByUid) { in applyFeatureFilter() argument 166 std::unordered_map<uid_t, UidProcStats> expected = in TEST() 359 std::unordered_map<uid_t, UidProcStats> expected = in TEST() 467 std::unordered_map<uid_t, UidProcStats> expected = in TEST() 682 std::unordered_map<uid_t, UidProcStats> expected = { in TEST() 983 std::unordered_map<uid_t, UidProcStats> expected = { in TEST() 1047 std::unordered_map<uid_t, UidProcStats> expected = { in TEST() 1112 std::unordered_map<uid_t, UidProcStats> expected = { in TEST() [all …]
|
/packages/services/Car/cpp/watchdog/server/src/ |
D | PackageInfoResolver.h | 60 const std::vector<uid_t>& uids, 61 const std::function<void(std::unordered_map<uid_t, std::string>)>& callback) = 0; 62 virtual std::unordered_map<uid_t, aidl::android::automotive::watchdog::internal::PackageInfo> 63 getPackageInfosForUids(const std::vector<uid_t>& uids) = 0; 114 const std::vector<uid_t>& uids, 115 const std::function<void(std::unordered_map<uid_t, std::string>)>& callback); 121 std::unordered_map<uid_t, aidl::android::automotive::watchdog::internal::PackageInfo> 122 getPackageInfosForUids(const std::vector<uid_t>& uids); 153 void updatePackageInfos(const std::vector<uid_t>& uids); 172 std::unordered_map<uid_t, aidl::android::automotive::watchdog::internal::PackageInfo> [all …]
|
D | PackageInfoResolver.cpp | 48 using GetpwuidFunction = std::function<struct passwd*(uid_t)>; 58 ComponentType getComponentTypeForNativeUid(uid_t uid, std::string_view packageName, in getComponentTypeForNativeUid() 78 uid_t uid, const std::vector<std::string>& vendorPackagePrefixes, in getPackageInfoForNativeUid() 144 void PackageInfoResolver::updatePackageInfos(const std::vector<uid_t>& uids) { in updatePackageInfos() 147 for (const uid_t uid : uids) { in updatePackageInfos() 213 const std::vector<uid_t>& uids, in asyncFetchPackageNamesForUids() 214 const std::function<void(std::unordered_map<uid_t, std::string>)>& callback) { in asyncFetchPackageNamesForUids() argument 222 std::unordered_map<uid_t, PackageInfo> PackageInfoResolver::getPackageInfosForUids( in getPackageInfosForUids() 223 const std::vector<uid_t>& uids) { in getPackageInfosForUids() 224 std::unordered_map<uid_t, PackageInfo> uidToPackageInfoMapping; in getPackageInfosForUids() [all …]
|
D | UidProcStatsCollector.h | 131 virtual const std::unordered_map<uid_t, UidProcStats> latestStats() const = 0; 133 virtual const std::unordered_map<uid_t, UidProcStats> deltaStats() const = 0; 157 const std::unordered_map<uid_t, UidProcStats> latestStats() const { in latestStats() 162 const std::unordered_map<uid_t, UidProcStats> deltaStats() const { in deltaStats() 176 static android::base::Result<std::tuple<uid_t, pid_t>> readPidStatusFileForPid(pid_t pid); 179 android::base::Result<std::unordered_map<uid_t, UidProcStats>> readUidProcStatsLocked() const; 187 android::base::Result<std::tuple<uid_t, ProcessStats>> readProcessStatsLocked(pid_t pid) const; 237 std::unordered_map<uid_t, UidProcStats> mLatestStats GUARDED_BY(mMutex); 240 std::unordered_map<uid_t, UidProcStats> mDeltaStats GUARDED_BY(mMutex);
|
D | UidCpuStatsCollector.h | 44 virtual const std::unordered_map<uid_t, int64_t> latestStats() const = 0; 46 virtual const std::unordered_map<uid_t, int64_t> deltaStats() const = 0; 69 const std::unordered_map<uid_t, int64_t> latestStats() const override { in latestStats() 74 const std::unordered_map<uid_t, int64_t> deltaStats() const override { in deltaStats() 97 std::unordered_map<uid_t, int64_t> mLatestStats GUARDED_BY(mMutex); 100 std::unordered_map<uid_t, int64_t> mDeltaStats GUARDED_BY(mMutex);
|
D | UidStatsCollector.cpp | 37 uid_t UidStats::uid() const { in uid() 38 return static_cast<uid_t>(packageInfo.packageIdentifier.uid); in uid() 75 const std::unordered_map<uid_t, UidIoStats>& uidIoStatsByUid, in process() argument 76 const std::unordered_map<uid_t, UidProcStats>& uidProcStatsByUid, in process() 77 const std::unordered_map<uid_t, int64_t>& cpuTimeMillisByUid) const { in process() 81 std::unordered_set<uid_t> uidSet; in process() 91 std::vector<uid_t> uids; in process()
|
D | ThreadPriorityController.cpp | 36 Result<void> ThreadPriorityController::checkPidTidUid(pid_t pid, pid_t tid, uid_t uid) { in checkPidTidUid() 41 uid_t uidForThread = std::get<0>(*tidStatus); in checkPidTidUid() 56 uid_t uuid = static_cast<uid_t>(uid); in setThreadPriority() 88 uid_t uuid = static_cast<uid_t>(uid); in getThreadPriority() 124 Result<std::tuple<uid_t, pid_t>> ThreadPriorityController::SystemCalls::readPidStatusFileForPid( in readPidStatusFileForPid()
|
D | UidIoStatsCollector.h | 93 virtual const std::unordered_map<uid_t, UidIoStats> latestStats() const = 0; 95 virtual const std::unordered_map<uid_t, UidIoStats> deltaStats() const = 0; 118 const std::unordered_map<uid_t, UidIoStats> latestStats() const override { in latestStats() 123 const std::unordered_map<uid_t, UidIoStats> deltaStats() const override { in deltaStats() 137 android::base::Result<std::unordered_map<uid_t, UidIoStats>> readUidIoStatsLocked() const; 149 std::unordered_map<uid_t, UidIoStats> mLatestStats GUARDED_BY(mMutex); 152 std::unordered_map<uid_t, UidIoStats> mDeltaStats GUARDED_BY(mMutex);
|
D | UidStatsCollector.h | 55 uid_t uid() const; 106 const std::unordered_map<uid_t, UidIoStats>& uidIoStatsByUid, 107 const std::unordered_map<uid_t, UidProcStats>& uidProcStatsByUid, 108 const std::unordered_map<uid_t, int64_t>& cpuTimeMillisByUid) const;
|
D | UidIoStatsCollector.cpp | 48 bool parseUidIoStats(const std::string& data, UidIoStats* stats, uid_t* uid) { in parseUidIoStats() 129 Result<std::unordered_map<uid_t, UidIoStats>> UidIoStatsCollector::readUidIoStatsLocked() const { in readUidIoStatsLocked() 134 std::unordered_map<uid_t, UidIoStats> uidIoStatsByUid; in readUidIoStatsLocked() 143 uid_t uid; in readUidIoStatsLocked()
|
D | ThreadPriorityController.h | 47 virtual android::base::Result<std::tuple<uid_t, pid_t>> readPidStatusFileForPid( 70 android::base::Result<std::tuple<uid_t, pid_t>> readPidStatusFileForPid(pid_t pid) override; 75 android::base::Result<void> checkPidTidUid(pid_t pid, pid_t tid, uid_t uid);
|
/packages/modules/DnsResolver/include/netd_resolv/ |
D | resolv.h | 47 #define NET_CONTEXT_INVALID_UID ((uid_t)-1) 66 uid_t uid = NET_CONTEXT_INVALID_UID; 84 typedef void (*get_network_context_callback)(unsigned netid, uid_t uid, 87 typedef int (*tagSocketCallback)(int sockFd, uint32_t tag, uid_t uid, pid_t pid);
|
/packages/modules/Connectivity/netd/ |
D | BpfHandlerTest.cpp | 36 constexpr uid_t TEST_UID = 10086; 37 constexpr uid_t TEST_UID2 = 54321; 83 int setUpSocketAndTag(int protocol, uint64_t* cookie, uint32_t tag, uid_t uid, in setUpSocketAndTag() 84 uid_t realUid) { in setUpSocketAndTag() 93 void expectUidTag(uint64_t cookie, uid_t uid, uint32_t tag) { in expectUidTag() 207 uid_t realUid = TEST_UID2; in TEST_F() 235 uid_t uid = TEST_UID; in TEST_F() 250 uid_t uid = TEST_UID + i; in TEST_F()
|
D | BpfHandler.h | 45 int tagSocket(int sockFd, uint32_t tag, uid_t chargeUid, uid_t realUid); 59 bool hasUpdateDeviceStatsPermission(uid_t uid);
|
/packages/services/Car/libs/procfs-inspector/server/ |
D | process.h | 30 uid_t getUid() { return mUid; } in getUid() 33 explicit ProcessInfo(pid_t pid = -1, uid_t uid = -1) : mPid(pid), mUid(uid) {} in mPid() 40 uid_t mUid;
|
/packages/modules/DnsResolver/tests/ |
D | resolv_test_utils.h | 44 ScopeBlockedUIDRule(INetd* netSrv, uid_t testUid) in ScopeBlockedUIDRule() 83 const uid_t mTestUid; 84 const uid_t mSavedUid; 116 ScopedChangeUID(uid_t testUid) : mTestUid(testUid), mSavedUid(getuid()) { in ScopedChangeUID() 122 const uid_t mTestUid; 123 const uid_t mSavedUid; 143 ScopedDefaultNetwork(INetd* netSrv, uid_t testDefaultNetwork) : mNetSrv(netSrv) { in ScopedDefaultNetwork()
|
D | resolv_callback_unit_test.cpp | 40 const uid_t TEST_UID = 99999; 42 static uid_t testUid = 0; 66 int tagSocketCallback(int, uint32_t, uid_t uid, pid_t) { in tagSocketCallback() 181 EXPECT_EQ(sb.st_uid, static_cast<uid_t>(AID_DNS)); in TEST_F()
|
/packages/modules/Connectivity/netd/include/ |
D | NetdUpdatablePublic.h | 48 int libnetd_updatable_tagSocket(int sockFd, uint32_t tag, uid_t chargeUid, 49 uid_t realUid);
|