Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 1042) sorted by relevance

12345678910>>...42

/packages/providers/MediaProvider/photopicker/tests/src/com/android/photopicker/data/model/
DMediaTest.kt47 path("picker") in testMediaImageIsParcelable()
48 path("a") in testMediaImageIsParcelable()
49 path("image_id") in testMediaImageIsParcelable()
57 path("image_id") in testMediaImageIsParcelable()
94 path("picker") in testMediaVideoIsParcelable()
95 path("a") in testMediaVideoIsParcelable()
96 path("video_id") in testMediaVideoIsParcelable()
104 path("video_id") in testMediaVideoIsParcelable()
141 path("picker") in testImageHashCodeIsPredictable()
142 path("a") in testImageHashCodeIsPredictable()
[all …]
/packages/modules/Virtualization/
DTEST_MAPPING88 "path": "packages/modules/Virtualization/guest/apkdmverity"
91 "path": "packages/modules/Virtualization/guest/encryptedstore"
94 "path": "packages/modules/Virtualization/android/virtmgr"
97 "path": "packages/modules/Virtualization/libs/apexutil"
100 "path": "packages/modules/Virtualization/libs/apkverify"
103 "path": "packages/modules/Virtualization/libs/avb"
106 "path": "packages/modules/Virtualization/libs/bssl"
109 "path": "packages/modules/Virtualization/libs/capabilities"
112 "path": "packages/modules/Virtualization/libs/devicemapper"
115 "path": "packages/modules/Virtualization/libs/dice"
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/leveldb/
DLevelDBManager.java39 public static LevelDBInstance getInstance(String path) { in getInstance() argument
41 path = Ascii.toLowerCase(path.trim()); in getInstance()
42 if (INSTANCES.containsKey(path)) { in getInstance()
43 return INSTANCES.get(path); in getInstance()
46 LevelDBInstance instance = LevelDBInstance.createLevelDBInstance(path); in getInstance()
47 INSTANCES.put(path, instance); in getInstance()
57 public static LevelDBInstance recreate(String path) { in recreate() argument
58 delete(path); in recreate()
60 LevelDBInstance instance = LevelDBInstance.createLevelDBInstance(path); in recreate()
61 INSTANCES.put(path, instance); in recreate()
[all …]
/packages/modules/AppSearch/framework/java/external/android/app/appsearch/
DGenericDocument.java313 public @Nullable Object getProperty(@NonNull String path) { in getProperty() argument
314 Objects.requireNonNull(path); in getProperty()
317 new PropertyPath(path), in getProperty()
337 Log.e(TAG, "The inner parcel is null at " + i + ", for path: " + path); in getProperty()
366 @NonNull PropertyPath path, in getRawPropertyFromRawDocument()
369 Objects.requireNonNull(path); in getRawPropertyFromRawDocument()
371 for (int i = pathIndex; i < path.size(); i++) { in getRawPropertyFromRawDocument()
372 PropertyPath.PathSegment segment = path.get(i); in getRawPropertyFromRawDocument()
439 if (currentElementValue == null || i == path.size() - 1) { in getRawPropertyFromRawDocument()
491 path, in getRawPropertyFromRawDocument()
[all …]
DPropertyPath.java66 public PropertyPath(@NonNull String path) { in PropertyPath() argument
67 Objects.requireNonNull(path); in PropertyPath()
70 recursivePathScan(path); in PropertyPath()
74 throw new IllegalArgumentException(e.getMessage() + ": " + path); in PropertyPath()
79 private void recursivePathScan(@UnderInitialization PropertyPath this, String path) in recursivePathScan() argument
84 for (int i = 0; i < path.length(); i++) { in recursivePathScan()
85 char c = path.charAt(i); in recursivePathScan()
96 if (controlPos == 0 || path.isEmpty()) { in recursivePathScan()
103 mPathList.add(new PathSegment(path, PathSegment.NON_REPEATED_CARDINALITY)); in recursivePathScan()
109 String propertyName = path.substring(0, controlPos); in recursivePathScan()
[all …]
/packages/modules/Bluetooth/
Dbuild.py203 self.bootstrap_dir = os.path.abspath(self.args.bootstrap_dir)
207 self.output_dir = os.path.join(self.bootstrap_dir, 'output')
208 self.platform_dir = os.path.join(self.bootstrap_dir, 'staging')
209 self.bt_dir = os.path.join(self.platform_dir, 'bt')
212 self.install_dir = os.path.join(self.output_dir, 'install')
214 assert os.path.samefile(self.bt_dir,
215 … os.path.dirname(__file__)), "Please rerun bootstrap for the current project!"
231 assert os.path.isdir(self.platform_dir), 'Platform dir does not exist'
232 …assert os.path.isfile(os.path.join(self.platform_dir, '.gn')), 'Platform dir does not have .gn at …
264 cargo_home = os.path.join(self.output_dir, 'cargo_home')
[all …]
/packages/services/Car/cpp/watchdog/server/tests/
DProcPidDir.cpp37 Result<void> makeDir(std::string path) { in makeDir() argument
38 if (mkdir(path.c_str(), 0700) && errno != EEXIST) { in makeDir()
39 return Error() << "Could not mkdir " << path << ": " << strerror(errno); in makeDir()
65 std::string path = StringPrintf((procDirPath + kStatFileFormat).c_str(), pid); in populateProcPidDir() local
66 if (!WriteStringToFile(processStat.at(pid), path)) { in populateProcPidDir()
67 return Error() << "Failed to write pid stat file " << path; in populateProcPidDir()
73 std::string path = StringPrintf((procDirPath + kStatusFileFormat).c_str(), pid); in populateProcPidDir() local
74 if (!WriteStringToFile(processStatus.at(pid), path)) { in populateProcPidDir()
75 return Error() << "Failed to write pid status file " << path; in populateProcPidDir()
81 std::string path = StringPrintf((procDirPath + kSmapsRollupFileFormat).c_str(), pid); in populateProcPidDir() local
[all …]
DUidProcStatsCollectorTest.cpp123 std::string path = StringPrintf((rootPath + kSmapsRollupFileFormat).c_str(), 1); in isSmapsRollupSupported() local
124 return access(path.c_str(), R_OK) == 0; in isSmapsRollupSupported()
208 ASSERT_RESULT_OK(populateProcPidDir(firstSnapshot.path, pidToTids, perProcessStat, in TEST()
212 UidProcStatsCollector collector(firstSnapshot.path, isSmapsRollupSupported(firstSnapshot.path)); in TEST()
216 << "Files under the path `" << firstSnapshot.path << "` are inaccessible"; in TEST()
298 ASSERT_RESULT_OK(populateProcPidDir(secondSnapshot.path, pidToTids, perProcessStat, in TEST()
302 collector.mPath = secondSnapshot.path; in TEST()
305 << "Files under the path `" << secondSnapshot.path << "` are inaccessible"; in TEST()
404 ASSERT_RESULT_OK(populateProcPidDir(procDir.path, pidToTids, perProcessStat, perProcessStatus, in TEST()
408 UidProcStatsCollector collector(procDir.path, isSmapsRollupSupported(procDir.path)); in TEST()
[all …]
/packages/services/Car/cpp/watchdog/stable_server/tests/
DProcPidDir.cpp37 Result<void> makeDir(std::string path) { in makeDir() argument
38 if (mkdir(path.c_str(), 0700) && errno != EEXIST) { in makeDir()
39 return Error() << "Could not mkdir " << path << ": " << strerror(errno); in makeDir()
65 std::string path = StringPrintf((procDirPath + kStatFileFormat).c_str(), pid); in populateProcPidDir() local
66 if (!WriteStringToFile(processStat.at(pid), path)) { in populateProcPidDir()
67 return Error() << "Failed to write pid stat file " << path; in populateProcPidDir()
73 std::string path = StringPrintf((procDirPath + kStatusFileFormat).c_str(), pid); in populateProcPidDir() local
74 if (!WriteStringToFile(processStatus.at(pid), path)) { in populateProcPidDir()
75 return Error() << "Failed to write pid status file " << path; in populateProcPidDir()
81 std::string path = StringPrintf((procDirPath + kSmapsRollupFileFormat).c_str(), pid); in populateProcPidDir() local
[all …]
DUidProcStatsCollectorTest.cpp123 std::string path = StringPrintf((rootPath + kSmapsRollupFileFormat).c_str(), 1); in isSmapsRollupSupported() local
124 return access(path.c_str(), R_OK) == 0; in isSmapsRollupSupported()
208 ASSERT_RESULT_OK(populateProcPidDir(firstSnapshot.path, pidToTids, perProcessStat, in TEST()
212 UidProcStatsCollector collector(firstSnapshot.path, isSmapsRollupSupported(firstSnapshot.path)); in TEST()
216 << "Files under the path `" << firstSnapshot.path << "` are inaccessible"; in TEST()
298 ASSERT_RESULT_OK(populateProcPidDir(secondSnapshot.path, pidToTids, perProcessStat, in TEST()
302 collector.mPath = secondSnapshot.path; in TEST()
305 << "Files under the path `" << secondSnapshot.path << "` are inaccessible"; in TEST()
404 ASSERT_RESULT_OK(populateProcPidDir(procDir.path, pidToTids, perProcessStat, perProcessStatus, in TEST()
408 UidProcStatsCollector collector(procDir.path, isSmapsRollupSupported(procDir.path)); in TEST()
[all …]
/packages/modules/Connectivity/tests/cts/hostside/src/com/android/cts/net/
DProcNetTest.java111 public int readIntFromPath(String path) throws Exception { in readIntFromPath() argument
112 String mode = mDevice.executeShellCommand("stat -c %a " + path).trim(); in readIntFromPath()
113 String user = mDevice.executeShellCommand("stat -c %u " + path).trim(); in readIntFromPath()
114 String group = mDevice.executeShellCommand("stat -c %g " + path).trim(); in readIntFromPath()
118 return Integer.parseInt(mDevice.executeShellCommand("cat " + path).trim()); in readIntFromPath()
142 String path = IPV6_SYSCTL_DIR + "/" + interfaceDir + "/" + AUTOCONF_SYSCTL; in testProcSysctls() local
143 int value = readIntFromPath(path); in testProcSysctls()
144 assertLess(path, value, 0); in testProcSysctls()
154 String path = IPV6_SYSCTL_DIR + "/" + interfaceDir + "/" + "accept_ra_rt_info_min_plen"; in testAcceptRaRtInfoMinMaxPlen() local
155 int value = readIntFromPath(path); in testAcceptRaRtInfoMinMaxPlen()
[all …]
/packages/modules/adb/client/
Dauth.cpp155 static bool load_keys(const std::string& path, bool allow_dir = true) { in load_keys() argument
156 VLOG(AUTH) << "load_keys '" << path << "'..."; in load_keys()
159 if (stat(path.c_str(), &st) != 0) { in load_keys()
160 PLOG(ERROR) << "load_keys: failed to stat '" << path << "'"; in load_keys()
165 return load_key(path); in load_keys()
172 LOG(WARNING) << "load_keys: refusing to recurse into directory '" << path << "'"; in load_keys()
176 std::unique_ptr<DIR, decltype(&closedir)> dir(opendir(path.c_str()), closedir); in load_keys()
178 PLOG(ERROR) << "load_keys: failed to open directory '" << path << "'"; in load_keys()
192 VLOG(AUTH) << "skipped non-adb_key '" << path << "/" << name << "'"; in load_keys()
196 result |= load_key((path + OS_PATH_SEPARATOR + name)); in load_keys()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DDataManager.java162 public MediaObject peekMediaObject(Path path) { in peekMediaObject() argument
163 return path.getObject(); in peekMediaObject()
166 public MediaObject getMediaObject(Path path) { in getMediaObject() argument
168 MediaObject obj = path.getObject(); in getMediaObject()
171 MediaSource source = mSourceMap.get(path.getPrefix()); in getMediaObject()
173 Log.w(TAG, "cannot find media source for path: " + path); in getMediaObject()
178 MediaObject object = source.createMediaObject(path); in getMediaObject()
180 Log.w(TAG, "cannot create media object: " + path); in getMediaObject()
184 Log.w(TAG, "exception in creating media object: " + path, t); in getMediaObject()
194 public MediaSet getMediaSet(Path path) { in getMediaSet() argument
[all …]
DFilterDeleteSet.java40 Path path; field in FilterDeleteSet.Request
42 public Request(int type, Path path, int indexHint) { in Request() argument
44 this.path = path; in Request()
50 Path path; field in FilterDeleteSet.Deletion
52 public Deletion(Path path, int index) { in Deletion() argument
53 this.path = path; in Deletion()
67 public FilterDeleteSet(Path path, MediaSet baseSet) { in FilterDeleteSet() argument
68 super(path, INVALID_DATA_VERSION); in FilterDeleteSet()
160 if (mCurrent.get(j).path == r.path) break; in reload()
163 mCurrent.add(new Deletion(r.path, r.indexHint)); in reload()
[all …]
/packages/services/Car/car_product/car_ui_portrait/tools/
Dexport_emulator.py11 def fromTop(path): argument
12 return os.path.join(os.environ['ANDROID_BUILD_TOP'], path)
14 def fromProductOut(path): argument
15 return os.path.join(os.environ['ANDROID_PRODUCT_OUT'], path)
18 outputDir = os.path.join(outputDir, abi)
22 copy2(fromProductOut('system-qemu.img'), os.path.join(outputDir, 'system.img'))
23 copy2(fromProductOut('vendor-qemu.img'), os.path.join(outputDir, 'vendor.img'))
24 if os.path.isfile(fromProductOut('kernel-ranchu-64')):
28 copy2(fromProductOut('ramdisk-qemu.img'), os.path.join(outputDir, 'ramdisk.img'))
33 copytree(fromProductOut('data'), os.path.join(outputDir, 'data'), dirs_exist_ok=True)
[all …]
/packages/providers/MediaProvider/jni/
Dnode.cpp19 static std::vector<std::string> GetPathSegments(int segment_start, const std::string& path) { in GetPathSegments() argument
21 int segment_end = path.find_first_of('/', segment_start); in GetPathSegments()
26 segment_end = path.find_first_of('/', ++segment_start); in GetPathSegments()
30 segments.push_back(path.substr(segment_start, segment_end - segment_start)); in GetPathSegments()
32 segment_end = path.find_first_of('/', segment_start); in GetPathSegments()
34 if (segment_start < path.size()) { in GetPathSegments()
35 segments.push_back(path.substr(segment_start)); in GetPathSegments()
44 void node::BuildPathForNodeRecursive(bool safe, const node* node, std::stringstream* path) const { in BuildPathForNodeRecursive()
46 BuildPathForNodeRecursive(safe, node->parent_, path); in BuildPathForNodeRecursive()
50 (*path) << reinterpret_cast<uintptr_t>(node); in BuildPathForNodeRecursive()
[all …]
DMediaProviderWrapper.cpp80 const string& path, uid_t uid) { in insertFileInternal() argument
81 ScopedLocalRef<jstring> j_path(env, env->NewStringUTF(path.c_str())); in insertFileInternal()
91 const string& path, uid_t uid) { in deleteFileInternal() argument
92 ScopedLocalRef<jstring> j_path(env, env->NewStringUTF(path.c_str())); in deleteFileInternal()
102 jmethodID mid_is_diraccess_allowed, const string& path, uid_t uid, in isDirAccessAllowedInternal() argument
104 ScopedLocalRef<jstring> j_path(env, env->NewStringUTF(path.c_str())); in isDirAccessAllowedInternal()
116 const string& path) { in isUidAllowedAccessToDataOrObbPathInternal() argument
117 ScopedLocalRef<jstring> j_path(env, env->NewStringUTF(path.c_str())); in isUidAllowedAccessToDataOrObbPathInternal()
129 const string& path) { in getFilesInDirectoryInternal() argument
131 ScopedLocalRef<jstring> j_path(env, env->NewStringUTF(path.c_str())); in getFilesInDirectoryInternal()
[all …]
/packages/modules/adb/daemon/
Dfile_sync_service.cpp72 static bool should_use_fs_config([[maybe_unused]] const std::string& path) { in should_use_fs_config() argument
82 return !android::base::StartsWith(path, "/data/"); in should_use_fs_config()
88 static bool update_capabilities(const char* path, uint64_t capabilities) { in update_capabilities() argument
92 removexattr(path, XATTR_NAME_CAPS); in update_capabilities()
102 return setxattr(path, XATTR_NAME_CAPS, &cap_data, sizeof(cap_data), 0) != -1; in update_capabilities()
104 UNUSED(path, capabilities); in update_capabilities()
109 static bool secure_mkdirs(const std::string& path) { in secure_mkdirs() argument
110 if (path[0] != '/') return false; in secure_mkdirs()
112 std::vector<std::string> path_components = android::base::Split(path, "/"); in secure_mkdirs()
150 static bool do_lstat_v1(int s, const char* path) { in do_lstat_v1() argument
[all …]
/packages/services/Car/tools/emulator/
Dvhal_const_generate.py60 import os, os.path
63 script_directory = os.path.join(os.path.dirname(os.path.abspath(__file__)))
64 parent_location = os.path.abspath(os.path.join(script_directory, '..'))
65 sys.path.append(parent_location)
88 vhal_location = os.path.join(android_build_top, 'hardware','interfaces','automotive','vehicle')
90 vhal_location = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)),
93 if not(os.path.exists(vhal_location) and os.path.isdir(vhal_location)):
98 vhal_20_file = os.path.join(vhal_location, '2.0', 'types.hal')
99 if not(os.path.exists(vhal_20_file)):
106 vhal_20_file = open(os.path.join(script_directory, 'vhal_consts_2_0.py'), 'w')
/packages/modules/Bluetooth/system/gd/os/linux_generic/
Dfiles.cc52 bool FileExists(const std::string& path) { in FileExists() argument
53 std::ifstream input(path, std::ios::binary | std::ios::ate); in FileExists()
65 std::optional<std::string> ReadSmallFile(const std::string& path) { in ReadSmallFile() argument
66 std::ifstream input(path, std::ios::binary | std::ios::ate); in ReadSmallFile()
68 log::warn("Failed to open file '{}', error: {}", path, strerror(errno)); in ReadSmallFile()
73 log::warn("Failed to get file size for '{}', error: {}", path, strerror(errno)); in ReadSmallFile()
78 log::warn("Failed to go back to the beginning of file '{}', error: {}", path, strerror(errno)); in ReadSmallFile()
82 log::warn("Failed to read file '{}', error: {}", path, strerror(errno)); in ReadSmallFile()
89 bool WriteToFile(const std::string& path, const std::string& data) { in WriteToFile() argument
90 log::assert_that(!path.empty(), "assert failed: !path.empty()"); in WriteToFile()
[all …]
/packages/modules/Virtualization/android/virtualizationservice/vfio_handler/src/
Daidl.rs28 use std::path::{Path, PathBuf};
175 fn check_platform_device(path: &Path) -> binder::Result<()> { in check_platform_device()
176 if !path.exists() { in check_platform_device()
181 if !path.starts_with(SYSFS_PLATFORM_DEVICES_PATH) { in check_platform_device()
189 fn get_device_iommu_group(path: &Path) -> Option<u64> { in get_device_iommu_group()
190 let group_path = read_link(path.join("iommu_group")).ok()?; in get_device_iommu_group()
195 fn current_driver(path: &Path) -> Option<String> { in current_driver()
196 let driver_path = read_link(path.join("driver")).ok()?; in current_driver()
202 fn try_bind_driver(path: &Path, driver: &str) -> binder::Result<()> { in try_bind_driver()
203 if Some(driver) == current_driver(path).as_deref() { in try_bind_driver()
[all …]
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/utils/
DScenarioDispatcher.java162 String path = pathWithoutPrefix(request.getPath()); in dispatch() local
185 : pathWithoutQueryParams(path))); in dispatch()
193 sLogger.v("serving path at %s with response %s", path, response.toString()); in dispatch()
201 recordCalledPath("/" + pathWithoutQueryParams(path)); in dispatch()
202 sLogger.v("serving path at %s (404)", path); in dispatch()
207 private synchronized void recordCalledPath(String path) { in recordCalledPath() argument
208 if (mCalledPaths.containsKey(path)) { in recordCalledPath()
211 path, mUniqueCallCount.getCount(), mRequestToMockMap.size()); in recordCalledPath()
213 mCalledPaths.put(path, 1); in recordCalledPath()
217 path, mUniqueCallCount.getCount(), mRequestToMockMap.size()); in recordCalledPath()
[all …]
/packages/modules/Virtualization/android/virtmgr/src/
Dpayload.rs40 use std::path::{Path, PathBuf};
67 path: PathBuf, field
136 apex_info.path = PathBuf::from(&staged_apex_info.diskImagePath); in override_staged_apex()
138 apex_info.last_update_seconds = last_updated(&apex_info.path)?; in override_staged_apex()
149 fn last_updated<P: AsRef<Path>>(path: P) -> Result<u64> { in last_updated()
150 let metadata = metadata(path)?; in last_updated()
305 let path = if cfg!(early) { in make_payload_disk() localVariable
306 let path = &apex_info.preinstalled_path; in make_payload_disk() localVariable
307 if path.extension().and_then(OsStr::to_str).unwrap_or("") != "apex" { in make_payload_disk()
308 bail!("compressed APEX {} not supported", path.display()); in make_payload_disk()
[all …]
/packages/modules/Virtualization/libs/devicemapper/src/
Dloopdevice.rs32 use std::path::{Path, PathBuf};
77 pub path: PathBuf, field
82 path: P, in attach()
100 match try_attach(&path, offset, size_limit, options) { in attach()
119 path: P, in try_attach()
138 .open(&path) in try_attach()
139 .context(format!("failed to open {:?}", path.as_ref()))?; in try_attach()
169 Ok(LoopDevice { file: device_file, path: PathBuf::from(device_path) }) in try_attach()
173 pub fn detach<P: AsRef<Path>>(path: P) -> Result<()> { in detach()
174 let device_file = OpenOptions::new().read(true).write(true).open(&path)?; in detach()
[all …]
/packages/services/Car/cpp/watchdog/stable_server/src/
DUidProcStatsCollector.cpp126 Result<PidStat> readPidStatFile(const std::string& path, int32_t millisPerClockTick) { in readPidStatFile() argument
128 if (!ReadFileToString(path, &buffer)) { in readPidStatFile()
129 return Error(READ_WARNING) << "ReadFileToString failed for " << path; in readPidStatFile()
133 return Error(READ_ERROR) << path << " contains " << lines.size() << " lines != 1"; in readPidStatFile()
137 return Error(READ_ERROR) << "Failed to parse the contents of " << path; in readPidStatFile()
171 const std::string& path, const std::string& delimiter, in readKeyValueFile() argument
174 if (!ReadFileToString(path, &buffer)) { in readKeyValueFile()
175 return Error(READ_WARNING) << "ReadFileToString failed for " << path; in readKeyValueFile()
187 << "\" in file " << path; in readKeyValueFile()
193 << "Duplicate " << key << " line: \"" << lines[i] << "\" in file " << path; in readKeyValueFile()
[all …]

12345678910>>...42