/packages/modules/Bluetooth/ |
D | build.py | 188 self.bootstrap_dir = os.path.abspath(self.args.bootstrap_dir) 192 self.output_dir = os.path.join(self.bootstrap_dir, 'output') 193 self.platform_dir = os.path.join(self.bootstrap_dir, 'staging') 196 self.install_dir = os.path.join(self.output_dir, 'install') 212 assert os.path.isdir(self.platform_dir), 'Platform dir does not exist' 213 …assert os.path.isfile(os.path.join(self.platform_dir, '.gn')), 'Platform dir does not have .gn at … 241 cargo_home = os.path.join(self.output_dir, 'cargo_home') 243 os.makedirs(os.path.join(cargo_home, 'bin'), exist_ok=True) 247 self.env['CARGO_HOME'] = os.path.join(self.output_dir, 'cargo_home') 249 self.env['CXX_ROOT_PATH'] = os.path.join(self.platform_dir, 'bt') [all …]
|
/packages/modules/AppSearch/framework/java/external/android/app/appsearch/ |
D | GenericDocument.java | 259 public Object getProperty(@NonNull String path) { in getProperty() argument 260 Objects.requireNonNull(path); in getProperty() 261 Object rawValue = getRawPropertyFromRawDocument(path, mBundle); in getProperty() 280 Log.e(TAG, "The inner bundle is null at " + i + ", for path: " + path); in getProperty() 300 Log.e(TAG, "The inner bundle is null at " + i + ", for path: " + path); in getProperty() 311 + path); in getProperty() 332 @NonNull String path, @NonNull Bundle documentBundle) { in getRawPropertyFromRawDocument() 333 Objects.requireNonNull(path); in getRawPropertyFromRawDocument() 340 for (int i = 0; i < path.length(); i++) { in getRawPropertyFromRawDocument() 341 char c = path.charAt(i); in getRawPropertyFromRawDocument() [all …]
|
/packages/modules/Bluetooth/system/test/ |
D | gen_coverage.py | 156 …f.write("<tr class='light-row'><td><pre><a href=\'" + os.path.join(test_name, "index.html") + "\'>… 181 source_file = os.path.join(os.path.join(WORKING_DIR, tests[0]['test_name']), "style.css") 182 dest_file = os.path.join(WORKING_DIR, "style.css") 186 f = open(os.path.join(WORKING_DIR, "index.html"), "w") 194 test_cmd = os.path.join(os.path.join(test_root, test_name), test_name) 195 if not os.path.isfile(test_cmd): 200 profraw_path = os.path.join(WORKING_DIR, os.path.join(test_name, profraw_file_name)) 210 if not os.path.isfile(profraw_path): 220 cmd.append(os.path.join(get_android_root_or_die(), LLVM_MERGE + " merge ")) 222 test_working_dir = os.path.join(WORKING_DIR, test_name) [all …]
|
D | run_host_unit_tests.py | 47 if not os.path.isdir(dir): 65 current_path = os.path.abspath(os.getcwd()) 66 while current_path and os.path.isdir(current_path): 67 soong_ui_bash_path = os.path.join(current_path, SOONG_UI_BASH) 68 if os.path.isfile(soong_ui_bash_path): 73 parent_path = os.path.abspath(os.path.join(current_path, os.pardir)) 89 …value = get_output_from_command((os.path.join(ANDROID_BUILD_TOP, SOONG_UI_BASH), '--dumpvar-mode',… 104 value = os.path.join(os.path.join(ANDROID_BUILD_TOP, 'out'), 'dist') 105 if not os.path.isdir(value): 106 if os.path.exists(value): [all …]
|
/packages/modules/adb/client/ |
D | auth.cpp | 157 static bool load_keys(const std::string& path, bool allow_dir = true) { in load_keys() argument 158 LOG(INFO) << "load_keys '" << path << "'..."; in load_keys() 161 if (stat(path.c_str(), &st) != 0) { in load_keys() 162 PLOG(ERROR) << "load_keys: failed to stat '" << path << "'"; in load_keys() 167 return load_key(path); in load_keys() 174 LOG(WARNING) << "load_keys: refusing to recurse into directory '" << path << "'"; in load_keys() 178 std::unique_ptr<DIR, decltype(&closedir)> dir(opendir(path.c_str()), closedir); in load_keys() 180 PLOG(ERROR) << "load_keys: failed to open directory '" << path << "'"; in load_keys() 194 LOG(INFO) << "skipped non-adb_key '" << path << "/" << name << "'"; in load_keys() 198 result |= load_key((path + OS_PATH_SEPARATOR + name)); in load_keys() [all …]
|
D | adb_wifi.cpp | 101 bool load_known_hosts_from_file(const std::string& path, adb::proto::AdbKnownHosts& known_hosts) { in load_known_hosts_from_file() argument 104 if (stat(path.c_str(), &buf) == -1) { in load_known_hosts_from_file() 105 LOG(INFO) << "Known hosts file [" << path << "] does not exist..."; in load_known_hosts_from_file() 109 std::ifstream file(path, std::ios::binary); in load_known_hosts_from_file() 111 PLOG(ERROR) << "Unable to open [" << path << "]."; in load_known_hosts_from_file() 116 PLOG(ERROR) << "Failed to parse [" << path << "]. Deleting it as it may be corrupted."; in load_known_hosts_from_file() 117 adb_unlink(path.c_str()); in load_known_hosts_from_file() 125 std::string path = get_user_known_hosts_path(); in write_known_host_to_file() local 126 if (path.empty()) { in write_known_host_to_file() 132 load_known_hosts_from_file(path, known_hosts); in write_known_host_to_file() [all …]
|
/packages/modules/Bluetooth/system/gd/cert/ |
D | bluetooth_packets_python3_setup.py | 32 PYBIND11_INCLUDE_DIR = os.path.join(ANDROID_BUILD_TOP, "external/python/pybind11/include") 33 GD_DIR = os.path.join(ANDROID_BUILD_TOP, "packages/modules/Bluetooth/system/gd") 34 BT_PACKETS_GEN_DIR = os.path.join(ANDROID_BUILD_TOP, 36 BT_PACKETS_PY3_GEN_DIR = os.path.join(ANDROID_BUILD_TOP, 40 os.path.join(GD_DIR, "l2cap/fcs.cc"), 41 os.path.join(GD_DIR, "packet/bit_inserter.cc"), 42 os.path.join(GD_DIR, "packet/byte_inserter.cc"), 43 os.path.join(GD_DIR, "packet/byte_observer.cc"), 44 os.path.join(GD_DIR, "packet/iterator.cc"), 45 os.path.join(GD_DIR, "packet/fragmenting_inserter.cc"), [all …]
|
D | run_topshim | 30 if not os.path.isdir(dir): 46 current_path = os.path.abspath(os.getcwd()) 47 while current_path and os.path.isdir(current_path): 48 soong_ui_bash_path = os.path.join(current_path, SOONG_UI_BASH) 49 if os.path.isfile(soong_ui_bash_path): 54 parent_path = os.path.abspath(os.path.join(current_path, os.pardir)) 69 …value = get_output_from_command((os.path.join(ANDROID_BUILD_TOP, SOONG_UI_BASH), '--dumpvar-mode',… 83 value = os.path.join(os.path.join(ANDROID_BUILD_TOP, 'out'), 'dist') 84 if not os.path.isdir(value): 85 if os.path.exists(value): [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | DataManager.java | 162 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 …]
|
D | FilterDeleteSet.java | 40 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/modules/adb/daemon/ |
D | file_sync_service.cpp | 71 static bool should_use_fs_config(const std::string& path) { in should_use_fs_config() argument 74 return !android::base::StartsWith(path, "/data/"); in should_use_fs_config() 76 UNUSED(path); in should_use_fs_config() 81 static bool update_capabilities(const char* path, uint64_t capabilities) { in update_capabilities() argument 85 removexattr(path, XATTR_NAME_CAPS); in update_capabilities() 95 return setxattr(path, XATTR_NAME_CAPS, &cap_data, sizeof(cap_data), 0) != -1; in update_capabilities() 97 UNUSED(path, capabilities); in update_capabilities() 102 static bool secure_mkdirs(const std::string& path) { in secure_mkdirs() argument 103 if (path[0] != '/') return false; in secure_mkdirs() 105 std::vector<std::string> path_components = android::base::Split(path, "/"); in secure_mkdirs() [all …]
|
/packages/services/Car/car_product/car_ui_portrait/tools/ |
D | export_emulator.py | 11 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/modules/Bluetooth/system/gd/os/linux_generic/ |
D | files.cc | 53 bool FileExists(const std::string& path) { in FileExists() argument 54 std::ifstream input(path, std::ios::binary | std::ios::ate); in FileExists() 66 std::optional<std::string> ReadSmallFile(const std::string& path) { in ReadSmallFile() argument 67 std::ifstream input(path, std::ios::binary | std::ios::ate); in ReadSmallFile() 69 LOG_WARN("Failed to open file '%s', error: %s", path.c_str(), strerror(errno)); in ReadSmallFile() 74 LOG_WARN("Failed to get file size for '%s', error: %s", path.c_str(), strerror(errno)); in ReadSmallFile() 79 …LOG_WARN("Failed to go back to the beginning of file '%s', error: %s", path.c_str(), strerror(errn… in ReadSmallFile() 83 LOG_WARN("Failed to read file '%s', error: %s", path.c_str(), strerror(errno)); in ReadSmallFile() 90 bool WriteToFile(const std::string& path, const std::string& data) { in WriteToFile() argument 91 ASSERT(!path.empty()); in WriteToFile() [all …]
|
/packages/providers/MediaProvider/jni/ |
D | node.cpp | 19 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 …]
|
D | FuseDaemon.cpp | 260 : path(_path), in fuse() 276 if (android::base::StartsWith(path, PRIMARY_VOLUME_PREFIX)) { in GetEffectiveRootPath() 277 return path + "/" + MY_USER_ID_STRING; in GetEffectiveRootPath() 279 return path; in GetEffectiveRootPath() 312 inline bool IsTranscodeSupportedPath(const string& path) { in IsTranscodeSupportedPath() 314 if (!android::base::EndsWithIgnoreCase(path, ".mp4")) { in IsTranscodeSupportedPath() 320 if (android::base::StartsWithIgnoreCase(path, base_path + relative_path)) { in IsTranscodeSupportedPath() 328 inline bool IsUncachedPath(const std::string& path) { in IsUncachedPath() 331 if (android::base::StartsWithIgnoreCase(path, base_path + relative_path)) { in IsUncachedPath() 339 inline bool ShouldNotCache(const std::string& path) { in ShouldNotCache() [all …]
|
D | MediaProviderWrapper.cpp | 80 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/Connectivity/tests/cts/hostside/src/com/android/cts/net/ |
D | ProcNetTest.java | 103 public int readIntFromPath(String path) throws Exception { in readIntFromPath() argument 104 String mode = mDevice.executeAdbCommand("shell", "stat", "-c", "%a", path).trim(); in readIntFromPath() 105 String user = mDevice.executeAdbCommand("shell", "stat", "-c", "%u", path).trim(); in readIntFromPath() 106 String group = mDevice.executeAdbCommand("shell", "stat", "-c", "%g", path).trim(); in readIntFromPath() 110 return Integer.parseInt(mDevice.executeAdbCommand("shell", "cat", path).trim()); in readIntFromPath() 132 String path = IPV6_SYSCTL_DIR + "/" + interfaceDir + "/" + AUTOCONF_SYSCTL; in testProcSysctls() local 133 int value = readIntFromPath(path); in testProcSysctls() 134 assertLess(path, value, 0); in testProcSysctls() 143 String path = IPV6_SYSCTL_DIR + "/" + interfaceDir + "/" + "accept_ra_rt_info_min_plen"; in testAcceptRaRtInfoMinMaxPlen() local 144 int value = readIntFromPath(path); in testAcceptRaRtInfoMinMaxPlen() [all …]
|
/packages/services/Car/tools/emulator/ |
D | vhal_const_generate.py | 60 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/packet/parser/ |
D | main.cc | 42 const std::filesystem::path& input_file, 43 const std::filesystem::path& include_dir, 44 const std::filesystem::path& out_dir, 49 const std::filesystem::path& input_file, 50 const std::filesystem::path& include_dir, 51 const std::filesystem::path& out_dir, 57 const std::filesystem::path& input_file, 58 const std::filesystem::path& include_dir, 59 const std::filesystem::path& out_dir, 62 bool parse_declarations_one_file(const std::filesystem::path& input_file, Declarations* declaration… in parse_declarations_one_file() [all …]
|
/packages/modules/Virtualization/virtualizationservice/src/ |
D | payload.rs | 37 use std::path::{Path, PathBuf}; 65 path: PathBuf, field 125 apex_info.path = PathBuf::from(&staged_apex_info.diskImagePath); in override_staged_apex() 127 apex_info.last_update_seconds = last_updated(&apex_info.path)?; in override_staged_apex() 138 fn last_updated<P: AsRef<Path>>(path: P) -> Result<u64> { in last_updated() 139 let metadata = metadata(path)?; in last_updated() 284 let apex_file = open_parcel_file(&apex_info.path, false)?; in make_payload_disk() 308 image: Some(ParcelFileDescriptor::new(File::open(PathBuf::from(&extra_apk.path))?)), in make_payload_disk() 346 apexes.extend(paths.as_str().split(':').filter_map(|path| { in find_apex_names_in_classpath() 347 let path = path.strip_prefix("/apex/")?; in find_apex_names_in_classpath() localVariable [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | FileUtils.java | 435 public static void walkFileTreeContents(@NonNull Path path, @NonNull Consumer<Path> operation) { in walkFileTreeContents() argument 437 Files.walkFileTree(path, new FileVisitor<Path>() { in walkFileTreeContents() 445 if (!Objects.equals(path, file)) { in walkFileTreeContents() 459 if (!Objects.equals(path, dir)) { in walkFileTreeContents() 466 Log.w(TAG, "Failed to walk " + path, e); in walkFileTreeContents() 480 walkFileTreeContents(dir.toPath(), (path) -> { in deleteContents() 481 path.toFile().delete(); in deleteContents() 836 File path = null; 839 path = context.getSystemService(StorageManager.class).getStorageVolume(uri) 845 if (path != null) { [all …]
|
/packages/services/Car/cpp/watchdog/server/tests/ |
D | UidProcStatsCollectorTest.cpp | 111 ASSERT_RESULT_OK(populateProcPidDir(firstSnapshot.path, pidToTids, perProcessStat, in TEST() 114 UidProcStatsCollector collector(firstSnapshot.path); in TEST() 118 << "Files under the path `" << firstSnapshot.path << "` are inaccessible"; in TEST() 163 ASSERT_RESULT_OK(populateProcPidDir(secondSnapshot.path, pidToTids, perProcessStat, in TEST() 166 collector.mPath = secondSnapshot.path; in TEST() 169 << "Files under the path `" << secondSnapshot.path << "` are inaccessible"; in TEST() 232 ASSERT_RESULT_OK(populateProcPidDir(procDir.path, pidToTids, perProcessStat, perProcessStatus, in TEST() 235 UidProcStatsCollector collector(procDir.path); in TEST() 239 << "Files under the path `" << procDir.path << "` are inaccessible"; in TEST() 299 ASSERT_RESULT_OK(populateProcPidDir(firstSnapshot.path, pidToTids, perProcessStat, in TEST() [all …]
|
D | ProcPidDir.cpp | 37 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() 62 std::string path = StringPrintf((procDirPath + kStatFileFormat).c_str(), pid); in populateProcPidDir() local 63 if (!WriteStringToFile(processStat.at(pid), path)) { in populateProcPidDir() 64 return Error() << "Failed to write pid stat file " << path; in populateProcPidDir() 70 std::string path = StringPrintf((procDirPath + kStatusFileFormat).c_str(), pid); in populateProcPidDir() local 71 if (!WriteStringToFile(processStatus.at(pid), path)) { in populateProcPidDir() 72 return Error() << "Failed to write pid status file " << path; in populateProcPidDir() 90 std::string path = in populateProcPidDir() local [all …]
|
/packages/services/BuiltInPrintService/src/com/android/bips/discovery/ |
D | DiscoveredPrinter.java | 45 public final Uri path; field in DiscoveredPrinter 64 this.path = paths.get(0); in DiscoveredPrinter() 77 public DiscoveredPrinter(Uri uuid, String name, Uri path, String location) { in DiscoveredPrinter() argument 78 this(uuid, name, Collections.singletonList(path), location); in DiscoveredPrinter() 84 Uri uuid = null, path = null; in DiscoveredPrinter() local 97 path = Uri.parse(reader.nextString()); in DiscoveredPrinter() 106 if (printerName == null || path == null) { in DiscoveredPrinter() 111 this.path = path; in DiscoveredPrinter() 112 this.paths = Collections.singletonList(path); in DiscoveredPrinter() 121 return uuid != null ? uuid : path; in getUri() [all …]
|
/packages/services/Car/cpp/watchdog/server/src/ |
D | UidProcStatsCollector.cpp | 113 Result<PidStat> readPidStatFile(const std::string& path, int32_t millisPerClockTick) { in readPidStatFile() argument 115 if (!ReadFileToString(path, &buffer)) { in readPidStatFile() 116 return Error(ERR_FILE_OPEN_READ) << "ReadFileToString failed for " << path; in readPidStatFile() 120 return Error(ERR_INVALID_FILE) << path << " contains " << lines.size() << " lines != 1"; in readPidStatFile() 124 return Error(ERR_INVALID_FILE) << "Failed to parse the contents of " << path; in readPidStatFile() 132 const std::string& path, const std::string& delimiter) { in readKeyValueFile() argument 134 if (!ReadFileToString(path, &buffer)) { in readKeyValueFile() 135 return Error(ERR_FILE_OPEN_READ) << "ReadFileToString failed for " << path; in readKeyValueFile() 147 << "\" in file " << path; in readKeyValueFile() 153 << "Duplicate " << key << " line: \"" << lines[i] << "\" in file " << path; in readKeyValueFile() [all …]
|