Home
last modified time | relevance | path

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

12345678910>>...51

/frameworks/native/cmds/installd/
Drestorable_file.cpp34 std::string GetTmpFilePath(const std::string& path) { in GetTmpFilePath() argument
35 return android::base::StringPrintf("%s%s", path.c_str(), kTmpFileSuffix); in GetTmpFilePath()
38 std::string GetBackupFilePath(const std::string& path) { in GetBackupFilePath() argument
39 return android::base::StringPrintf("%s%s", path.c_str(), kBackupFileSuffix); in GetBackupFilePath()
42 void UnlinkPossiblyNonExistingFile(const std::string& path) { in UnlinkPossiblyNonExistingFile() argument
43 if (unlink(path.c_str()) < 0) { in UnlinkPossiblyNonExistingFile()
45 PLOG(ERROR) << "Cannot unlink: " << path; in UnlinkPossiblyNonExistingFile()
51 bool FileExists(const std::string& path) { in FileExists() argument
53 return ::stat(path.c_str(), &st) == 0; in FileExists()
63 RestorableFile::RestorableFile(int value, const std::string& path) : unique_file_(value, path) { in RestorableFile() argument
[all …]
/frameworks/base/services/incremental/
Dpath.cpp34 namespace android::incremental::path { namespace
47 static void preparePathComponent(std::string_view& path, bool trimAll) { in preparePathComponent() argument
49 while (!path.empty() && path.front() == '/' && in preparePathComponent()
50 (trimAll || (path.size() > 1 && path[1] == '/'))) { in preparePathComponent()
51 path.remove_prefix(1); in preparePathComponent()
54 while (path.size() > !trimAll && path.back() == '/') { in preparePathComponent()
55 path.remove_suffix(1); in preparePathComponent()
59 void details::append_next_path(std::string& target, std::string_view path) { in append_next_path() argument
60 preparePathComponent(path, !target.empty()); in append_next_path()
61 if (path.empty()) { in append_next_path()
[all …]
/frameworks/base/libs/androidfw/tests/
DApkParsing_test.cpp29 const char* path = "lib/arm64-v8a/library.so"; in TEST() local
30 auto lastSlash = util::ValidLibraryPathLastSlash(path, false, false); in TEST()
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
43 auto lastSlash = util::ValidLibraryPathLastSlash(path, false, false); in TEST()
45 ASSERT_THAT(lastSlash, Eq(path + 15)); in TEST()
49 const char* path = "lib/arm64-v8a/random.so"; in TEST() local
50 auto lastSlash = util::ValidLibraryPathLastSlash(path, false, false); in TEST()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/
DPathPerfTest.java37 Path path = new Path(); in testReset() local
39 path.reset(); in testReset()
46 Path path = new Path(); in testAddReset() local
48 path.addRect(0, 0, 100, 100, Path.Direction.CW); in testAddReset()
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
67 path.addRect(0, 0, 100, 100, Path.Direction.CW); in testAddRewind()
68 path.rewind(); in testAddRewind()
[all …]
/frameworks/rs/
Dbuild_rs.py28 THIS_DIR = os.path.realpath(os.path.dirname(__file__))
33 out_dir = os.path.realpath(os.path.join(THIS_DIR, '../..', *args))
42 if not os.path.isabs(top_out):
43 top_out = os.path.realpath(top_out)
44 out_dir = os.path.join(top_out, *args)
104 install_dir = os.path.join(install_host_dir, package_name)
108 if os.path.exists(install_host_dir):
114 package_path = os.path.join(dist_dir, tarball_name) + '.tar.bz2'
143 lib_path = os.path.join(mingw_dir, 'x86_64-w64-mingw32/lib32', lib_name)
145 lib_install = os.path.join(install_dir, 'bin', lib_name)
[all …]
/frameworks/base/services/incremental/test/
Dpath_test.cpp23 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()
51 EXPECT_STREQ("/", path::join("/", "/", "/", "/", "/", "/", "/", "/", "/", "/").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()
[all …]
/frameworks/base/tests/graphics/HwAccelerationTest/src/com/android/test/hwui/
DPathsCacheActivity.java50 Path path = new Path(); in makePath() local
51 buildPath(path); in makePath()
52 return path; in makePath()
55 private static void buildPath(Path path) { in buildPath() argument
56 path.moveTo(0.0f, 0.0f); in buildPath()
57 path.cubicTo(0.0f, 0.0f, 100.0f, 150.0f, 100.0f, 200.0f); in buildPath()
58 path.cubicTo(100.0f, 200.0f, 50.0f, 300.0f, -80.0f, 200.0f); in buildPath()
59 path.cubicTo(-80.0f, 200.0f, 100.0f, 200.0f, 200.0f, 0.0f); in buildPath()
63 Path path = new Path(); in makeLargePath() local
64 buildLargePath(path); in makeLargePath()
[all …]
DPathDestructionActivity.java67 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
88 path = getRandomPath(); in onDraw()
90 canvas.drawPath(path, strokePaint); in onDraw()
[all …]
/frameworks/av/media/libmedia/
DMediaScanner.cpp69 char * path = strtok(skipList, ","); in loadSkipList() local
71 while (path) { in loadSkipList()
72 mSkipIndex[i++] = strlen(path); in loadSkipList()
73 path = strtok(NULL, ","); in loadSkipList()
82 const char *path, MediaScannerClient &client) { in processDirectory() argument
83 int pathLength = strlen(path); in processDirectory()
93 strcpy(pathBuffer, path); in processDirectory()
109 bool MediaScanner::shouldSkipDirectory(char *path) { in shouldSkipDirectory() argument
110 if (path && mSkipList && mSkipIndex) { in shouldSkipDirectory()
111 int len = strlen(path); in shouldSkipDirectory()
[all …]
/frameworks/base/libs/androidfw/include/androidfw/
DSource.h31 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);
DAssetManager.h94 bool addAssetPath(const String8& path, int32_t* cookie,
96 bool addOverlayPath(const String8& path, int32_t* cookie);
220 asset_path() : path(""), rawFd(-1), type(kFileTypeRegular), idmap(""), in asset_path()
222 String8 path; member
233 asset_path& path);
234 String8 createPathNameLocked(const asset_path& path, const char* rootDir);
238 ZipFileRO* getZipFileLocked(asset_path& path);
244 const asset_path& path, const char* rootDir, const char* dirName);
245 SortedVector<AssetDir::FileInfo>* scanDirLocked(const String8& path);
247 const asset_path& path, const char* rootDir, const char* dirName);
[all …]
/frameworks/base/libs/androidfw/
DAssetsProvider.cpp31 std::unique_ptr<Asset> AssetsProvider::Open(const std::string& path, Asset::AccessMode mode, in Open() argument
33 return OpenInternal(path, mode, file_exists); in Open()
36 std::unique_ptr<Asset> AssetsProvider::CreateAssetFromFile(const std::string& path) { in CreateAssetFromFile() argument
37 base::unique_fd fd(base::utf8::open(path.c_str(), O_RDONLY | O_CLOEXEC)); in CreateAssetFromFile()
39 LOG(ERROR) << "Failed to open file '" << path << "': " << base::SystemErrorCodeToString(errno); in CreateAssetFromFile()
43 return CreateAssetFromFd(std::move(fd), path.c_str()); in CreateAssetFromFile()
47 const char* path, in CreateAssetFromFd() argument
56 LOG(ERROR) << "Failed to get size of file '" << ((path) ? path : "anon") << "': " in CreateAssetFromFd()
63 if (!file_map.Create(fd, offset, static_cast<size_t>(length), path)) { in CreateAssetFromFd()
64 LOG(ERROR) << "Failed to mmap file '" << ((path != nullptr) ? path : "anon") << "': " in CreateAssetFromFd()
[all …]
DAssetManager.cpp91 String8 path(root); in idmapPathForPackagePath() local
92 appendPath(path, kResourceCache); in idmapPathForPackagePath()
108 appendPath(path, filename); in idmapPathForPackagePath()
109 path.append("@idmap"); in idmapPathForPackagePath()
111 return path; in idmapPathForPackagePath()
178 const String8& path, int32_t* cookie, bool appAsLib, bool isSystemAsset) { in addAssetPath() argument
183 String8 realPath(path); in addAssetPath()
189 ap.path = realPath; in addAssetPath()
191 ap.path = path; in addAssetPath()
192 ap.type = ::getFileType(path.c_str()); in addAssetPath()
[all …]
/frameworks/base/packages/SystemUI/scripts/token_alignment/helpers/
DFileIO.ts30 public loadXML = async (path: string): Promise<XMLDocument> => {
32 const src = await this.loadFileAsText(path);
35 console.log(`Failed to parse XML file '${path}'.`, error);
40 public loadFileAsText = async (path: string): Promise<string> => {
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}'.`);
[all …]
/frameworks/base/core/java/com/android/internal/os/
DSystemServerClassLoaderFactory.java42 /* 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()
69 throw new RuntimeException("Creating a ClassLoader from " + path + " is not allowed. " in getOrCreateClassLoader()
75 return createClassLoader(path, parent); in getOrCreateClassLoader()
[all …]
/frameworks/base/packages/ExternalStorageProvider/tests/src/com/android/externalstorage/
DExternalStorageProviderTest.java78 final String path = "abc/def/ghi"; in test_getPathFromDocId() local
79 String docId = root + ":" + path; in test_getPathFromDocId()
80 assertEquals(getPathFromDocId(docId), path); in test_getPathFromDocId() local
82 docId = root + ":" + path + "/"; in test_getPathFromDocId()
83 assertEquals(getPathFromDocId(docId), path); in test_getPathFromDocId() local
88 docId = root + ":./" + path; in test_getPathFromDocId()
89 assertEquals(getPathFromDocId(docId), path); in test_getPathFromDocId() local
93 assertEquals(getPathFromDocId(docId), path); in test_getPathFromDocId() local
97 assertEquals(getPathFromDocId(docId), path); in test_getPathFromDocId() local
125 for (String path : shouldHide) { in test_shouldHideDocument()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/storage/
DStorageManagerBaseTest.java84 public void onObbStateChange(String path, int state) { in onObbStateChange() argument
88 Log.i(LOG_TAG, "OfficialPath is now: " + path); in onObbStateChange()
90 mOfficialPath = path; in onObbStateChange()
204 String path = mSm.getMountedObbPath(obbPath); in openFileOnMountedObb() local
205 assertTrue("Path should not be null!", path != null); in openFileOnMountedObb()
207 File inFile = new File(path, fileName); in openFileOnMountedObb()
211 Log.i(LOG_TAG, "Opened file: " + fileName + " for read at path: " + path); in openFileOnMountedObb()
391 protected void doValidateIntContents(String path, String filename, int start, int end) { in doValidateIntContents() argument
392 File inFile = new File(path, filename); in doValidateIntContents()
394 Log.i(LOG_TAG, "Validating file " + filename + " at " + path); in doValidateIntContents()
[all …]
/frameworks/compile/mclinker/lib/Script/
DGroupCmd.cpp95 sys::fs::Path path; in activate() local
101 path = script.sysroot(); in activate()
102 path.append(token->name()); in activate()
105 path.assign(token->name()); in activate()
106 if (!sys::fs::exists(path)) { in activate()
111 path = *p; in activate()
115 if (!sys::fs::exists(path)) in activate()
116 fatal(diag::err_cannot_open_input) << path.filename() << path; in activate()
119 path.filename().native(), path, Input::Unknown); in activate()
123 const sys::fs::Path* path = NULL; in activate() local
[all …]
/frameworks/base/packages/SystemUI/scripts/
Dnew_merge.py14 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):
21 for path in os.environ["PATH"].split(os.pathsep):
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)):
[all …]
/frameworks/base/tools/aapt2/util/
DFiles.cpp50 FileType GetFileType(const std::string& path) { in GetFileType() argument
52 if (!::android::base::UTF8PathToWindowsLongPath(path.c_str(), &path_utf16)) { in GetFileType()
69 FileType GetFileType(const std::string& path) {
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()
127 while ((current_pos = path.find(sDirSep, current_pos)) != std::string::npos) { in mkdirs()
128 std::string parent_path = path.substr(0, current_pos); in mkdirs()
[all …]
/frameworks/av/media/mtp/
DMtpUtils.cpp39 static void access_ok(const char *path) { in access_ok() argument
40 if (access(path, F_OK) == -1) { in access_ok()
101 int makeFolder(const char *path) { in makeFolder() argument
103 int ret = mkdir((const char *)path, DIR_PERM); in makeFolder()
106 PLOG(ERROR) << "Failed to create folder " << path; in makeFolder()
109 chown((const char *)path, getuid(), FILE_GROUP); in makeFolder()
111 access_ok(path); in makeFolder()
197 void deleteRecursive(const char* path) { in deleteRecursive() argument
198 string pathStr(path); in deleteRecursive()
203 DIR* dir = opendir(path); in deleteRecursive()
[all …]
/frameworks/base/drm/java/android/drm/
DDrmManagerClient.java398 public ContentValues getConstraints(String path, int action) { in getConstraints() argument
399 if (null == path || path.equals("") || !DrmStore.Action.isValid(action)) { in getConstraints()
402 return _getConstraints(mUniqueId, path, action); in getConstraints()
413 public ContentValues getMetadata(String path) { in getMetadata() argument
414 if (null == path || path.equals("")) { in getMetadata()
417 return _getMetadata(mUniqueId, path); in getMetadata()
500 public boolean canHandle(String path, String mimeType) { in canHandle() argument
501 if ((null == path || path.equals("")) && (null == mimeType || mimeType.equals(""))) { in canHandle()
504 return _canHandle(mUniqueId, path, mimeType); in canHandle()
587 public int getDrmObjectType(String path, String mimeType) { in getDrmObjectType() argument
[all …]
/frameworks/native/libs/binder/tests/
DFileUtils.cpp67 static std::filesystem::path GetExecutablePath2() { in GetExecutablePath2()
71 char path[PATH_MAX + 1]; in GetExecutablePath2()
72 uint32_t path_len = sizeof(path); in GetExecutablePath2()
73 int rc = _NSGetExecutablePath(path, &path_len); in GetExecutablePath2()
79 return path; in GetExecutablePath2()
81 char path[PATH_MAX + 1]; in GetExecutablePath2()
82 DWORD result = GetModuleFileName(NULL, path, sizeof(path) - 1); in GetExecutablePath2()
83 if (result == 0 || result == sizeof(path) - 1) return ""; in GetExecutablePath2()
84 path[PATH_MAX - 1] = 0; in GetExecutablePath2()
85 return path; in GetExecutablePath2()
/frameworks/compile/mclinker/lib/MC/
DSearchDirs.cpp52 if (exists(dir->path()) && is_directory(dir->path())) { in insert()
98 if (file == entry.path()->filename().native()) in find()
99 return entry.path(); in find()
106 if (file == entry.path()->stem().native()) { in find()
108 entry.path()->extension().native()) { in find()
109 return entry.path(); in find()
120 if (file == entry.path()->stem().native() && in find()
122 entry.path()->extension().native()) { in find()
123 return entry.path(); in find()
163 if (file == entry.path()->filename().native()) in find()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/
DBubblePopupDrawable.kt73 private val path = Path() in <lambda>() constant in com.android.wm.shell.common.bubbles.BubblePopupDrawable
85 canvas.drawPath(path, paint) in <lambda>()
109 outline.setPath(path) in <lambda>()
141 path.reset() in <lambda>()
147 addRoundedArrowPositioned(path, arrowPosition) in <lambda>()
155 path.transform(matrix) in <lambda>()
157 addRoundedArrowPositioned(path, arrowPosition) in <lambda>()
160 path.transform(matrix) in <lambda>()
166 path.addRoundRect(contentRect, config.cornerRadius, config.cornerRadius, Path.Direction.CW) in <lambda>()
170 private fun addRoundedArrowPositioned(path: Path, position: ArrowPosition) { in <lambda>()
[all …]

12345678910>>...51