/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | ProcFileReaderTest.java | 44 final ProcFileReader reader = buildReader(""); in testEmpty() local 46 assertFalse(reader.hasMoreData()); in testEmpty() 48 reader.finishLine(); in testEmpty() 53 assertFalse(reader.hasMoreData()); in testEmpty() 58 final ProcFileReader reader = buildReader("a\nb\nc\n"); in testSingleString() local 60 assertEquals("a", reader.nextString()); in testSingleString() 61 reader.finishLine(); in testSingleString() 62 assertTrue(reader.hasMoreData()); in testSingleString() 64 assertEquals("b", reader.nextString()); in testSingleString() 65 reader.finishLine(); in testSingleString() [all …]
|
D | FileRotatorTest.java | 83 final RecordingReader reader = new RecordingReader(); in testEmpty() local 87 rotate1.combineActive(reader, writer("foo"), currentTime); in testEmpty() 88 reader.assertRead(); in testEmpty() 100 final RecordingReader reader = new RecordingReader(); in testCombine() local 104 rotate.combineActive(reader, writer("foo"), currentTime); in testCombine() 105 reader.assertRead(); in testCombine() 111 reader.reset(); in testCombine() 112 rotate.combineActive(reader, writer("bar"), currentTime); in testCombine() 113 reader.assertRead("foo"); in testCombine() 122 final RecordingReader reader = new RecordingReader(); in testRotate() local [all …]
|
/frameworks/av/media/libstagefright/ |
D | HevcUtils.cpp | 163 NALBitReader reader(data, size); in parseVps() local 165 reader.skipBits(4); in parseVps() 167 reader.skipBits(1); in parseVps() 169 reader.skipBits(1); in parseVps() 171 reader.skipBits(6); in parseVps() 173 reader.skipBits(3); in parseVps() 175 reader.skipBits(1); in parseVps() 177 reader.skipBits(16); in parseVps() 179 if (reader.atLeastNumBitsLeft(96)) { in parseVps() 180 mParams.add(kGeneralProfileSpace, reader.getBits(2)); in parseVps() [all …]
|
/frameworks/native/services/inputflinger/tests/fuzzers/ |
D | InputReaderFuzzer.cpp | 51 reader = std::make_unique<InputReader>(fuzzEventHub, fuzzPolicy, fuzzListener); in FuzzInputReader() 54 void dump(std::string& dump) { reader->dump(dump); } in dump() 56 void monitor() { reader->monitor(); } in monitor() 58 status_t start() { return reader->start(); } in start() 60 status_t stop() { return reader->stop(); } in stop() 62 std::vector<InputDeviceInfo> getInputDevices() const { return reader->getInputDevices(); } in getInputDevices() 65 return reader->getScanCodeState(deviceId, sourceMask, scanCode); in getScanCodeState() 69 return reader->getKeyCodeState(deviceId, sourceMask, keyCode); in getKeyCodeState() 73 return reader->getSwitchState(deviceId, sourceMask, sw); in getSwitchState() 76 void toggleCapsLockState(int32_t deviceId) { reader->toggleCapsLockState(deviceId); } in toggleCapsLockState() [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/minikin/tests/unittest/ |
D | BufferTest.cpp | 55 BufferReader reader(buffer.data()); in TEST() local 56 ASSERT_EQ(reader.current(), buffer.data()); in TEST() 57 ASSERT_EQ(reader.read<uint8_t>(), 0xABu); in TEST() 58 ASSERT_EQ(reader.current(), buffer.data() + 1u); in TEST() 59 ASSERT_EQ(reader.read<uint16_t>(), 0xCDEFu); in TEST() 60 ASSERT_EQ(reader.current(), buffer.data() + 4u); in TEST() 61 ASSERT_EQ(reader.read<uint8_t>(), 0x01u); in TEST() 62 ASSERT_EQ(reader.current(), buffer.data() + 5u); in TEST() 63 auto [uint32Array, size] = reader.readArray<uint32_t>(); in TEST() 67 ASSERT_EQ(reader.current(), buffer.data() + 20u); in TEST() [all …]
|
/frameworks/av/media/ndk/include/media/ |
D | NdkImageReader.h | 94 /*out*/AImageReader** reader) __INTRODUCED_IN(24); 108 void AImageReader_delete(AImageReader* reader) __INTRODUCED_IN(24); 124 media_status_t AImageReader_getWindow(AImageReader* reader, /*out*/ANativeWindow** window) __INTROD… 142 media_status_t AImageReader_getWidth(const AImageReader* reader, /*out*/int32_t* width) __INTRODUCE… 160 media_status_t AImageReader_getHeight(const AImageReader* reader, /*out*/int32_t* height) __INTRODU… 175 media_status_t AImageReader_getFormat(const AImageReader* reader, /*out*/int32_t* format) __INTRODU… 190 media_status_t AImageReader_getMaxImages(const AImageReader* reader, /*out*/int32_t* maxImages) __I… 228 media_status_t AImageReader_acquireNextImage(AImageReader* reader, /*out*/AImage** image) __INTRODU… 273 media_status_t AImageReader_acquireLatestImage(AImageReader* reader, /*out*/AImage** image) __INTRO… 283 typedef void (*AImageReader_ImageCallback)(void* context, AImageReader* reader); [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 …]
|
/frameworks/av/media/ndk/ |
D | NdkImageReader.cpp | 51 /*out*/ AImageReader**& reader); 122 sp<AImageReader> reader = mReader.promote(); in onFrameAvailable() local 123 if (reader == nullptr) { in onFrameAvailable() 132 sp<AMessage> msg = new AMessage(AImageReader::kWhatImageAvailable, reader->mHandler); in onFrameAvailable() 152 sp<AImageReader> reader = mReader.promote(); in onBufferFreed() local 153 if (reader == nullptr) { in onBufferFreed() 168 sp<AMessage> msg = new AMessage(AImageReader::kWhatBufferRemoved, reader->mHandler); in onBufferFreed() 661 /*out*/ AImageReader**& reader) { in validateParameters() argument 662 if (reader == nullptr) { in validateParameters() 723 /*out*/AImageReader** reader) { in AImageReader_new() argument [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/av/media/ndk/fuzzer/ |
D | ndk_image_reader_fuzzer.cpp | 39 AImageReader* reader = nullptr; in process() local 53 AImageReader_new(imageWidth, imageHeight, imageFormat, imageMaxCount, &reader); in process() 56 &reader); in process() 60 [&]() { AImageReader_acquireNextImage(reader, &img); }, in process() 61 [&]() { AImageReader_acquireLatestImage(reader, &img); }, in process() 62 [&]() { AImageReader_setImageListener(reader, &readerAvailableCb); }, in process() 63 [&]() { AImageReader_acquireNextImageAsync(reader, &img, acquireFenceFd); }, in process() 64 [&]() { AImageReader_acquireLatestImageAsync(reader, &img, acquireFenceFd); }, in process() 65 [&]() { AImageReader_setBufferRemovedListener(reader, &readerDetachedCb); }, in process() 66 [&]() { AImageReader_getWindowNativeHandle(reader, &handle); }, in process() [all …]
|
/frameworks/base/omapi/aidl/vts/functional/omapi/ |
D | VtsHalOmapiSeServiceV1_TargetTest.cpp | 54 std::shared_ptr<aidl::android::se::omapi::ISecureElementReader> reader, in testSelectableAid() argument 60 ASSERT_NE(reader, nullptr) << "reader is null"; in testSelectableAid() 63 auto res = reader->isSecureElementPresent(&status); in testSelectableAid() 67 res = reader->openSession(&session); in testSelectableAid() 87 std::shared_ptr<aidl::android::se::omapi::ISecureElementReader> reader, in testNonSelectableAid() argument 93 ASSERT_NE(reader, nullptr) << "reader is null"; in testNonSelectableAid() 96 auto res = reader->isSecureElementPresent(&status); in testNonSelectableAid() 100 res = reader->openSession(&session); in testNonSelectableAid() 142 std::shared_ptr<aidl::android::se::omapi::ISecureElementReader> reader, in internalTransmitApdu() argument 149 ASSERT_NE(reader, nullptr) << "reader is null"; in internalTransmitApdu() [all …]
|
/frameworks/base/packages/StatementService/src/com/android/statementservice/network/retriever/ |
D | StatementParser.kt | 48 JsonReader(stringReader).use { reader -> in <lambda>() method 49 reader.isLenient = false in <lambda>() 50 reader.beginArray() in <lambda>() 51 while (reader.hasNext()) { in <lambda>() 52 val result = parseOneStatement(reader, source) in <lambda>() 60 reader.endArray() in <lambda>() 71 JsonReader(stringReader).use { reader -> in <lambda>() method 72 reader.isLenient = false in <lambda>() 73 parseOneStatement(reader, source) in <lambda>() 82 reader: JsonReader, in <lambda>() [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/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/core/tests/coretests/src/com/android/internal/os/ |
D | ProcTimeInStateReaderTest.java | 64 ProcTimeInStateReader reader = new ProcTimeInStateReader(initialTimeInStateFile); in testSimple() local 69 reader.getFrequenciesKhz()); in testSimple() 73 reader.getUsageTimesMillis(initialTimeInStateFile)); in testSimple() 81 final ProcTimeInStateReader reader = new ProcTimeInStateReader(initialTimeInStateFile); in testHeaderFormat() local 86 reader.getFrequenciesKhz()); in testHeaderFormat() 90 reader.getUsageTimesMillis(initialTimeInStateFile)); in testHeaderFormat() 97 ProcTimeInStateReader reader = new ProcTimeInStateReader(initialTimeInStateFile); in testDifferentFile() local 104 reader.getUsageTimesMillis(timeInStateFile)); in testDifferentFile() 111 ProcTimeInStateReader reader = new ProcTimeInStateReader(initialTimeInStateFile); in testWrongLength() local 115 assertNull(reader.getUsageTimesMillis(timeInStateFile)); in testWrongLength()
|
D | KernelSingleProcessCpuThreadReaderTest.java | 51 KernelSingleProcessCpuThreadReader reader = new KernelSingleProcessCpuThreadReader(42, in getProcessCpuUsage() local 53 reader.setSelectedThreadIds(new int[] {2, 3}); in getProcessCpuUsage() 54 reader.startTrackingThreadCpuTimes(); in getProcessCpuUsage() 56 reader.getProcessCpuUsage(); in getProcessCpuUsage() 73 KernelSingleProcessCpuThreadReader reader = new KernelSingleProcessCpuThreadReader(13, in getCpuFrequencyCount() local 75 int cpuFrequencyCount = reader.getCpuFrequencyCount(); in getCpuFrequencyCount()
|
/frameworks/base/omapi/aidl/vts/functional/AccessControlApp/ |
D | VtsHalOmapiSeAccessControlTestCases.cpp | 90 for (const auto& [name, reader] : mVSReaders) { in testSelectableAid() 92 ASSERT_NE(reader, nullptr) << "reader is null"; in testSelectableAid() 95 auto res = reader->isSecureElementPresent(&status); in testSelectableAid() 99 res = reader->openSession(&session); in testSelectableAid() 131 for (const auto& [name, reader] : mVSReaders) { in testUnauthorisedAid() 132 ASSERT_NE(reader, nullptr) << "reader is null"; in testUnauthorisedAid() 135 auto res = reader->isSecureElementPresent(&status); in testUnauthorisedAid() 139 res = reader->openSession(&session); in testUnauthorisedAid() 166 for (const auto& [name, reader] : mVSReaders) { in testTransmitAPDU() 167 ASSERT_NE(reader, nullptr) << "reader is null"; in testTransmitAPDU() [all …]
|
/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/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/libs/hwui/jni/ |
D | Typeface.cpp | 201 void skip(minikin::BufferReader* reader) const override; 202 std::shared_ptr<minikin::MinikinFont> create(minikin::BufferReader reader) const override; 206 void MinikinFontSkiaFactory::skip(minikin::BufferReader* reader) const { in skip() 208 reader->skipString(); // fontPath in skip() 209 reader->skip<int>(); // fontIndex in skip() 210 reader->skipArray<minikin::FontVariation>(); // axesPtr, axesCount in skip() 211 bool hasVerity = static_cast<bool>(reader->read<int8_t>()); in skip() 213 reader->skip<uint32_t>(); // expectedFontRevision in skip() 214 reader->skipString(); // expectedPostScriptName in skip() 219 minikin::BufferReader reader) const { in create() [all …]
|
/frameworks/base/core/java/android/os/vibrator/persistence/ |
D | VibrationXmlParser.java | 186 public static VibrationEffect parseVibrationEffect(@NonNull Reader reader) throws IOException { in parseVibrationEffect() argument 187 return parseVibrationEffect(reader, /* flags= */ 0); in parseVibrationEffect() 202 public static VibrationEffect parseVibrationEffect(@NonNull Reader reader, @Flags int flags) in parseVibrationEffect() argument 206 reader, flags, VibrationXmlParser::parseVibrationEffectInternal); in parseVibrationEffect() 238 public static ParsedVibration parseDocument(@NonNull Reader reader) throws IOException { in parseDocument() argument 239 return parseDocument(reader, /* flags= */ 0); in parseDocument() 250 public static ParsedVibration parseDocument(@NonNull Reader reader, @Flags int flags) in parseDocument() argument 253 return parseDocumentInternal(reader, flags, VibrationXmlParser::parseElementInternal); in parseDocument() 351 @NonNull Reader reader, @Flags int flags, ElementParser<T> parseLogic) in parseDocumentInternal() 355 parser.setInput(reader); in parseDocumentInternal()
|
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/ |
D | MockBatteryStatsImpl.java | 183 public MockBatteryStatsImpl setKernelCpuUidFreqTimeReader(KernelCpuUidFreqTimeReader reader) { in setKernelCpuUidFreqTimeReader() argument 184 mCpuUidFreqTimeReader = reader; in setKernelCpuUidFreqTimeReader() 189 KernelCpuUidActiveTimeReader reader) { in setKernelCpuUidActiveTimeReader() argument 190 mCpuUidActiveTimeReader = reader; in setKernelCpuUidActiveTimeReader() 195 KernelCpuUidClusterTimeReader reader) { in setKernelCpuUidClusterTimeReader() argument 196 mCpuUidClusterTimeReader = reader; in setKernelCpuUidClusterTimeReader() 201 KernelCpuUidUserSysTimeReader reader) { in setKernelCpuUidUserSysTimeReader() argument 202 mCpuUidUserSysTimeReader = reader; in setKernelCpuUidUserSysTimeReader() 206 public MockBatteryStatsImpl setKernelSingleUidTimeReader(KernelSingleUidTimeReader reader) { in setKernelSingleUidTimeReader() argument 207 mKernelSingleUidTimeReader = reader; in setKernelSingleUidTimeReader() [all …]
|