/aosp14/frameworks/base/services/incremental/ |
H A D | path.cpp | 49 while (!path.empty() && path.front() == '/' && in preparePathComponent() 50 (trimAll || (path.size() > 1 && path[1] == '/'))) { in preparePathComponent() 54 while (path.size() > !trimAll && path.back() == '/') { in preparePathComponent() 61 if (path.empty()) { in append_next_path() 67 target += path; in append_next_path() 88 return !path.empty() && path[0] == '/'; in isAbsolute() 92 if (path.empty()) { in normalize() 139 if (path.empty()) { in basename() 146 while (!path.empty() && pos == path.size() - 1) { in basename() 151 return path.empty() ? "/"sv : path; in basename() [all …]
|
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/ |
H A D | PathPerfTest.java | 37 Path path = new Path(); in testReset() local 39 path.reset(); in testReset() 46 Path path = new Path(); in testAddReset() local 49 path.reset(); in testAddReset() 56 Path path = new Path(); in testRewind() local 58 path.rewind(); in testRewind() 65 Path path = new Path(); in testAddRewind() local 68 path.rewind(); in testAddRewind() 75 Path path = new Path(); in testIsEmpty() local 78 path.isEmpty(); in testIsEmpty() [all …]
|
/aosp14/system/core/healthd/ |
H A D | BatteryMonitor_v1.cpp | 295 String8 path; in isScopedPowerSupply() local 360 String8 path; in updateValues() local 364 path.clear(); in updateValues() 381 path.clear(); in updateValues() 390 path.clear(); in updateValues() 394 (access(path.string(), R_OK) == 0) ? getIntField(path) : 0; in updateValues() 396 path.clear(); in updateValues() 401 (access(path.string(), R_OK) == 0) ? getIntField(path) : in updateValues() 599 String8 path; in init() local 622 path.clear(); in init() [all …]
|
H A D | BatteryMonitor.cpp | 355 String8 path; in isScopedPowerSupply() local 446 String8 path; in updateValues() local 450 path.clear(); in updateValues() 467 path.clear(); in updateValues() 476 path.clear(); in updateValues() 480 (access(path.string(), R_OK) == 0) ? getIntField(path) : 0; in updateValues() 482 path.clear(); in updateValues() 487 (access(path.string(), R_OK) == 0) ? getIntField(path) : in updateValues() 746 String8 path; in init() local 769 path.clear(); in init() [all …]
|
/aosp14/frameworks/base/libs/androidfw/tests/ |
H A D | ApkParsing_test.cpp | 29 const char* path = "lib/arm64-v8a/library.so"; in TEST() local 32 ASSERT_THAT(lastSlash, Eq(path + 13)); in TEST() 36 const char* path = "lib/arm64-v8a/library.so"; in TEST() local 37 auto lastSlash = util::ValidLibraryPathLastSlash(path, true, false); in TEST() 42 const char* path = "lib/armeabi-v7a/library.so"; in TEST() local 45 ASSERT_THAT(lastSlash, Eq(path + 15)); in TEST() 49 const char* path = "lib/arm64-v8a/random.so"; in TEST() local 55 const char* path = "lib/arm64-v8a/library.txt"; in TEST() local 61 const char* path = "lib/arm64-v8a/lib#.so"; in TEST() local 67 const char* path = "lib/arm64-v8a/anything/library.so"; in TEST() local [all …]
|
/aosp14/system/core/libcutils/ |
H A D | fs.cpp | 52 if (TEMP_FAILURE_RETRY(lstat(path, &sb)) == -1) { in fs_prepare_path_impl() 77 path, uid, gid, sb.st_uid, sb.st_gid); in fs_prepare_path_impl() 81 path, mode, (sb.st_mode & ALL_PERMS)); in fs_prepare_path_impl() 88 ? TEMP_FAILURE_RETRY(mkdir(path, mode)) in fs_prepare_path_impl() 103 if (TEMP_FAILURE_RETRY(chmod(path, mode)) == -1) { in fs_prepare_path_impl() 128 int fd = TEMP_FAILURE_RETRY(open(path, O_RDONLY)); in fs_read_atomic_int() 152 int fs_write_atomic_int(const char* path, int value) { in fs_write_atomic_int() argument 180 if (rename(temp, path) == -1) { in fs_write_atomic_int() 196 int fs_mkdirs(const char* path, mode_t mode) { in fs_mkdirs() argument 197 if (*path != '/') { in fs_mkdirs() [all …]
|
/aosp14/frameworks/base/services/incremental/test/ |
H A D | path_test.cpp | 23 namespace android::incremental::path { namespace 44 EXPECT_STREQ("", path::join("", "").c_str()); in TEST() 46 EXPECT_STREQ("/", path::join("", "/").c_str()); in TEST() 47 EXPECT_STREQ("/", path::join("/", "").c_str()); in TEST() 48 EXPECT_STREQ("/", path::join("/", "/").c_str()); in TEST() 49 EXPECT_STREQ("/", path::join("/"s, "/").c_str()); in TEST() 50 EXPECT_STREQ("/", path::join("/"sv, "/").c_str()); in TEST() 53 EXPECT_STREQ("/a/b/c/d", path::join("/a/b/"s, "c", "d").c_str()); in TEST() 54 EXPECT_STREQ("/a/b/c/d", path::join("/a/b/", "c", "d").c_str()); in TEST() 55 EXPECT_STREQ("/a/b/c/d", path::join("/", "a/b/", "c", "d").c_str()); in TEST() [all …]
|
/aosp14/system/core/init/ |
H A D | util_test.cpp | 46 auto file_contents = ReadFile(tf.path); in TEST() 57 auto file_contents = ReadFile(tf.path); in TEST() 101 std::string path = android::base::StringPrintf("%s/does-not-exist", test_dir.path); in TEST() local 102 EXPECT_RESULT_OK(WriteFile(path, s)); in TEST() 103 auto file_contents = ReadFile(path); in TEST() 112 EXPECT_EQ(0, unlink(path.c_str())); in TEST() 123 file_contents = ReadFile(tf.path); in TEST() 144 EXPECT_TRUE(is_dir(test_dir.path)); in TEST() 146 EXPECT_FALSE(is_dir(tf.path)); in TEST() 151 std::string path = android::base::StringPrintf("%s/three/directories/deep", test_dir.path); in TEST() local [all …]
|
H A D | devices.cpp | 71 auto end = path.find('/', start); in FindPciDevicePrefix() 74 end = path.find('/', end + 1); in FindPciDevicePrefix() 84 *result = path.substr(start, length); in FindPciDevicePrefix() 102 auto end = path.find('/', start); in FindVbdDevicePrefix() 160 return path == name_; in Match() 170 return Match(path); in MatchWithSubsystem() 244 path.erase(last_slash); in FindPlatformDevice() 245 directory = Dirname(path); in FindPlatformDevice() 255 std::string path = "/sys" + upath; in FixupSysPermissions() local 258 if (s.MatchWithSubsystem(path, subsystem)) s.SetPermissions(path); in FixupSysPermissions() [all …]
|
H A D | parser.cpp | 140 ParseData(path, &config_contents); in ParseConfigFileInsecure() 144 Result<void> Parser::ParseConfigFile(const std::string& path) { in ParseConfigFile() argument 145 LOG(INFO) << "Parsing file " << path << "..."; in ParseConfigFile() 147 auto config_contents = ReadFile(path); in ParseConfigFile() 153 ParseData(path, &config_contents.value()); in ParseConfigFile() 159 bool Parser::ParseConfigDir(const std::string& path) { in ParseConfigDir() argument 160 LOG(INFO) << "Parsing directory " << path << "..."; in ParseConfigDir() 186 bool Parser::ParseConfig(const std::string& path) { in ParseConfig() argument 187 if (is_dir(path.c_str())) { in ParseConfig() 188 return ParseConfigDir(path); in ParseConfig() [all …]
|
/aosp14/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
H A D | PathsCacheActivity.java | 50 Path path = new Path(); in makePath() local 51 buildPath(path); in makePath() 52 return path; in makePath() 56 path.moveTo(0.0f, 0.0f); in buildPath() 63 Path path = new Path(); in makeLargePath() local 64 buildLargePath(path); in makeLargePath() 65 return path; in makeLargePath() 69 path.moveTo(0.0f, 0.0f); in buildLargePath() 115 Path path = makePath(); in onDraw() local 118 mPathList.add(path); in onDraw() [all …]
|
H A D | PathDestructionActivity.java | 67 Path path = new Path(); in getRandomPath() local 68 path.moveTo(left, top); in getRandomPath() 69 path.lineTo(right, top); in getRandomPath() 70 path.lineTo(right, bottom); in getRandomPath() 71 path.lineTo(left, bottom); in getRandomPath() 72 path.close(); in getRandomPath() 73 return path; in getRandomPath() 86 Path path; in onDraw() local 91 path = null; in onDraw() 95 path = null; in onDraw() [all …]
|
/aosp14/frameworks/base/libs/androidfw/include/androidfw/ |
H A D | Source.h | 31 std::string path; member 37 inline Source(android::StringPiece path) : path(path) { // NOLINT(implicit) in Source() 40 inline Source(android::StringPiece path, android::StringPiece archive) in Source() 41 : path(path), archive(archive) { in Source() 44 inline Source(android::StringPiece path, size_t line) : path(path), line(line) { in Source() 48 return Source(path, line); in WithLine() 52 std::string s = path; in to_string() 72 return lhs.path == rhs.path && lhs.line == rhs.line; 76 int cmp = lhs.path.compare(rhs.path);
|
H A D | AssetManager.h | 94 bool addAssetPath(const String8& path, int32_t* cookie, 96 bool addOverlayPath(const String8& path, int32_t* cookie); 222 String8 path; member 233 asset_path& path); 238 ZipFileRO* getZipFileLocked(asset_path& path); 283 SharedZip(const String8& path, time_t modWhen); 284 SharedZip(int fd, const String8& path); 316 ZipFileRO* getZip(const String8& path); 320 Asset* getZipResourceTableAsset(const String8& path); 323 ResTable* getZipResourceTable(const String8& path); [all …]
|
/aosp14/frameworks/base/libs/androidfw/ |
H A D | AssetsProvider.cpp | 33 return OpenInternal(path, mode, file_exists); in Open() 43 return CreateAssetFromFd(std::move(fd), path.c_str()); in CreateAssetFromFile() 56 LOG(ERROR) << "Failed to get size of file '" << ((path) ? path : "anon") << "': " in CreateAssetFromFd() 64 LOG(ERROR) << "Failed to mmap file '" << ((path != nullptr) ? path : "anon") << "': " in CreateAssetFromFd() 91 name_(std::move(path)), in ZipAssetsProvider() 109 if (!isReadonlyFilesystem(path.c_str())) { in Create() 303 const int result = stat(path.c_str(), &sb); in Create() 314 if (path.back() != OS_PATH_SEPARATOR) { in Create() 315 path += OS_PATH_SEPARATOR; in Create() 326 const std::string resolved_path = dir_ + path; in OpenInternal() [all …]
|
H A D | AssetManager.cpp | 90 String8 path(root); in idmapPathForPackagePath() local 108 path.append("@idmap"); in idmapPathForPackagePath() 110 return path; in idmapPathForPackagePath() 182 String8 realPath(path); in addAssetPath() 188 ap.path = realPath; in addAssetPath() 190 ap.path = path; in addAssetPath() 201 if (mAssetPaths[i].path == ap.path) { in addAssetPath() 369 String8 path(root); in addDefaultAssets() local 791 String8 path(ap.path); in openNonAssetInPathLocked() local 855 String8 path(ap.path); in createPathNameLocked() local [all …]
|
/aosp14/frameworks/base/packages/SystemUI/scripts/token_alignment/helpers/ |
H A D | FileIO.ts | 30 public loadXML = async (path: string): Promise<XMLDocument> => { 32 const src = await this.loadFileAsText(path); 42 return await fs.readFile(path, { encoding: 'utf8' }); 44 console.log(`Failed to read file '${path}'.`, error); 49 public saveFile = async (data: string, path: string) => { 51 await fs.writeFile(path, data, { encoding: 'utf8' }); 52 this.saved.push(path); 55 console.log(`Failed to write file '${path}'.`); 61 const src = await this.loadFileAsText(path); 67 console.log(`Failed to parse JSON file '${path}'.`); [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/os/ |
H A D | SystemServerClassLoaderFactory.java | 42 /* package */ static PathClassLoader createClassLoader(String path, ClassLoader parent) { in createClassLoader() argument 43 if (sLoadedPaths.containsKey(path)) { in createClassLoader() 44 throw new IllegalStateException("A ClassLoader for " + path + " already exists"); in createClassLoader() 47 path, /*librarySearchPath=*/null, /*libraryPermittedPath=*/null, parent, in createClassLoader() 49 sLoadedPaths.put(path, pathClassLoader); in createClassLoader() 63 String path, ClassLoader parent, boolean isTestOnly) { in getOrCreateClassLoader() argument 64 PathClassLoader pathClassLoader = sLoadedPaths.get(path); in getOrCreateClassLoader() 68 if (!allowClassLoaderCreation(path, isTestOnly)) { in getOrCreateClassLoader() 75 return createClassLoader(path, parent); in getOrCreateClassLoader() 81 private static boolean allowClassLoaderCreation(String path, boolean isTestOnly) { in allowClassLoaderCreation() argument [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/os/storage/ |
H A D | StorageManagerBaseTest.java | 90 mOfficialPath = path; in onObbStateChange() 207 File inFile = new File(path, fileName); in openFileOnMountedObb() 488 String path = null; in doWaitForPath() local 492 while (path == null) { in doWaitForPath() 505 return path; in doWaitForPath() 516 String path = null; in verifyObb1Contents() local 517 path = doWaitForPath(filePath); in verifyObb1Contents() 533 String path = null; in verifyObb2Contents() local 534 path = doWaitForPath(filename); in verifyObb2Contents() 549 String path = null; in verifyObb3Contents() local [all …]
|
/aosp14/frameworks/base/tools/aapt2/util/ |
H A D | Files.cpp | 71 int result = stat(path.c_str(), &sb); 104 bool mkdirs(const std::string& path) { in mkdirs() argument 109 if (util::StartsWith(path, R"(\\?\)")) { in mkdirs() 115 if (path.size() >= 3 && path[current_pos + 1] == ':' && in mkdirs() 116 (path[current_pos + 2] == '\\' || path[current_pos + 2] == '/')) { in mkdirs() 142 StringPiece GetStem(StringPiece path) { in GetStem() argument 143 const char* start = path.begin(); in GetStem() 144 const char* end = path.end(); in GetStem() 154 const char* end = path.end(); in GetFilename() 155 const char* last_dir_sep = path.begin(); in GetFilename() [all …]
|
/aosp14/system/core/libprocessgroup/ |
H A D | processgroup.cpp | 70 if (path) { in CgroupGetControllerPath() 71 *path = controller.path(); in CgroupGetControllerPath() 84 if (path) { in CgroupGetMemcgAppsPath() 85 *path = controller.path(); in CgroupGetMemcgAppsPath() 87 *path += "/apps"; in CgroupGetMemcgAppsPath() 116 if (path) { in CgroupGetAttributePath() 117 *path = StringPrintf("%s/%s", attr->controller()->path(), attr->file_name().c_str()); in CgroupGetAttributePath() 274 std::string path, memcg_apps_path; in removeAllProcessGroupsInternal() local 277 cgroups.push_back(path); in removeAllProcessGroupsInternal() 365 rmdir(path.c_str()); in MkdirAndChown() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/scripts/ |
H A D | new_merge.py | 14 def executable(path): argument 15 return os.path.isfile(path) and os.access(path, os.X_OK) 17 path, file = os.path.split(program) 18 if path and executable(program): 22 exe = os.path.join(path, program) 98 path = line.rstrip() 99 file = path[path.rfind('/') + 1:] 113 if (os.path.exists(TEMP_FILE1)): 116 if (os.path.exists(TEMP_FILE2)): 124 f = os.path.join(root,file) [all …]
|
/aosp14/frameworks/base/drm/java/android/drm/ |
H A D | DrmManagerClient.java | 399 if (null == path || path.equals("") || !DrmStore.Action.isValid(action)) { in getConstraints() 414 if (null == path || path.equals("")) { in getMetadata() 501 if ((null == path || path.equals("")) && (null == mimeType || mimeType.equals(""))) { in canHandle() 588 if ((null == path || path.equals("")) && (null == mimeType || mimeType.equals(""))) { in getDrmObjectType() 608 String path = ""; in getDrmObjectType() local 626 if (null == path || path.equals("")) { in getOriginalMimeType() 702 if (null == path || path.equals("") || !DrmStore.Action.isValid(action)) { in checkRightsStatus() 732 if (null == path || path.equals("")) { in removeRights() 856 String path = null; in convertUriToPath() local 861 path = uri.getPath(); in convertUriToPath() [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/app/servertransaction/ |
H A D | TransactionExecutorTests.java | 104 path(ON_STOP)); in testLifecycleFromPreOnCreate() 106 path(ON_DESTROY)); in testLifecycleFromPreOnCreate() 118 path(ON_DESTROY)); in testLifecycleFromOnCreate() 125 path(ON_CREATE)); in testLifecycleFromOnStart() 174 path(ON_STOP)); in testLifecycleFromOnDestroy() 195 path(ON_CREATE); in testLifecycleUndefinedStartState() 201 path(UNDEFINED); in testLifecycleUndefinedFinishState() 207 path(PRE_ON_CREATE); in testLifecycleInvalidPreOnCreateFinishState() 213 path(ON_RESUME); in testLifecycleInvalidOnRestartStartState() 219 path(ON_RESTART); in testLifecycleInvalidOnRestartFinishState() [all …]
|
/aosp14/frameworks/base/tools/aapt2/cmd/ |
H A D | Convert.cpp | 125 if (!SerializeXml(xml.get(), *file->path, false /*utf16*/, writer, in SerializeFile() 188 if (!SerializeXml(xml.get(), *file->path, false /*utf16*/, writer, in SerializeFile() 313 if (files_written.insert(*file->path).second) { in Convert() 338 std::string path = file->GetSource().path; in Convert() local 341 if (path == kAndroidManifestPath || in Convert() 342 path == kApkResourceTablePath || in Convert() 343 path == kProtoResourceTablePath || in Convert() 344 path.find("res/") == 0) { in Convert() 373 context->GetDiagnostics()->Error(android::DiagMessage(path) in ExtractResourceConfig() 391 StringPiece path = args[0]; in Action() local [all …]
|