/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | ProcFileReaderTest.java | 31 final ProcFileReader reader = buildReader(""); in testEmpty() local 33 assertFalse(reader.hasMoreData()); in testEmpty() 35 reader.finishLine(); in testEmpty() 40 assertFalse(reader.hasMoreData()); in testEmpty() 44 final ProcFileReader reader = buildReader("a\nb\nc\n"); in testSingleString() local 46 assertEquals("a", reader.nextString()); in testSingleString() 47 reader.finishLine(); in testSingleString() 48 assertTrue(reader.hasMoreData()); in testSingleString() 50 assertEquals("b", reader.nextString()); in testSingleString() 51 reader.finishLine(); in testSingleString() [all …]
|
D | FileRotatorTest.java | 79 final RecordingReader reader = new RecordingReader(); in testEmpty() local 83 rotate1.combineActive(reader, writer("foo"), currentTime); in testEmpty() 84 reader.assertRead(); in testEmpty() 95 final RecordingReader reader = new RecordingReader(); in testCombine() local 99 rotate.combineActive(reader, writer("foo"), currentTime); in testCombine() 100 reader.assertRead(); in testCombine() 106 reader.reset(); in testCombine() 107 rotate.combineActive(reader, writer("bar"), currentTime); in testCombine() 108 reader.assertRead("foo"); in testCombine() 116 final RecordingReader reader = new RecordingReader(); in testRotate() local [all …]
|
/frameworks/av/media/libstagefright/ |
D | HevcUtils.cpp | 158 NALBitReader reader(data, size); in parseVps() local 160 reader.skipBits(4); in parseVps() 162 reader.skipBits(1); in parseVps() 164 reader.skipBits(1); in parseVps() 166 reader.skipBits(6); in parseVps() 168 reader.skipBits(3); in parseVps() 170 reader.skipBits(1); in parseVps() 172 reader.skipBits(16); in parseVps() 174 if (reader.atLeastNumBitsLeft(96)) { in parseVps() 175 mParams.add(kGeneralProfileSpace, reader.getBits(2)); in parseVps() [all …]
|
/frameworks/base/libs/androidfw/tests/ |
D | BackupData_test.cpp | 85 BackupDataReader* reader = new BackupDataReader(fd); in TEST_F() local 86 EXPECT_EQ(NO_ERROR, reader->Status()) in TEST_F() 91 reader->ReadNextHeader(&done, &type); in TEST_F() 97 EXPECT_EQ(NO_ERROR, reader->ReadEntityHeader(&key, &dataSize)) in TEST_F() 105 EXPECT_EQ((int) dataSize, reader->ReadEntityData(dataBytes, dataSize)) in TEST_F() 113 delete reader; in TEST_F() 126 BackupDataReader* reader = new BackupDataReader(fd); in TEST_F() local 134 reader->ReadNextHeader(&done, &type); in TEST_F() 135 reader->ReadEntityHeader(&key, &dataSize); in TEST_F() 137 reader->ReadEntityData(dataBytes, dataSize); in TEST_F() [all …]
|
/frameworks/base/packages/StatementService/src/com/android/statementservice/retriever/ |
D | JsonParser.java | 41 public static JSONObject parse(JsonReader reader) throws IOException, JSONException { in parse() argument 45 reader.beginObject(); in parse() 46 while (reader.hasNext()) { in parse() 47 String fieldName = reader.nextName(); in parse() 51 reader.skipValue(); in parse() 55 JsonToken token = reader.peek(); in parse() 57 output.put(fieldName, new JSONArray(parseArray(reader))); in parse() 59 output.put(fieldName, reader.nextString()); in parse() 62 output.put(fieldName, parse(reader)); in parse() 67 reader.skipValue(); in parse() [all …]
|
D | StatementParser.java | 46 JsonReader reader = new JsonReader(new StringReader(statementList)); in parseStatementList() local 47 reader.setLenient(false); in parseStatementList() 49 reader.beginArray(); in parseStatementList() 50 while (reader.hasNext()) { in parseStatementList() 53 result = parseStatement(reader, source); in parseStatementList() 61 reader.endArray(); in parseStatementList() 71 JsonReader reader = new JsonReader(new StringReader(statementString)); in parseStatement() local 72 reader.setLenient(false); in parseStatement() 73 return parseStatement(reader, source); in parseStatement() 80 static ParsedStatement parseStatement(JsonReader reader, AbstractAsset source) in parseStatement() argument [all …]
|
/frameworks/av/media/ndk/include/media/ |
D | NdkImageReader.h | 96 /*out*/AImageReader** reader) __INTRODUCED_IN(24); 110 void AImageReader_delete(AImageReader* reader) __INTRODUCED_IN(24); 126 media_status_t AImageReader_getWindow(AImageReader* reader, /*out*/ANativeWindow** window) __INTROD… 144 media_status_t AImageReader_getWidth(const AImageReader* reader, /*out*/int32_t* width) __INTRODUCE… 162 media_status_t AImageReader_getHeight(const AImageReader* reader, /*out*/int32_t* height) __INTRODU… 177 media_status_t AImageReader_getFormat(const AImageReader* reader, /*out*/int32_t* format) __INTRODU… 192 media_status_t AImageReader_getMaxImages(const AImageReader* reader, /*out*/int32_t* maxImages) __I… 230 media_status_t AImageReader_acquireNextImage(AImageReader* reader, /*out*/AImage** image) __INTRODU… 275 media_status_t AImageReader_acquireLatestImage(AImageReader* reader, /*out*/AImage** image) __INTRO… 285 typedef void (*AImageReader_ImageCallback)(void* context, AImageReader* reader); [all …]
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkStatsFactory.java | 204 ProcFileReader reader = null; in readNetworkStatsSummaryDev() local 206 reader = new ProcFileReader(new FileInputStream(mStatsXtIfaceAll)); in readNetworkStatsSummaryDev() 208 while (reader.hasMoreData()) { in readNetworkStatsSummaryDev() 209 entry.iface = reader.nextString(); in readNetworkStatsSummaryDev() 214 final boolean active = reader.nextInt() != 0; in readNetworkStatsSummaryDev() 217 entry.rxBytes = reader.nextLong(); in readNetworkStatsSummaryDev() 218 entry.rxPackets = reader.nextLong(); in readNetworkStatsSummaryDev() 219 entry.txBytes = reader.nextLong(); in readNetworkStatsSummaryDev() 220 entry.txPackets = reader.nextLong(); in readNetworkStatsSummaryDev() 224 entry.rxBytes += reader.nextLong(); in readNetworkStatsSummaryDev() [all …]
|
/frameworks/av/media/ndk/ |
D | NdkImageReader.cpp | 116 sp<AImageReader> reader = mReader.promote(); in onFrameAvailable() local 117 if (reader == nullptr) { in onFrameAvailable() 126 sp<AMessage> msg = new AMessage(AImageReader::kWhatImageAvailable, reader->mHandler); in onFrameAvailable() 146 sp<AImageReader> reader = mReader.promote(); in onBufferFreed() local 147 if (reader == nullptr) { in onBufferFreed() 162 sp<AMessage> msg = new AMessage(AImageReader::kWhatBufferRemoved, reader->mHandler); in onBufferFreed() 678 /*out*/AImageReader** reader) { in AImageReader_new() argument 681 width, height, format, AHARDWAREBUFFER_USAGE_CPU_READ_OFTEN, maxImages, reader); in AImageReader_new() 688 AImageReader *reader, /*out*/native_handle_t **handle) { in AImageReader_getWindowNativeHandle() argument 689 if (reader == nullptr || handle == nullptr) { in AImageReader_getWindowNativeHandle() [all …]
|
/frameworks/native/libs/vr/libpdx/private/pdx/rpc/ |
D | serialization.h | 1089 inline ErrorType ReadRawDataFromNextSection(void* dest, MessageReader* reader, 1099 reader->ConsumeReadBufferSectionData(AdvancePointer(start, remaining_size)); 1100 std::tie(start, end) = reader->GetNextReadBufferSection(); 1131 inline ErrorType DeserializeRaw(T* value, MessageReader* reader, 1133 return ReadRawData(value, reader, start, end, sizeof(T)); 1140 ErrorType DeserializeValue(RealType* real_value, MessageReader* reader, 1144 DeserializeRaw(&serialized_value, reader, start, end)) { 1153 MessageReader* reader, const void*& start, 1155 return DeserializeRaw(encoding, reader, start, end); 1159 inline ErrorType DeserializeObject(bool* value, MessageReader* reader, [all …]
|
D | argument_encoder.h | 110 explicit ArgumentDecoder(MessageReader* reader) : reader_{reader} {} in ArgumentDecoder() argument 131 explicit ArgumentDecoder(MessageReader* reader) : reader_{reader} {} in ArgumentDecoder() argument 153 Return (*)(Args...), MessageReader* reader) { in MakeArgumentDecoder() argument 154 return ArgumentDecoder<Return(Args...)>(reader); in MakeArgumentDecoder() 161 Return (Class::*)(Args...), MessageReader* reader) { in MakeArgumentDecoder() argument 162 return ArgumentDecoder<Return(Args...)>(reader); in MakeArgumentDecoder() 169 Return (Class::*)(Args...) const, MessageReader* reader) { in MakeArgumentDecoder() argument 170 return ArgumentDecoder<Return(Args...)>(reader); in MakeArgumentDecoder() 176 inline ArgumentDecoder<Signature> MakeArgumentDecoder(MessageReader* reader) { in MakeArgumentDecoder() argument 177 return ArgumentDecoder<Signature>(reader); in MakeArgumentDecoder()
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
D | FrameType.java | 322 static FrameType tryMerge(FrameType writer, FrameType reader) { in tryMerge() argument 324 return reader; in tryMerge() 325 } else if (reader.mElementId == ELEMENT_DONTCARE) { in tryMerge() 327 } else if (writer.mElementId == ELEMENT_OBJECT && reader.mElementId == ELEMENT_OBJECT) { in tryMerge() 328 return tryMergeObjectTypes(writer, reader); in tryMerge() 329 } else if (writer.mDimensions > 0 && writer.mElementId == reader.mElementId) { in tryMerge() 330 return tryMergeBuffers(writer, reader); in tryMerge() 336 static FrameType tryMergeObjectTypes(FrameType writer, FrameType reader) { in tryMergeObjectTypes() argument 337 int dimensions = Math.max(writer.mDimensions, reader.mDimensions); in tryMergeObjectTypes() 338 Class<?> mergedClass = mergeClasses(writer.mClass, reader.mClass); in tryMergeObjectTypes() [all …]
|
/frameworks/base/cmds/incidentd/tests/ |
D | ProtoFileReader_test.cpp | 37 status_t read(sp<ProtoFileReader> reader, size_t size) { in read() argument 39 while (size > 0 && (buf = reader->readBuffer()) != nullptr) { in read() 40 size_t amt = reader->currentToRead(); in read() 44 reader->move(amt); in read() 78 sp<ProtoFileReader> reader = new ProtoFileReader(fd); in TEST() local 81 while (reader->hasNext()) { in TEST() 82 uint64_t fieldTag = reader->readRawVarint(); in TEST() 86 size_t sectionSize = reader->readRawVarint(); in TEST() 90 err = read(reader, sectionSize); in TEST()
|
D | FdBuffer_test.cpp | 53 sp<ProtoReader> reader = buffer.data()->read(); in AssertBufferContent() local 54 while (reader->hasNext()) { in AssertBufferContent() 55 ASSERT_EQ(reader->next(), expected[i++]); in AssertBufferContent() 95 sp<ProtoReader> reader = buffer.data()->read(); in TEST_F() local 96 EXPECT_FALSE(reader->hasNext()); in TEST_F() 105 sp<ProtoReader> reader = buffer.data()->read(); in TEST_F() local 107 while (reader->hasNext()) { in TEST_F() 108 EXPECT_EQ(reader->next(), (uint8_t)testdata[i++]); in TEST_F() 117 sp<ProtoReader> reader = buffer.data()->read(); in TEST_F() local 118 reader->move(buffer.size()); in TEST_F() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | ProcTimeInStateReaderTest.java | 61 ProcTimeInStateReader reader = new ProcTimeInStateReader(initialTimeInStateFile); in testSimple() local 66 reader.getFrequenciesKhz()); in testSimple() 70 reader.getUsageTimesMillis(initialTimeInStateFile)); in testSimple() 78 final ProcTimeInStateReader reader = new ProcTimeInStateReader(initialTimeInStateFile); in testHeaderFormat() local 83 reader.getFrequenciesKhz()); in testHeaderFormat() 87 reader.getUsageTimesMillis(initialTimeInStateFile)); in testHeaderFormat() 94 ProcTimeInStateReader reader = new ProcTimeInStateReader(initialTimeInStateFile); in testDifferentFile() local 101 reader.getUsageTimesMillis(timeInStateFile)); in testDifferentFile() 108 ProcTimeInStateReader reader = new ProcTimeInStateReader(initialTimeInStateFile); in testWrongLength() local 112 assertNull(reader.getUsageTimesMillis(timeInStateFile)); in testWrongLength()
|
D | MockBatteryStatsImpl.java | 103 public MockBatteryStatsImpl setKernelCpuUidFreqTimeReader(KernelCpuUidFreqTimeReader reader) { in setKernelCpuUidFreqTimeReader() argument 104 mCpuUidFreqTimeReader = reader; in setKernelCpuUidFreqTimeReader() 109 KernelCpuUidActiveTimeReader reader) { in setKernelCpuUidActiveTimeReader() argument 110 mCpuUidActiveTimeReader = reader; in setKernelCpuUidActiveTimeReader() 115 KernelCpuUidClusterTimeReader reader) { in setKernelCpuUidClusterTimeReader() argument 116 mCpuUidClusterTimeReader = reader; in setKernelCpuUidClusterTimeReader() 121 KernelCpuUidUserSysTimeReader reader) { in setKernelCpuUidUserSysTimeReader() argument 122 mCpuUidUserSysTimeReader = reader; in setKernelCpuUidUserSysTimeReader() 126 public MockBatteryStatsImpl setKernelSingleUidTimeReader(KernelSingleUidTimeReader reader) { in setKernelSingleUidTimeReader() argument 127 mKernelSingleUidTimeReader = reader; in setKernelSingleUidTimeReader()
|
/frameworks/base/core/java/android/util/ |
D | Xml.java | 55 XMLReader reader = XmlObjectFactory.newXMLReader(); in parse() local 56 reader.setContentHandler(contentHandler); in parse() 57 reader.parse(new InputSource(new StringReader(xml))); in parse() 69 XMLReader reader = XmlObjectFactory.newXMLReader(); in parse() local 70 reader.setContentHandler(contentHandler); in parse() 71 reader.parse(new InputSource(in)); in parse() 80 XMLReader reader = XmlObjectFactory.newXMLReader(); in parse() local 81 reader.setContentHandler(contentHandler); in parse() 84 reader.parse(source); in parse()
|
/frameworks/base/core/jni/ |
D | android_backup_BackupDataInput.cpp | 56 BackupDataReader* reader = (BackupDataReader*)r; in readNextHeader_native() local 60 err = reader->ReadNextHeader(&done, &type); in readNextHeader_native() 74 err = reader->ReadEntityHeader(&key, &dataSize); in readNextHeader_native() 97 BackupDataReader* reader = (BackupDataReader*)r; in readEntityData_native() local 109 err = reader->ReadEntityData(dataBytes+offset, size); in readEntityData_native() 120 BackupDataReader* reader = (BackupDataReader*)r; in skipEntityData_native() local 122 err = reader->SkipEntityData(); in skipEntityData_native()
|
/frameworks/base/tools/aapt2/format/ |
D | Container_test.cpp | 61 ContainerReader reader(&input); in TEST() local 62 ASSERT_FALSE(reader.HadError()); in TEST() 64 ContainerReaderEntry* entry = reader.Next(); in TEST() 75 entry = reader.Next(); in TEST() 85 EXPECT_THAT(reader.Next(), IsNull()); in TEST() 86 EXPECT_FALSE(reader.HadError()); in TEST() 87 EXPECT_THAT(reader.GetError(), IsEmpty()); in TEST()
|
/frameworks/base/cmds/incidentd/src/ |
D | PrivacyFilter.cpp | 221 sp<ProtoReader> reader = mData; in writeData() local 227 while (reader->readBuffer() != NULL) { in writeData() 228 err = WriteFully(fd, reader->readBuffer(), reader->currentToRead()) ? NO_ERROR : -errno; in writeData() 229 reader->move(reader->currentToRead()); in writeData() 339 sp<ProtoFileReader> reader = new ProtoFileReader(from); in filter_and_write_report() local 341 while (reader->hasNext()) { in filter_and_write_report() 342 uint64_t fieldTag = reader->readRawVarint(); in filter_and_write_report() 352 size_t sectionSize = reader->readRawVarint(); in filter_and_write_report() 354 err = sectionData.write(reader, sectionSize); in filter_and_write_report() 370 write_field_or_skip(NULL, reader, fieldTag, true); in filter_and_write_report() [all …]
|
/frameworks/base/libs/protoutil/src/ |
D | ProtoOutputStream.cpp | 469 sp<ProtoReader> reader = mBuffer->read(); in flush() local 470 while (reader->readBuffer() != NULL) { in flush() 471 if (!android::base::WriteFully(fd, reader->readBuffer(), reader->currentToRead())) { in flush() 474 reader->move(reader->currentToRead()); in flush() 485 sp<ProtoReader> reader = mBuffer->read(); in serializeToString() local 486 out->reserve(reader->size()); in serializeToString() 487 while (reader->hasNext()) { in serializeToString() 488 out->append(static_cast<const char*>(static_cast<const void*>(reader->readBuffer())), in serializeToString() 489 reader->currentToRead()); in serializeToString() 490 reader->move(reader->currentToRead()); in serializeToString() [all …]
|
/frameworks/base/cmds/statsd/tests/ |
D | FieldValue_test.cpp | 257 sp<ProtoReader> reader = protoOut.data(); in TEST() local 258 while (reader->readBuffer() != NULL) { in TEST() 259 size_t toRead = reader->currentToRead(); in TEST() 260 std::memcpy(&(outData[pos]), reader->readBuffer(), toRead); in TEST() 262 reader->move(toRead); in TEST() 348 sp<ProtoReader> reader = protoOut.data(); in TEST() local 349 while (reader->readBuffer() != NULL) { in TEST() 350 size_t toRead = reader->currentToRead(); in TEST() 351 std::memcpy(&(outData[pos]), reader->readBuffer(), toRead); in TEST() 353 reader->move(toRead); in TEST() [all …]
|
/frameworks/compile/mclinker/unittests/ |
D | ELFBinaryReaderTest.cpp | 46 ELFBinaryReader* reader = new ELFBinaryReader(builder, config); in TEST_F() local 52 ASSERT_TRUE(reader->isMyFormat(input, doContinue)); in TEST_F() 55 ASSERT_FALSE(reader->isMyFormat(input, doContinue)); in TEST_F() 57 delete reader; in TEST_F()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/ |
D | WifiConnectionTest.java | 91 BufferedReader reader = null; in loadConfigurations() local 93 reader = new BufferedReader(new FileReader(new File(WIFI_CONFIG_FILE))); in loadConfigurations() 96 while ((line = reader.readLine()) != null) { in loadConfigurations() 103 if (reader != null) { in loadConfigurations() 105 reader.close(); in loadConfigurations()
|
/frameworks/base/cmds/statsd/src/ |
D | stats_log_util.h | 83 sp<android::util::ProtoReader> reader = protoOutput.data(); in parseProtoOutputStream() local 84 while (reader->readBuffer() != NULL) { in parseProtoOutputStream() 85 size_t toRead = reader->currentToRead(); in parseProtoOutputStream() 86 pbBytes.append(reinterpret_cast<const char*>(reader->readBuffer()), toRead); in parseProtoOutputStream() 87 reader->move(toRead); in parseProtoOutputStream()
|