Home
last modified time | relevance | path

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

1234

/packages/apps/WallpaperPicker2/src/com/android/wallpaper/asset/
DStreamableAsset.java111 protected void onPostExecute(InputStream inputStream) { in fetchInputStream() argument
112 streamReceiver.onInputStreamOpened(inputStream); in fetchInputStream()
165 InputStream inputStream = openInputStream(); in calculateRawDimensions() local
167 if (inputStream == null) { in calculateRawDimensions()
170 BitmapFactory.decodeStream(inputStream, null, options); in calculateRawDimensions()
171 … closeInputStream(inputStream, "There was an error closing the input stream used to calculate " in calculateRawDimensions()
191 InputStream inputStream = null; in openBitmapRegionDecoder() local
195 inputStream = openInputStream(); in openBitmapRegionDecoder()
197 if (inputStream == null) { in openBitmapRegionDecoder()
200 brd = BitmapRegionDecoder.newInstance(inputStream, true); in openBitmapRegionDecoder()
[all …]
/packages/apps/Messaging/src/com/android/messaging/util/
DUriUtil.java195 public static Uri persistContentToScratchSpace(final InputStream inputStream) { in persistContentToScratchSpace() argument
198 return copyContent(context, inputStream, scratchSpaceUri); in persistContentToScratchSpace()
208 InputStream inputStream = null; in persistContentToScratchSpace() local
212 inputStream = context.getContentResolver().openInputStream(sourceUri); in persistContentToScratchSpace()
217 inputStream = new BufferedInputStream(ucon.getInputStream()); in persistContentToScratchSpace()
219 return persistContentToScratchSpace(inputStream); in persistContentToScratchSpace()
224 if (inputStream != null) { in persistContentToScratchSpace()
226 inputStream.close(); in persistContentToScratchSpace()
241 final InputStream inputStream, final File outputDir, final String contentType) { in persistContent() argument
250 return copyContent(context, inputStream, targetUri); in persistContent()
[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/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/unit/com/android/documentsui/archives/
DArchiveHandleTest.java342 InputStream inputStream = archiveHandle.getInputStream( in closeInputStream_zipFile_shouldBeSuccess() local
346 assertThat(inputStream).isNotNull(); in closeInputStream_zipFile_shouldBeSuccess()
348 inputStream.close(); in closeInputStream_zipFile_shouldBeSuccess()
377 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_zipFile_shouldHaveTheSameContent() local
381 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_zipFile_shouldHaveTheSameContent()
463 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_sevenZFile_shouldHaveTheSameContent() local
467 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_sevenZFile_shouldHaveTheSameContent()
482 InputStream inputStream = archiveHandle.getInputStream( in getInputStream_tarGzFile_shouldHaveTheSameContent() local
486 assertThat(ArchiveFileTestRule.getStringFromInputStream(inputStream)) in getInputStream_tarGzFile_shouldHaveTheSameContent()
542 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.java71 final InputStream inputStream = in getSeekableDescriptor() argument
76 while ((bytes = inputStream.read(buffer)) != -1) { in getSeekableDescriptor()
109 final InputStream inputStream = in getNonSeekableDescriptor()
114 while ((bytes = inputStream.read(buffer)) != -1) { in getNonSeekableDescriptor()
/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/UniversalMediaPlayer/java/com/android/pump/util/
DIoUtils.java38 InputStream inputStream = new FileInputStream(file); in readFromFile() local
40 return readFromStream(inputStream); in readFromFile()
42 close(inputStream); in readFromFile()
46 public static @NonNull byte[] readFromStream(@NonNull InputStream inputStream) in readFromStream() argument
52 while ((num = inputStream.read(buf, 0, buf.length)) >= 0) { in readFromStream()
/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/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/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/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/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/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()
/packages/apps/Bluetooth/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/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/testutils/
DCertUtils.java42 InputStream inputStream = in createCertFromPemFile() local
46 return (X509Certificate) factory.generateCertificate(inputStream); in createCertFromPemFile()
52 InputStream inputStream = in createRsaPrivateKeyFromKeyFile() local
55 PemObject pemObject = new PemReader(new InputStreamReader(inputStream)).readPemObject(); in createRsaPrivateKeyFromKeyFile()
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/
DWifiDownloadReceiver.java164 InputStream inputStream = null; in downloadFile() local
167 inputStream = connection.getInputStream(); in downloadFile()
170 while ((bytesRead = inputStream.read(buffer)) != -1) { in downloadFile()
177 if (inputStream != null) inputStream.close(); in downloadFile()
/packages/apps/DocumentsUI/src/com/android/documentsui/archives/
DReadableArchive.java230 final ParcelFileDescriptor.AutoCloseInputStream inputStream = in createForParcelFileDescriptor() argument
235 while ((bytes = inputStream.read(buffer)) != -1) { in createForParcelFileDescriptor()
304 InputStream inputStream = null; in openDocumentThumbnail() local
306 inputStream = mArchiveHandle.getInputStream(entry); in openDocumentThumbnail()
307 final ExifInterface exif = new ExifInterface(inputStream); in openDocumentThumbnail()
336 FileUtils.closeQuietly(inputStream); in openDocumentThumbnail()
/packages/apps/TV/tuner/src/com/android/tv/tuner/hdhomerun/
DHdHomeRunChannelScan.java66 InputStream inputStream; in scan() local
75 inputStream = connection.getInputStream(); in scan()
85 inputStream.close(); in scan()
96 parser.setInput(inputStream, null); in scan()
114 inputStream.close(); in scan()
/packages/apps/Dialer/java/com/android/dialer/persistentlog/
DPersistentLogFileHandler.java224 private byte[] readLog(DataInputStream inputStream) throws IOException, LogCorruptionException { in readLog() argument
227 if (inputStream.read(prefix) == -1) { in readLog()
234 int dataLength = inputStream.readInt(); in readLog()
239 inputStream.read(data); in readLog()
242 inputStream.read(postfix); in readLog()

1234