Home
last modified time | relevance | path

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

123456

/packages/apps/Messaging/src/com/android/messaging/util/
DUriUtil.java200 public static Uri persistContentToScratchSpace(final InputStream inputStream) { in persistContentToScratchSpace() argument
203 return copyContent(context, inputStream, scratchSpaceUri); in persistContentToScratchSpace()
213 InputStream inputStream = null; in persistContentToScratchSpace() local
217 inputStream = context.getContentResolver().openInputStream(sourceUri); in persistContentToScratchSpace()
220 inputStream = getInputStreamFromRemoteUri(sourceUri); in persistContentToScratchSpace()
221 if (inputStream == null) { in persistContentToScratchSpace()
225 return persistContentToScratchSpace(inputStream); in persistContentToScratchSpace()
230 if (inputStream != null) { in persistContentToScratchSpace()
232 inputStream.close(); in persistContentToScratchSpace()
264 final InputStream inputStream, final File outputDir, final String contentType) { in persistContent() argument
[all …]
DImageUtils.java268 public static int getOrientation(final InputStream inputStream) { in getOrientation() argument
270 if (inputStream != null) { in getOrientation()
273 exifInterface.readExif(inputStream); in getOrientation()
283 if (inputStream != null) { in getOrientation()
284 inputStream.close(); in getOrientation()
305 InputStream inputStream = contentResolver.openInputStream(contentUri); in isGif() local
306 return ImageUtils.isGif(inputStream); in isGif()
319 public static boolean isGif(InputStream inputStream) { in isGif() argument
320 if (inputStream != null) { in isGif()
323 int value = inputStream.read(gifHeaderBytes, 0, 6); in isGif()
[all …]
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
DStreamableAsset.java106 InputStream inputStream = openInputStream(); in decodeBitmap() local
107 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, options); in decodeBitmap()
109 inputStream, "Error closing the input stream used to decode the full bitmap"); in decodeBitmap()
258 InputStream inputStream = openInputStream(); in calculateRawDimensions() local
260 if (inputStream == null) { in calculateRawDimensions()
263 BitmapFactory.decodeStream(inputStream, null, options); in calculateRawDimensions()
264 … closeInputStream(inputStream, "There was an error closing the input stream used to calculate " in calculateRawDimensions()
284 InputStream inputStream = null; in openBitmapRegionDecoder() local
288 inputStream = openInputStream(); in openBitmapRegionDecoder()
290 if (inputStream == null) { in openBitmapRegionDecoder()
[all …]
/packages/apps/UniversalMediaPlayer/java/com/android/pump/util/
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()
/packages/apps/TV/src/com/android/tv/util/images/
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()
146 inputStream = context.getContentResolver().openInputStream(uri); in decodeSampledBitmapFromUriString()
149 inputStream = urlConnection.getInputStream(); in decodeSampledBitmapFromUriString()
[all …]
/packages/apps/Dialer/java/com/android/dialer/shortcuts/
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()
/packages/apps/Messaging/src/com/android/messaging/datamodel/media/
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()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
DBinaryDictionaryFileDumper.java262 InputStream inputStream = null; in installWordListToStaging() local
287 inputStream = FileTransforms.getUncompressedStream(decryptedStream); in installWordListToStaging()
291 inputStream = FileTransforms.getUncompressedStream(decryptedStream); in installWordListToStaging()
296 inputStream = FileTransforms.getDecryptedStream(uncompressedStream); in installWordListToStaging()
299 inputStream = FileTransforms.getUncompressedStream(originalSourceStream); in installWordListToStaging()
302 inputStream = FileTransforms.getDecryptedStream(originalSourceStream); in installWordListToStaging()
305 inputStream = originalSourceStream; in installWordListToStaging()
308 bufferedInputStream = new BufferedInputStream(inputStream); in installWordListToStaging()
354 closeCloseableAndReportAnyException(inputStream); in installWordListToStaging()
533 InputStream inputStream = null; in reinitializeClientRecordInDictionaryContentProvider() local
[all …]
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/
DArchiveHandleTest.java343 InputStream inputStream = archiveHandle.getInputStream( in closeInputStream_zipFile_shouldBeSuccess() local
347 assertThat(inputStream).isNotNull(); in closeInputStream_zipFile_shouldBeSuccess()
349 inputStream.close(); in closeInputStream_zipFile_shouldBeSuccess()
378 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_zipFile_shouldHaveTheSameContent() local
382 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_zipFile_shouldHaveTheSameContent()
464 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_sevenZFile_shouldHaveTheSameContent() local
468 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_sevenZFile_shouldHaveTheSameContent()
483 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_tarGzFile_shouldHaveTheSameContent() local
487 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_tarGzFile_shouldHaveTheSameContent()
543 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_tarBrotliFile_shouldHaveTheSameContent() local
[all …]
DArchiveFileTestRule.java122 try (InputStream inputStream = InstrumentationRegistry.getInstrumentation() in dumpAssetFile() argument
124 Files.copy(inputStream, destinationPath, StandardCopyOption.REPLACE_EXISTING); in dumpAssetFile()
164 public static String getStringFromInputStream(InputStream inputStream) throws IOException { in getStringFromInputStream() argument
165 InputStreamReader inputStreamReader = new InputStreamReader(inputStream); in getStringFromInputStream()
167 int size = inputStream.available(); in getStringFromInputStream()
DTestUtils.java66 InputStream inputStream = in getSeekableDescriptor() argument
71 while ((bytes = inputStream.read(buffer)) != -1) { in getSeekableDescriptor()
104 InputStream inputStream = in getNonSeekableDescriptor()
109 while ((bytes = inputStream.read(buffer)) != -1) { in getNonSeekableDescriptor()
/packages/apps/Settings/tests/robotests/src/com/android/settings/core/instrumentation/
DSettingsIntelligenceLogWriterTest.java63 final DataInputStream inputStream = new DataInputStream(bin); in serialize_hasSizeOne_returnCorrectData() local
64 final int size = inputStream.readInt(); in serialize_hasSizeOne_returnCorrectData()
65 final byte[] change = new byte[inputStream.readInt()]; in serialize_hasSizeOne_returnCorrectData()
66 inputStream.read(change); in serialize_hasSizeOne_returnCorrectData()
67 inputStream.close(); in serialize_hasSizeOne_returnCorrectData()
/packages/apps/Messaging/tests/src/com/android/messaging/datamodel/action/
DReadWriteDraftMessageActionTest.java376 InputStream inputStream = null; in testBugleDatabaseDraftOperations() local
378 inputStream = mContext.getContentResolver().openInputStream(mOutputUri); in testBugleDatabaseDraftOperations()
380 final int read = inputStream.read(buffer); in testBugleDatabaseDraftOperations()
422 inputStream = null; in testBugleDatabaseDraftOperations()
424 inputStream = mContext.getContentResolver().openInputStream(mOutputUri); in testBugleDatabaseDraftOperations()
425 assertNull("Original draft content should have been deleted", inputStream); in testBugleDatabaseDraftOperations()
428 inputStream = null; in testBugleDatabaseDraftOperations()
430 inputStream = mContext.getContentResolver().openInputStream(mAnotherUri); in testBugleDatabaseDraftOperations()
432 final int read = inputStream.read(buffer); in testBugleDatabaseDraftOperations()
445 inputStream = null; in testBugleDatabaseDraftOperations()
[all …]
/packages/apps/Dialer/java/com/android/incallui/
DContactsAsyncHelper.java134 InputStream inputStream = null; in doInBackground() local
137 inputStream = args.context.getContentResolver().openInputStream(args.displayPhotoUri); in doInBackground()
143 if (inputStream != null) { in doInBackground()
144 args.photo = Drawable.createFromStream(inputStream, args.displayPhotoUri.toString()); in doInBackground()
166 if (inputStream != null) { in doInBackground()
168 inputStream.close(); in doInBackground()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/map/
DBluetoothMapSmsPduTest.java116 InputStream inputStream = new ByteArrayInputStream(encodedMessageSms); in getSubmitPdus_withTypeGSM_whenMsgCountIsMoreThanOne() local
117 BluetoothMapbMessage messageParsed = BluetoothMapbMessage.parse(inputStream, in getSubmitPdus_withTypeGSM_whenMsgCountIsMoreThanOne()
141 InputStream inputStream = new ByteArrayInputStream(encodedMessageSms); in getSubmitPdus_withTypeCDMA() local
142 BluetoothMapbMessage messageParsed = BluetoothMapbMessage.parse(inputStream, in getSubmitPdus_withTypeCDMA()
165 InputStream inputStream = new ByteArrayInputStream(encodedMessageSms); in getDeliverPdus_withTypeGSM() local
167 assertThrows(IllegalArgumentException.class, () -> BluetoothMapbMessage.parse(inputStream, in getDeliverPdus_withTypeGSM()
188 InputStream inputStream = new ByteArrayInputStream(encodedMessageSms); in getDeliverPdus_withTypeCDMA() local
190 assertThrows(IllegalArgumentException.class, () -> BluetoothMapbMessage.parse(inputStream, in getDeliverPdus_withTypeCDMA()
DBluetoothMapbMessageEmailTest.java53 InputStream inputStream = new ByteArrayInputStream(encodedMessageEmail); in encodeToByteArray_thenCreateByParsing() local
55 BluetoothMapbMessage messageParsed = BluetoothMapbMessage.parse(inputStream, in encodeToByteArray_thenCreateByParsing()
70 InputStream inputStream = new ByteArrayInputStream(encodedMessageEmail); in encodeToByteArray_withEmptyBody_thenCreateByParsing() local
72 BluetoothMapbMessage messageParsed = BluetoothMapbMessage.parse(inputStream, in encodeToByteArray_withEmptyBody_thenCreateByParsing()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcpcontroller/bip/
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()
/packages/services/Telecomm/src/com/android/server/telecom/
DContactsAsyncHelper.java115 InputStream inputStream = null; in handleMessage() local
118 inputStream = mContentResolverAdapter.openInputStream( in handleMessage()
124 if (inputStream != null) { in handleMessage()
125 args.photo = Drawable.createFromStream(inputStream, in handleMessage()
142 if (inputStream != null) { in handleMessage()
144 inputStream.close(); in handleMessage()
/packages/modules/Permission/SafetyCenter/Config/tests/java/com/android/safetycenter/config/
DParserConfigOverlayTest.kt42 val inputStream = context.resources.openRawResource(R.raw.config_valid_not_overlayable) in <lambda>() constant
45 SafetyCenterConfigParser.parseXmlResource(inputStream, context.resources) in <lambda>()
76 val inputStream = context.resources.openRawResource(R.raw.config_valid_overlayable) in <lambda>() constant
79 SafetyCenterConfigParser.parseXmlResource(inputStream, context.resources) in <lambda>()
107 val inputStream = in <lambda>() constant
112 SafetyCenterConfigParser.parseXmlResource(inputStream, context.resources) in <lambda>()
/packages/services/Car/car-builtin-lib/src/android/car/builtin/os/
DBinderHelper.java122 FileInputStream inputStream = null; in onTransactForCmd() local
126 inputStream = new FileInputStream("/dev/null"); in onTransactForCmd()
127 inFd = inputStream.getFD(); in onTransactForCmd()
142 if (inputStream != null) { in onTransactForCmd()
143 inputStream.close(); in onTransactForCmd()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/testutils/
DCertUtils.java45 InputStream inputStream = in createCertFromPemFile() local
49 return (X509Certificate) factory.generateCertificate(inputStream); in createCertFromPemFile()
55 InputStream inputStream = in createRsaPrivateKeyFromKeyFile() local
59 new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8)) in createRsaPrivateKeyFromKeyFile()
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/
DExifParser.java201 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
203 if (inputStream == null) { in ExifParser()
210 mContainExifData = seekTiffData(inputStream); in ExifParser()
211 mTiffStream = new CountedDataInputStream(inputStream); in ExifParser()
239 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
241 return new ExifParser(inputStream, options, iRef); in parse()
252 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
254 return new ExifParser(inputStream, OPTION_IFD_0 | OPTION_IFD_1 in parse()
752 private boolean seekTiffData(InputStream inputStream) throws IOException, in seekTiffData() argument
754 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()
/packages/apps/Messaging/src/com/android/messaging/util/exif/
DExifParser.java202 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
204 if (inputStream == null) { in ExifParser()
211 mContainExifData = seekTiffData(inputStream); in ExifParser()
212 mTiffStream = new CountedDataInputStream(inputStream); in ExifParser()
240 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
242 return new ExifParser(inputStream, options, iRef); in parse()
253 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
255 return new ExifParser(inputStream, OPTION_IFD_0 | OPTION_IFD_1 in parse()
756 private boolean seekTiffData(InputStream inputStream) throws IOException, in seekTiffData() argument
758 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()
/packages/apps/Camera2/src/com/android/camera/exif/
DExifParser.java201 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
203 if (inputStream == null) { in ExifParser()
210 mContainExifData = seekTiffData(inputStream); in ExifParser()
211 mTiffStream = new CountedDataInputStream(inputStream); in ExifParser()
239 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
241 return new ExifParser(inputStream, options, iRef); in parse()
252 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
254 return new ExifParser(inputStream, OPTION_IFD_0 | OPTION_IFD_1 in parse()
752 private boolean seekTiffData(InputStream inputStream) throws IOException, in seekTiffData() argument
754 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/exif/
DExifParser.java173 private ExifParser(InputStream inputStream, int options, ExifInterface iRef) in ExifParser() argument
175 if (inputStream == null) { in ExifParser()
182 containExifData = seekTiffData(inputStream); in ExifParser()
183 tiffStream = new CountedDataInputStream(inputStream); in ExifParser()
211 protected static ExifParser parse(InputStream inputStream, int options, ExifInterface iRef) in parse() argument
213 return new ExifParser(inputStream, options, iRef); in parse()
224 protected static ExifParser parse(InputStream inputStream, ExifInterface iRef) in parse() argument
227 inputStream, in parse()
719 private boolean seekTiffData(InputStream inputStream) in seekTiffData() argument
721 CountedDataInputStream dataStream = new CountedDataInputStream(inputStream); in seekTiffData()

123456