/frameworks/base/core/tests/coretests/src/android/util/ |
D | JsonReaderTest.java | 29 JsonReader reader = new JsonReader(new StringReader("[true, true]")); in testReadArray() local 30 reader.beginArray(); in testReadArray() 31 assertEquals(true, reader.nextBoolean()); in testReadArray() 32 assertEquals(true, reader.nextBoolean()); in testReadArray() 33 reader.endArray(); in testReadArray() 34 assertEquals(JsonToken.END_DOCUMENT, reader.peek()); in testReadArray() 38 JsonReader reader = new JsonReader(new StringReader("[]")); in testReadEmptyArray() local 39 reader.beginArray(); in testReadEmptyArray() 40 assertFalse(reader.hasNext()); in testReadEmptyArray() 41 reader.endArray(); in testReadEmptyArray() [all …]
|
/frameworks/base/core/tests/coretests/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 | 77 final RecordingReader reader = new RecordingReader(); in testEmpty() local 81 rotate1.combineActive(reader, writer("foo"), currentTime); in testEmpty() 82 reader.assertRead(); in testEmpty() 93 final RecordingReader reader = new RecordingReader(); in testCombine() local 97 rotate.combineActive(reader, writer("foo"), currentTime); in testCombine() 98 reader.assertRead(); in testCombine() 104 reader.reset(); in testCombine() 105 rotate.combineActive(reader, writer("bar"), currentTime); in testCombine() 106 reader.assertRead("foo"); in testCombine() 114 final RecordingReader reader = new RecordingReader(); in testRotate() local [all …]
|
/frameworks/base/core/java/com/android/internal/net/ |
D | NetworkStatsFactory.java | 80 ProcFileReader reader = null; in readNetworkStatsSummaryDev() local 82 reader = new ProcFileReader(new FileInputStream(mStatsXtIfaceAll)); in readNetworkStatsSummaryDev() 84 while (reader.hasMoreData()) { in readNetworkStatsSummaryDev() 85 entry.iface = reader.nextString(); in readNetworkStatsSummaryDev() 90 final boolean active = reader.nextInt() != 0; in readNetworkStatsSummaryDev() 93 entry.rxBytes = reader.nextLong(); in readNetworkStatsSummaryDev() 94 entry.rxPackets = reader.nextLong(); in readNetworkStatsSummaryDev() 95 entry.txBytes = reader.nextLong(); in readNetworkStatsSummaryDev() 96 entry.txPackets = reader.nextLong(); in readNetworkStatsSummaryDev() 100 entry.rxBytes += reader.nextLong(); in readNetworkStatsSummaryDev() [all …]
|
/frameworks/ex/variablespeed/jni/ |
D | ring_buffer.cc | 61 int RingBuffer::available(int reader) const { in available() 62 return head_logical_ - readers_[reader]; in available() 74 int64 RingBuffer::Tell(int reader) const { in Tell() 75 return readers_[reader]; in Tell() 78 void RingBuffer::Seek(int reader, int64 position) { in Seek() argument 79 readers_[reader] = position; in Seek() 101 void RingBuffer::Copy(int reader, float* destination, int num_frames) const { in Copy() argument 102 int pos = Tell(reader) % size_; in Copy() 116 float* RingBuffer::GetPointer(int reader, int num_frames) { in GetPointer() argument 117 int pos = Tell(reader) % size_; in GetPointer() [all …]
|
D | ring_buffer.h | 49 int64 Tell(int reader) const; 54 void Seek(int reader, int64 position); 60 void Copy(int reader, float* destination, int num_frames) const; 75 int available(int reader) const; 85 float* GetPointer(int reader, int num_frames); 94 void MergeBack(int reader, const float* source, int num_frames);
|
/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 …]
|
D | GraphReader.java | 456 XMLReader reader = getReaderForCommandStack(commandStack); in parseString() local 457 reader.parse(new InputSource(new StringReader(graphString))); in parseString() 466 XMLReader reader = getReaderForCommandStack(commandStack); in parseInput() local 467 reader.parse(new InputSource(inputStream)); in parseInput() 476 XMLReader reader = parser.getXMLReader(); in getReaderForCommandStack() local 478 reader.setContentHandler(graphHandler); in getReaderForCommandStack() 479 return reader; in getReaderForCommandStack() 558 XmlGraphReader reader = new XmlGraphReader(); in getBuilderForXmlString() local 560 reader.parseString(source, commands); in getBuilderForXmlString() 569 XmlGraphReader reader = new XmlGraphReader(); in getBuilderForXmlResource() local [all …]
|
/frameworks/base/core/java/android/util/ |
D | Xml.java | 55 XMLReader reader = new ExpatReader(); in parse() local 56 reader.setContentHandler(contentHandler); in parse() 57 reader.parse(new InputSource(new StringReader(xml))); in parse() 69 XMLReader reader = new ExpatReader(); in parse() local 70 reader.setContentHandler(contentHandler); in parse() 71 reader.parse(new InputSource(in)); in parse() 80 XMLReader reader = new ExpatReader(); in parse() local 81 reader.setContentHandler(contentHandler); in parse() 84 reader.parse(source); in parse()
|
D | EventLog.java | 227 BufferedReader reader = null; in readTagsFile() local 231 reader = new BufferedReader(new FileReader(TAGS_FILE), 256); in readTagsFile() 232 while ((line = reader.readLine()) != null) { in readTagsFile() 254 try { if (reader != null) reader.close(); } catch (IOException e) {} in readTagsFile()
|
/frameworks/base/core/jni/ |
D | android_backup_BackupDataInput.cpp | 54 BackupDataReader* reader = (BackupDataReader*)r; in readNextHeader_native() local 58 err = reader->ReadNextHeader(&done, &type); in readNextHeader_native() 72 err = reader->ReadEntityHeader(&key, &dataSize); in readNextHeader_native() 95 BackupDataReader* reader = (BackupDataReader*)r; in readEntityData_native() local 107 err = reader->ReadEntityData(dataBytes+offset, size); in readEntityData_native() 118 BackupDataReader* reader = (BackupDataReader*)r; in skipEntityData_native() local 120 err = reader->SkipEntityData(); in skipEntityData_native()
|
/frameworks/base/media/mca/filterfw/java/android/filterfw/io/ |
D | TextGraphReader.java | 49 public void execute(TextGraphReader reader) throws GraphIOException; in execute() argument 60 public void execute(TextGraphReader reader) throws GraphIOException { in execute() argument 62 reader.mFactory.addPackage(mPackageName); in execute() 77 public void execute(TextGraphReader reader) { in execute() argument 78 reader.mFactory.addFilterLibrary(mLibraryName); in execute() 91 public void execute(TextGraphReader reader) throws GraphIOException { in execute() argument 95 filter = reader.mFactory.createFilterByClassName(mClassName, mFilterName); in execute() 101 reader.mCurrentFilter = filter; in execute() 113 public void execute(TextGraphReader reader) throws GraphIOException { in execute() argument 114 Filter filter = reader.mCurrentFilter; in execute() [all …]
|
D | GraphReader.java | 43 InputStreamReader reader = new InputStreamReader(inputStream); in readGraphResource() local 48 while ((bytesRead = reader.read(buffer, 0, 1024)) > 0) { in readGraphResource()
|
/frameworks/av/services/medialog/ |
D | MediaLogService.cpp | 36 sp<NBLog::Reader> reader(new NBLog::Reader(size, shared)); in registerWriter() local 37 NamedReader namedReader(reader, name); in registerWriter() 49 if (mNamedReaders[i].reader()->isIMemory(shared)) { in unregisterWriter() 81 namedReader.reader()->dump(fd, 0 /*indent*/); in dump()
|
D | MediaLogService.h | 50 NamedReader(const sp<NBLog::Reader>& reader, const char *name) : mReader(reader) in NamedReader() argument 53 const sp<NBLog::Reader>& reader() const { return mReader; } in reader() function
|
/frameworks/base/core/java/android/net/ |
D | SamplingDataTracker.java | 51 BufferedReader reader = null; in getSamplingSnapshots() local 53 reader = new BufferedReader(new FileReader("/proc/net/dev")); in getSamplingSnapshots() 57 reader.readLine(); in getSamplingSnapshots() 58 reader.readLine(); in getSamplingSnapshots() 60 while ((line = reader.readLine()) != null) { in getSamplingSnapshots() 128 if (reader != null) { in getSamplingSnapshots() 129 reader.close(); in getSamplingSnapshots()
|
/frameworks/base/cmds/backup/ |
D | backup.cpp | 66 BackupDataReader reader(fd); in perform_list() local 70 while (reader.ReadNextHeader(&done, &type) == 0) { in perform_list() 79 err = reader.ReadEntityHeader(&key, &dataSize); in perform_list()
|
/frameworks/base/services/java/com/android/server/ |
D | AssetAtlasService.java | 524 BufferedReader reader = null; in readConfiguration() local 527 reader = new BufferedReader(new InputStreamReader(new FileInputStream(file))); in readConfiguration() 529 if (checkBuildIdentifier(reader, versionName)) { in readConfiguration() 530 Atlas.Type type = Atlas.Type.valueOf(reader.readLine()); in readConfiguration() 531 int width = readInt(reader, MIN_SIZE, MAX_SIZE); in readConfiguration() 532 int height = readInt(reader, MIN_SIZE, MAX_SIZE); in readConfiguration() 533 int count = readInt(reader, 0, Integer.MAX_VALUE); in readConfiguration() 534 int flags = readInt(reader, Integer.MIN_VALUE, Integer.MAX_VALUE); in readConfiguration() 545 if (reader != null) { in readConfiguration() 547 reader.close(); in readConfiguration() [all …]
|
/frameworks/native/opengl/tools/glgen/src/ |
D | ParameterChecker.java | 24 public ParameterChecker(BufferedReader reader) throws Exception { in ParameterChecker() argument 26 while ((line = reader.readLine()) != null) { in ParameterChecker()
|
/frameworks/base/core/tests/coretests/src/android/net/http/ |
D | DefaultHttpClientTest.java | 90 Reader reader = new InputStreamReader(response.getEntity().getContent()); in contentToString() local 92 while ((length = reader.read(buffer)) != -1) { in contentToString() 95 reader.close(); in contentToString()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | FileRotator.java | 188 public void combineActive(final Reader reader, final Writer writer, long currentTimeMillis) in combineActive() argument 198 reader.read(in); in combineActive() 285 public void readMatching(Reader reader, long matchStartMillis, long matchEndMillis) in readMatching() argument 296 readFile(file, reader); in readMatching() 363 private static void readFile(File file, Reader reader) throws IOException { in readFile() argument 367 reader.read(bis); in readFile()
|
/frameworks/base/services/input/ |
D | InputManager.cpp | 37 const sp<InputReaderInterface>& reader, in InputManager() argument 39 mReader(reader), in InputManager()
|
/frameworks/base/tests/backup/src/com/android/backuptest/ |
D | BackupTestActivity.java | 62 BufferedReader reader = null; 64 reader = new BufferedReader(new InputStreamReader(openFileInput(FILE_NAME))); 65 while (reader.ready()) { 67 str.append(reader.readLine());
|
/frameworks/base/media/mca/effect/java/android/media/effect/ |
D | FilterGraphEffect.java | 73 GraphReader reader = new TextGraphReader(); in createGraph() local 75 mGraph = reader.readGraphString(graphString); in createGraph()
|
/frameworks/base/docs/html/guide/topics/connectivity/nfc/ |
D | hce.jd | 43 Android application to emulate a card and talk directly to the NFC reader. This 54 from the reader directly to the secure element. Figure 1 illustrates this concept.</p> 111 Instead, tapping the device against the NFC reader starts the correct service (if not already 120 <p>When the user taps a device to an NFC reader, the Android system needs to 121 know which HCE service the NFC reader actually wants to talk to. 124 consists of up to 16 bytes. If you are emulating cards for an existing NFC reader 129 <p>If you want to deploy new reader infrastructure for your own application, you 208 is called whenever a NFC reader sends an Application 211 exchanged between the NFC reader and your HCE service. That application-level 212 protocol is half-duplex: the NFC reader will send you a command APDU, and it [all …]
|