Home
last modified time | relevance | path

Searched refs:contents (Results 1 – 25 of 133) sorted by relevance

123456

/system/tools/aidl/tests/
Dfake_io_delegate.cpp47 unique_ptr<string> contents; in GetFileContents() local
50 return contents; in GetFileContents()
52 contents.reset(new string); in GetFileContents()
53 *contents = it->second; in GetFileContents()
54 contents->append(content_suffix); in GetFileContents()
56 return contents; in GetFileContents()
88 const string& contents) { in SetFileContents() argument
89 file_contents_[filename] = contents; in SetFileContents()
107 string contents; in AddStubParcelable() local
109 contents = StringPrintf("package %s;\nparcelable %s;", in AddStubParcelable()
[all …]
/system/core/libutils/
DSingleton_test2.cpp26 void singletonSetInstanceContents(unsigned int contents) { in singletonSetInstanceContents() argument
27 SingletonTestData::getInstance().contents = contents; in singletonSetInstanceContents()
31 return SingletonTestData::getInstance().contents; in singletonGetInstanceContents()
DSingleton_test1.cpp27 void singletonSetInstanceContents(unsigned int contents) { in singletonSetInstanceContents() argument
28 SingletonTestData::getInstance().contents = contents; in singletonSetInstanceContents()
32 return SingletonTestData::getInstance().contents; in singletonGetInstanceContents()
DTokenizer.cpp100 const char* contents, Tokenizer** outTokenizer) { in fromContents() argument
102 const_cast<char*>(contents), false, strlen(contents)); in fromContents()
/system/tools/hidl/docs/src/writer/files/
Dresources.kt32 val contents = input.bufferedReader().use { it.readText() } in readResourceText() constant
33 resourceCache[name] = contents in readResourceText()
34 contents in readResourceText()
39 val contents = readResourceText(resourceName) in copyToFile() constant
49 fp.bufferedWriter().use { it.write(contents) } in copyToFile()
/system/nvram/core/tests/
Dnvram_manager_test.cpp84 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
124 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
126 ASSERT_TRUE(space.contents.Resize(20)); in TEST_F()
169 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
205 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
224 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
277 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
450 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
471 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
488 ASSERT_TRUE(space.contents.Resize(10)); in TEST_F()
[all …]
/system/tools/aidl/
Dline_reader.cpp59 explicit MemoryLineReader(const string& contents) : input_stream_(contents) {} in MemoryLineReader() argument
86 unique_ptr<LineReader> LineReader::ReadFromMemory(const string& contents) { in ReadFromMemory() argument
87 return unique_ptr<LineReader>(new MemoryLineReader(contents)); in ReadFromMemory()
Dio_delegate.cpp88 unique_ptr<string> contents; in GetFileContents() local
91 return contents; in GetFileContents()
93 contents.reset(new string); in GetFileContents()
96 contents->resize(file_size + content_suffix.length()); in GetFileContents()
99 in.read(&(*contents)[0], file_size); in GetFileContents()
101 contents->replace(file_size, content_suffix.length(), content_suffix); in GetFileContents()
104 return contents; in GetFileContents()
/system/update_engine/common/
Daction_pipe.h61 const ObjectType& contents() const { return contents_; } in contents() function
65 void set_contents(const ObjectType& contents) { contents_ = contents; } in set_contents() argument
Daction.h193 return in_pipe_->contents(); in GetInputObject()
211 return out_pipe_->contents(); in GetOutputObject()
/system/core/init/
Dutil_test.cpp81 std::string contents("abcd"); in TEST() local
82 contents.push_back('\0'); in TEST()
83 contents.push_back('\0'); in TEST()
84 contents.append("dcba"); in TEST()
85 ASSERT_EQ(10u, contents.size()); in TEST()
89 EXPECT_TRUE(WriteFile(tf.path, contents)) << strerror(errno); in TEST()
93 EXPECT_EQ(contents, *read_back_contents); in TEST()
/system/core/debuggerd/libdebuggerd/test/
Dtombstone_test.cpp386 std::string contents; in TEST_F() local
388 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &contents)); in TEST_F()
458 EXPECT_EQ(expected, contents); in TEST_F()
472 std::string contents; in TEST_F() local
474 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &contents)); in TEST_F()
548 EXPECT_EQ(expected, contents); in TEST_F()
564 std::string contents; in TEST_F() local
566 ASSERT_TRUE(android::base::ReadFdToString(log_.tfd, &contents)); in TEST_F()
676 EXPECT_EQ(expected, contents); in TEST_F()
694 std::string contents; in TEST_F() local
[all …]
/system/nvram/core/
Dnvram_manager.cpp267 if (!space.contents.Resize(request.size)) { in CreateSpace()
271 memset(space.contents.data(), 0, request.size); in CreateSpace()
303 response->size = space_record.persistent.contents.size(); in GetSpaceInfo()
412 Blob& contents = space_record.persistent.contents; in WriteSpace() local
416 if (!sha256_input.Resize(contents.size() + request.buffer.size())) { in WriteSpace()
419 memcpy(sha256_input.data(), contents.data(), contents.size()); in WriteSpace()
420 memcpy(sha256_input.data() + contents.size(), request.buffer.data(), in WriteSpace()
424 crypto::SHA256(sha256_input.data(), sha256_input.size(), contents.data(), in WriteSpace()
425 contents.size()); in WriteSpace()
427 if (contents.size() < request.buffer.size()) { in WriteSpace()
[all …]
/system/tools/xsdc/tests/src/com/android/xsdc/tests/
DTestHelper.java40 private final String contents; field in TestHelper.InMemoryJavaFileObject
42 InMemoryJavaFileObject(String className, String contents) { in InMemoryJavaFileObject() argument
45 this.contents = contents; in InMemoryJavaFileObject()
50 return contents; in getCharContent()
/system/sepolicy/prebuilts/api/26.0/public/
Dhal_fingerprint.te8 # allow HAL module to read dir contents
11 # allow HAL module to read/write/unlink contents of this dir
Dfingerprintd.te12 # allow HAL module to read dir contents
15 # allow HAL module to read/write/unlink contents of this dir
/system/sepolicy/prebuilts/api/27.0/public/
Dhal_fingerprint.te8 # allow HAL module to read dir contents
11 # allow HAL module to read/write/unlink contents of this dir
Dfingerprintd.te12 # allow HAL module to read dir contents
15 # allow HAL module to read/write/unlink contents of this dir
/system/update_engine/
Dhardware_chromeos.cc220 string contents; in GetPowerwashCount() local
221 if (!utils::ReadFile(marker_path.value(), &contents)) in GetPowerwashCount()
223 base::TrimWhitespaceASCII(contents, base::TRIM_TRAILING, &contents); in GetPowerwashCount()
224 if (!base::StringToInt(contents, &powerwash_count)) in GetPowerwashCount()
/system/timezone/distro/core/src/main/com/android/timezone/distro/
DTimeZoneDistro.java84 byte[] contents = getEntryContents(inputStream, DISTRO_VERSION_FILE_NAME); in getDistroVersion()
85 if (contents == null) { in getDistroVersion()
88 return DistroVersion.fromBytes(contents); in getDistroVersion()
/system/timezone/distro/core/src/test/com/android/timezone/distro/
DFileUtilsTest.java243 byte[] contents = "One\nTwo\nThree\n".getBytes(StandardCharsets.US_ASCII); in testReadBytes()
244 File file = createFile(contents); in testReadBytes()
247 assertEquals(contents[0], oneByte[0]); in testReadBytes()
249 byte[] allBytes = FileUtils.readBytes(file, contents.length); in testReadBytes()
250 assertTrue(Arrays.equals(contents, allBytes)); in testReadBytes()
252 byte[] exhaustedFileRead = FileUtils.readBytes(file, contents.length + 1); in testReadBytes()
253 assertTrue(Arrays.equals(contents, exhaustedFileRead)); in testReadBytes()
293 private File createFile(byte[] contents) throws IOException { in createFile() argument
296 fos.write(contents); in createFile()
/system/sepolicy/public/
Dfingerprintd.te12 # allow HAL module to read dir contents
15 # allow HAL module to read/write/unlink contents of this dir
/system/sepolicy/prebuilts/api/29.0/public/
Dfingerprintd.te12 # allow HAL module to read dir contents
15 # allow HAL module to read/write/unlink contents of this dir
/system/sepolicy/prebuilts/api/28.0/public/
Dfingerprintd.te12 # allow HAL module to read dir contents
15 # allow HAL module to read/write/unlink contents of this dir
/system/netd/server/
DIptablesBaseTest.h44 static void addIptablesRestoreOutput(std::string contents) { in addIptablesRestoreOutput() argument
45 sIptablesRestoreOutput.push_back(contents); in addIptablesRestoreOutput()

123456