Home
last modified time | relevance | path

Searched refs:inputStream (Results 1 – 25 of 279) sorted by relevance

12345678910>>...12

/aosp12/frameworks/av/media/codecs/mp3dec/src/
H A Dpvmp3_seek_synch.cpp140 pVars->inputStream.pBuffer = pExt->pInputBuffer; in pvmp3_frame_synch()
146 err = pvmp3_header_sync(&pVars->inputStream); in pvmp3_frame_synch()
153 uint32 temp = getNbits(&pVars->inputStream, 21); in pvmp3_frame_synch()
155 pVars->inputStream.usedBits -= 21 + SYNC_WORD_LNGTH; in pvmp3_frame_synch()
193 if (numBytes > (int32)pVars->inputStream.inputBufferCurrentLength) in pvmp3_frame_synch()
202 pExt->inputBufferUsedLength = pVars->inputStream.usedBits >> 3; in pvmp3_frame_synch()
211 uint8 *pElem = pVars->inputStream.pBuffer + offset; in pvmp3_frame_synch()
282 ERROR_CODE pvmp3_header_sync(tmp3Bits *inputStream) in pvmp3_header_sync() argument
288 inputStream->usedBits = (inputStream->usedBits + 7) & 8; in pvmp3_header_sync()
290 val = (uint16)getUpTo17bits(inputStream, SYNC_WORD_LNGTH); in pvmp3_header_sync()
[all …]
H A Dpvmp3_get_side_info.cpp115 ERROR_CODE pvmp3_get_side_info(tmp3Bits *inputStream, in pvmp3_get_side_info() argument
129 if (!bitsAvailable(inputStream, 14)) in pvmp3_get_side_info()
140 if (!bitsAvailable(inputStream, 12)) in pvmp3_get_side_info()
153 if (!bitsAvailable(inputStream, 4)) in pvmp3_get_side_info()
169 if (!bitsAvailable(inputStream, 34)) in pvmp3_get_side_info()
238 if (!bitsAvailable(inputStream, 3)) in pvmp3_get_side_info()
252 if (!bitsAvailable(inputStream, 8 + stereo)) in pvmp3_get_side_info()
262 if (!bitsAvailable(inputStream, 39)) in pvmp3_get_side_info()
279 if (!bitsAvailable(inputStream, 22)) in pvmp3_get_side_info()
316 if (!bitsAvailable(inputStream, 22)) in pvmp3_get_side_info()
[all …]
H A Dpvmp3_framedecoder.cpp173 pVars->inputStream.pBuffer = pExt->pInputBuffer; in pvmp3_framedecoder()
176 pVars->inputStream.usedBits = pExt->inputBufferUsedLength << 3; in pvmp3_framedecoder()
180 errorCode = pvmp3_decode_header(&pVars->inputStream, in pvmp3_framedecoder()
222 if (!bitsAvailable(&pVars->inputStream, 16)) in pvmp3_framedecoder()
230 sent_crc = getUpTo17bits(&pVars->inputStream, 16); in pvmp3_framedecoder()
247 errorCode = pvmp3_get_side_info(&pVars->inputStream, in pvmp3_framedecoder()
515 ancillary_data_lenght -= pVars->inputStream.usedBits; in pvmp3_framedecoder()
543 pExt->totalNumberOfBitsUsed += pVars->inputStream.usedBits; in pvmp3_framedecoder()
587 uint8 * ptr = pVars->inputStream.pBuffer + offset; in fillMainDataBuf()
660 pVars->inputStream.pBuffer = pExt->pInputBuffer; in pvmp3_InitDecoder()
[all …]
H A Dpvmp3_decode_header.cpp115 ERROR_CODE pvmp3_decode_header(tmp3Bits *inputStream, in pvmp3_decode_header() argument
128 if (inputStream->inputBufferCurrentLength < ((SYNC_WORD_LNGTH + 21) >> 3)) in pvmp3_decode_header()
136 temp = getUpTo17bits(inputStream, SYNC_WORD_LNGTH); in pvmp3_decode_header()
139 err = pvmp3_header_sync(inputStream); in pvmp3_decode_header()
147 temp = getNbits(inputStream, 21); // to avoid multiple bitstream accesses in pvmp3_decode_header()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/integrity/parser/
H A DBinaryFileOperationsTest.java58 String resultString = getStringValue(inputStream); in testGetStringValue()
70 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetHashedStringValue() local
72 String resultString = getStringValue(inputStream); in testGetHashedStringValue()
82 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetStringValue_withSizeAndHashingInfo() local
84 String resultString = getStringValue(inputStream, in testGetStringValue_withSizeAndHashingInfo()
94 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetIntValue() local
96 assertThat(getIntValue(inputStream)).isEqualTo(randomValue); in testGetIntValue()
103 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetBooleanValue_true() local
105 assertThat(getBooleanValue(inputStream)).isEqualTo(true); in testGetBooleanValue_true()
112 BitInputStream inputStream = new BitInputStream(new ByteArrayInputStream(ruleBytes)); in testGetBooleanValue_false() local
[all …]
H A DRuleIndexingControllerTest.java49 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect() local
51 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect()
71 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates() local
73 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_multipleAppCertificates()
94 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock() local
96 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_keysInFirstAndLastBlock()
116 InputStream inputStream = obtainDefaultIndexingMapForTest(); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues() local
118 RuleIndexingController indexingController = new RuleIndexingController(inputStream); in verifyIndexRangeSearchIsCorrect_keysMatchWithValues()
148 InputStream inputStream = new ByteArrayInputStream(rule.array()); in verifyIndexRangeSearchIsCorrect_noIndexesAvailable() local
178 InputStream inputStream = new ByteArrayInputStream(rule.array()); in verifyIndexingFileIsCorrupt() local
[all …]
/aosp12/frameworks/base/services/core/java/com/android/server/
H A DPersistentDataBlockService.java255 int blockId = inputStream.readInt(); in getTotalDataSizeLocked()
333 DataInputStream inputStream; in computeDigestLocked() local
347 IoUtils.closeQuietly(inputStream); in computeDigestLocked()
368 IoUtils.closeQuietly(inputStream); in computeDigestLocked()
442 DataInputStream inputStream; in doGetOemUnlockEnabled() local
459 IoUtils.closeQuietly(inputStream); in doGetOemUnlockEnabled()
534 DataInputStream inputStream;
565 inputStream.close();
633 DataInputStream inputStream;
756 DataInputStream inputStream;
[all …]
/aosp12/frameworks/libs/service_entitlement/tests/src/com/android/libraries/entitlement/utils/
H A DStreamUtilsTest.java42 InputStream inputStream = new ByteArrayInputStream(expectedString.getBytes(UTF_8)); in inputStreamToString() local
44 String resultString = StreamUtils.inputStreamToString(inputStream); in inputStreamToString()
56 InputStream inputStream = mock(InputStream.class); in inputStreamToString_readThrowsIOException_shouldThrowException() local
57 when(inputStream.read(any())).thenThrow(new IOException()); in inputStreamToString_readThrowsIOException_shouldThrowException()
59 assertThrows(IOException.class, () -> StreamUtils.inputStreamToString(inputStream)); in inputStreamToString_readThrowsIOException_shouldThrowException()
65 InputStream inputStream = new ByteArrayInputStream(expectedString.getBytes(UTF_8)); in inputStreamToStringSafe() local
67 String resultString = StreamUtils.inputStreamToStringSafe(inputStream); in inputStreamToStringSafe()
81 InputStream inputStream = mock(InputStream.class); in inputStreamToStringSafe_readThrowsIOException_shouldReturnEmpty() local
82 when(inputStream.read(any())).thenThrow(new IOException()); in inputStreamToStringSafe_readThrowsIOException_shouldReturnEmpty()
84 String resultString = StreamUtils.inputStreamToStringSafe(inputStream); in inputStreamToStringSafe_readThrowsIOException_shouldReturnEmpty()
/aosp12/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
H A DStreamableAsset.java111 protected void onPostExecute(InputStream inputStream) { in fetchInputStream() argument
112 streamReceiver.onInputStreamOpened(inputStream); in fetchInputStream()
166 InputStream inputStream = openInputStream(); in calculateRawDimensions() local
168 if (inputStream == null) { in calculateRawDimensions()
171 BitmapFactory.decodeStream(inputStream, null, options); in calculateRawDimensions()
192 InputStream inputStream = null; in openBitmapRegionDecoder() local
196 inputStream = openInputStream(); in openBitmapRegionDecoder()
198 if (inputStream == null) { in openBitmapRegionDecoder()
217 inputStream.close(); in closeInputStream()
234 void onInputStreamOpened(@Nullable InputStream inputStream); in onInputStreamOpened() argument
[all …]
/aosp12/packages/apps/Messaging/src/com/android/messaging/util/
H A DUriUtil.java202 return copyContent(context, inputStream, scratchSpaceUri); in persistContentToScratchSpace()
212 InputStream inputStream = null; in persistContentToScratchSpace() local
223 return persistContentToScratchSpace(inputStream); in persistContentToScratchSpace()
228 if (inputStream != null) { in persistContentToScratchSpace()
230 inputStream.close(); in persistContentToScratchSpace()
254 return copyContent(context, inputStream, targetUri); in persistContent()
269 InputStream inputStream = null; in persistContent() local
280 return persistContent(inputStream, outputDir, contentType); in persistContent()
285 if (inputStream != null) { in persistContent()
287 inputStream.close(); in persistContent()
[all …]
H A DImageUtils.java270 if (inputStream != null) { in getOrientation()
273 exifInterface.readExif(inputStream); in getOrientation()
283 if (inputStream != null) { in getOrientation()
284 inputStream.close(); in getOrientation()
320 if (inputStream != null) { in isGif()
332 inputStream.close(); in isGif()
569 InputStream inputStream = null; in ensureImageSizeSet() local
586 if (inputStream != null) { in ensureImageSizeSet()
588 inputStream.close(); in ensureImageSizeSet()
892 if (inputStream != null) { in decodeImageBounds()
[all …]
/aosp12/packages/apps/UniversalMediaPlayer/java/com/android/pump/util/
H A DIoUtils.java40 InputStream inputStream = new FileInputStream(file); in readFromFile() local
42 return readFromStream(inputStream); in readFromFile()
44 close(inputStream); in readFromFile()
50 InputStream inputStream = assetFileDescriptor.createInputStream(); in readFromAssetFileDescriptor() local
52 return readFromStream(inputStream); in readFromAssetFileDescriptor()
54 close(inputStream); in readFromAssetFileDescriptor()
58 public static @NonNull byte[] readFromStream(@NonNull InputStream inputStream) in readFromStream() argument
64 while ((num = inputStream.read(buf, 0, buf.length)) >= 0) { in readFromStream()
/aosp12/frameworks/opt/vcard/tests/src/com/android/vcard/tests/
H A DVCardParserTests.java104 parser.parse(inputStream); in testSimple()
107 inputStream.close(); in testSimple()
132 parser.parse(inputStream); in testNest()
135 inputStream.close(); in testNest()
164 parser.parse(inputStream); in testIosMultiline()
167 inputStream.close(); in testIosMultiline()
177 InputStream inputStream = in testParseOne() local
213 parser.parse(inputStream); in testParseOne()
216 inputStream.close(); in testParseOne()
235 parser.parseOne(inputStream); in testParseOne()
[all …]
/aosp12/system/timezone/distro/core/src/test/com/android/timezone/distro/
H A DTimeZoneDistroTest.java76 TestInputStream inputStream = new TestInputStream(new ByteArrayInputStream(bytes)); in testGetDistroVersion_closesStream() local
77 TimeZoneDistro distro = new TimeZoneDistro(inputStream); in testGetDistroVersion_closesStream()
79 inputStream.assertClosed(); in testGetDistroVersion_closesStream()
92 TestInputStream inputStream = new TestInputStream(new ByteArrayInputStream(bytes)); in testExtractTo_closesStream() local
93 TimeZoneDistro distro = new TimeZoneDistro(inputStream); in testExtractTo_closesStream()
96 inputStream.assertClosed(); in testExtractTo_closesStream()
111 TestInputStream inputStream = in testExtractZipSafely_goodZip() local
113 TimeZoneDistro.extractZipSafely(inputStream, targetDir, true /* makeWorldReadable */); in testExtractZipSafely_goodZip()
114 inputStream.assertClosed(); in testExtractZipSafely_goodZip()
144 TestInputStream inputStream = new TestInputStream( in doExtractZipFails() local
[all …]
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/backup/restore/
H A DPerformAdbRestoreTaskTest.java53 InputStream inputStream = mContext.getResources().openRawResource( in parseBackupFileAndReturnTarStream_backupNotEncrypted_returnsNonNull() local
56 inputStream, null); in parseBackupFileAndReturnTarStream_backupNotEncrypted_returnsNonNull()
65 InputStream inputStream = mContext.getResources().openRawResource( in parseBackupFileAndReturnTarStream_backupEncryptedAndPasswordProvided_returnsNonNull() local
68 inputStream, "123"); in parseBackupFileAndReturnTarStream_backupEncryptedAndPasswordProvided_returnsNonNull()
77 InputStream inputStream = mContext.getResources().openRawResource( in parseBackupFileAndReturnTarStream_backupEncryptedAndPasswordNotProvided_returnsNull() local
80 inputStream, null); in parseBackupFileAndReturnTarStream_backupEncryptedAndPasswordNotProvided_returnsNull()
89 InputStream inputStream = mContext.getResources().openRawResource( in parseBackupFileAndReturnTarStream_backupEncryptedAndIncorrectPassword_returnsNull() local
92 inputStream, "1234"); in parseBackupFileAndReturnTarStream_backupEncryptedAndIncorrectPassword_returnsNull()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
H A DTarBackupReaderTest.java107 inputStream, "123"); in readTarHeaders_backupEncrypted_correctlyParsesFileMetadata()
124 inputStream, null); in readTarHeaders_backupNotEncrypted_correctlyParsesFileMetadata()
142 inputStream, null); in readTarHeaders_backupNotEncrypted_correctlyReadsPaxHeader()
181 inputStream, "123"); in readAppManifest_backupEncrypted_correctlyParsesAppManifest()
202 inputStream, null); in readAppManifest_backupNotEncrypted_correctlyParsesAppManifest()
223 inputStream, null); in chooseRestorePolicy_signaturesIsNull_returnsIgnore()
241 inputStream, null); in chooseRestorePolicy_packageDoesNotExistAndAllowApksAndHasApk_returnsAcceptIfApk()
266 inputStream, null); in chooseRestorePolicy_packageDoesNotExistAndAllowApksAndDoesNotHaveApk_returnsAcceptIfApkLogsCannotRestore()
294 inputStream, null); in chooseRestorePolicy_packageDoesNotExistAndDoesNotAllowApks_returnsIgnore()
315 inputStream, null); in chooseRestorePolicy_doesNotAllowsBackup_returnsIgnore()
[all …]
/aosp12/frameworks/libs/service_entitlement/java/com/android/libraries/entitlement/utils/
H A DStreamUtils.java35 public static String inputStreamToString(@Nullable InputStream inputStream) throws IOException { in inputStreamToString() argument
36 if (inputStream == null) { in inputStreamToString()
39 try (BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream); in inputStreamToString()
43 while ((length = inputStream.read(buffer)) != -1) { in inputStreamToString()
51 public static String inputStreamToStringSafe(@Nullable InputStream inputStream) { in inputStreamToStringSafe() argument
53 return inputStreamToString(inputStream); in inputStreamToStringSafe()
/aosp12/packages/apps/Dialer/java/com/android/dialer/shortcuts/
H A DIconFactory.java87 InputStream inputStream = in create() local
92 ? createAdaptiveIcon(displayName, lookupKey, inputStream) in create()
93 : createFlatIcon(displayName, lookupKey, inputStream); in create()
98 @NonNull String displayName, @NonNull String lookupKey, @Nullable InputStream inputStream) { in createAdaptiveIcon() argument
99 if (inputStream == null) { in createAdaptiveIcon()
117 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); in createAdaptiveIcon()
122 @NonNull String displayName, @NonNull String lookupKey, @Nullable InputStream inputStream) { in createFlatIcon() argument
124 if (inputStream == null) { in createFlatIcon()
132 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); in createFlatIcon()
/aosp12/packages/apps/TV/src/com/android/tv/util/images/
H A DBitmapUtils.java117 InputStream inputStream = null; in decodeSampledBitmapFromUriString() local
122 inputStream = context.getContentResolver().openInputStream(uri); in decodeSampledBitmapFromUriString()
127 inputStream = urlConnection.getInputStream(); in decodeSampledBitmapFromUriString()
129 inputStream = new BufferedInputStream(inputStream); in decodeSampledBitmapFromUriString()
130 inputStream.mark(MARK_READ_LIMIT); in decodeSampledBitmapFromUriString()
135 BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString()
139 inputStream.reset(); in decodeSampledBitmapFromUriString()
144 close(inputStream, urlConnection); in decodeSampledBitmapFromUriString()
149 inputStream = urlConnection.getInputStream(); in decodeSampledBitmapFromUriString()
157 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in decodeSampledBitmapFromUriString()
[all …]
/aosp12/frameworks/av/media/libaaudio/examples/loopback/src/
H A Dloopback.cpp85 AAudioStream *inputStream = nullptr; member
421 AAudioStream *inputStream = nullptr; in main() local
581 inputStream = loopbackData.inputStream = recorder.getStream(); in main()
585 (void) AAudioStream_setBufferSizeInFrames(inputStream, actualCapacity); in main()
606 argParser.compareWithStream(inputStream); in main()
609 loopbackData.actualInputFormat = AAudioStream_getFormat(inputStream); in main()
657 int64_t inputFramesRead = AAudioStream_getFramesRead(inputStream); in main()
666 AAudioStream_getState(inputStream))[textOffset], in main()
667 AAudioStream_getXRunCount(inputStream)); in main()
733 int32_t framesRead = AAudioStream_getFramesRead(inputStream); in main()
[all …]
/aosp12/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
H A DImageRequest.java156 final InputStream inputStream = getInputStreamForResource(); in loadBitmapInternal() local
157 if (inputStream != null) { in loadBitmapInternal()
160 BitmapFactory.decodeStream(inputStream, null, options); in loadBitmapInternal()
168 inputStream.close(); in loadBitmapInternal()
193 final InputStream inputStream = getInputStreamForResource(); in loadBitmapInternal() local
194 if (inputStream != null) { in loadBitmapInternal()
201 return BitmapFactory.decodeStream(inputStream, null, options); in loadBitmapInternal()
208 inputStream, options, sampledWidth, sampledHeight); in loadBitmapInternal()
211 inputStream.close(); in loadBitmapInternal()
/aosp12/frameworks/av/media/libstagefright/tests/writer/
H A DWriterUtility.cpp25 int32_t sendBuffersToWriter(ifstream &inputStream, vector<BufferInfo> &bufferInfo, in sendBuffersToWriter() argument
44 inputStream.read(data, size); in sendBuffersToWriter()
45 CHECK_EQ(inputStream.gcount(), size); in sendBuffersToWriter()
83 int32_t writeHeaderBuffers(ifstream &inputStream, vector<BufferInfo> &bufferInfo, in writeHeaderBuffers() argument
95 inputStream.read(data, size); in writeHeaderBuffers()
96 CHECK_EQ(inputStream.gcount(), size); in writeHeaderBuffers()
/aosp12/system/timezone/distro/core/src/main/com/android/timezone/distro/
H A DTimeZoneDistro.java65 private final InputStream inputStream; field in TimeZoneDistro
78 public TimeZoneDistro(InputStream inputStream) { in TimeZoneDistro() argument
79 this.inputStream = inputStream; in TimeZoneDistro()
87 byte[] contents = getEntryContents(inputStream, DISTRO_VERSION_FILE_NAME); in getDistroVersion()
126 extractZipSafely(inputStream, targetDir, true /* makeWorldReadable */); in extractTo()
/aosp12/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/cdc/
H A DContentDefinedChunkerTest.java123 ByteArrayInputStream inputStream = new ByteArrayInputStream(input); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries() local
126 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries()
138 ByteArrayInputStream inputStream = new ByteArrayInputStream(input); in chunkify_withSmallChunks_combinesChunksUntilMinSize() local
141 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withSmallChunks_combinesChunksUntilMinSize()
154 ByteArrayInputStream inputStream = new ByteArrayInputStream(largeInput); in chunkify_doesNotProduceChunksLargerThanMaxSize() local
157 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_doesNotProduceChunksLargerThanMaxSize()
200 ByteArrayInputStream inputStream = new ByteArrayInputStream(new byte[] {1}); in chunkify_whenConsumerThrowsException_rethrowsException() local
206 inputStream, in chunkify_whenConsumerThrowsException_rethrowsException()
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/bip/
H A DBipImage.java34 public BipImage(String imageHandle, InputStream inputStream) { in BipImage() argument
36 parse(inputStream); in BipImage()
44 private void parse(InputStream inputStream) { in parse() argument
47 mImage = BitmapFactory.decodeStream(inputStream); in parse()

12345678910>>...12