/frameworks/support/media-widget/src/androidTest/java/androidx/media/widget/ |
D | MediaUtils2.java | 37 AssetFileDescriptor afd = null; in hasCodecsForResource() local 40 afd = context.getResources().openRawResourceFd(resourceId); in hasCodecsForResource() 42 ex.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in hasCodecsForResource() 48 if (afd != null) { in hasCodecsForResource() 49 afd.close(); in hasCodecsForResource()
|
/frameworks/base/media/java/android/media/ |
D | SoundPool.java | 224 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resId); in load() local 226 if (afd != null) { in load() 227 id = _load(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength(), priority); in load() 229 afd.close(); in load() 245 public int load(AssetFileDescriptor afd, int priority) { in load() argument 246 if (afd != null) { in load() 247 long len = afd.getLength(); in load() 251 return _load(afd.getFileDescriptor(), afd.getStartOffset(), len, priority); in load()
|
D | Ringtone.java | 442 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd( in playFallbackRingtone() local 444 if (afd != null) { in playFallbackRingtone() 446 if (afd.getDeclaredLength() < 0) { in playFallbackRingtone() 447 mLocalPlayer.setDataSource(afd.getFileDescriptor()); in playFallbackRingtone() 449 mLocalPlayer.setDataSource(afd.getFileDescriptor(), in playFallbackRingtone() 450 afd.getStartOffset(), in playFallbackRingtone() 451 afd.getDeclaredLength()); in playFallbackRingtone() 459 afd.close(); in playFallbackRingtone()
|
D | MediaExtractor.java | 217 public final void setDataSource(@NonNull AssetFileDescriptor afd) in setDataSource() argument 219 Preconditions.checkNotNull(afd); in setDataSource() 223 if (afd.getDeclaredLength() < 0) { in setDataSource() 224 setDataSource(afd.getFileDescriptor()); in setDataSource() 226 setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getDeclaredLength()); in setDataSource()
|
D | JetPlayer.java | 226 public boolean loadJetFile(AssetFileDescriptor afd) { in loadJetFile() argument 227 long len = afd.getLength(); in loadJetFile() 232 afd.getFileDescriptor(), afd.getStartOffset(), len); in loadJetFile()
|
D | MediaPlayer.java | 971 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resid); in create() local 972 if (afd == null) return null; in create() 981 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in create() 982 afd.close(); in create() 1107 try (AssetFileDescriptor afd = resolver.openAssetFileDescriptor(uri, "r")) { in attemptDataSource() argument 1108 setDataSource(afd); in attemptDataSource() 1209 public void setDataSource(@NonNull AssetFileDescriptor afd) in setDataSource() argument 1211 Preconditions.checkNotNull(afd); in setDataSource() 1215 if (afd.getDeclaredLength() < 0) { in setDataSource() 1216 setDataSource(afd.getFileDescriptor()); in setDataSource() [all …]
|
D | MediaPlayer2Impl.java | 901 try (AssetFileDescriptor afd = resolver.openAssetFileDescriptor(uri, "r")) { in attemptDataSource() argument 902 if (afd.getDeclaredLength() < 0) { in attemptDataSource() 905 afd.getFileDescriptor(), in attemptDataSource() 911 afd.getFileDescriptor(), in attemptDataSource() 912 afd.getStartOffset(), in attemptDataSource() 913 afd.getDeclaredLength()); in attemptDataSource()
|
/frameworks/support/media/src/androidTest/java/androidx/media/ |
D | TestMedia2DataSource.java | 40 public static TestMedia2DataSource fromAssetFd(AssetFileDescriptor afd) throws IOException { in fromAssetFd() argument 42 InputStream in = afd.createInputStream(); in fromAssetFd() 43 final int size = (int) afd.getDeclaredLength(); in fromAssetFd() 53 afd.close(); in fromAssetFd()
|
D | MediaPlayer2TestBase.java | 168 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resid); in createMediaPlayer2() local 169 if (afd == null) { in createMediaPlayer2() 181 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) in createMediaPlayer2() 200 afd.close(); in createMediaPlayer2() 425 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadResource() local 428 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) in loadResource() 444 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in createDataSourceDesc() local 446 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) in createDataSourceDesc()
|
D | MediaPlayer2Test.java | 315 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); 317 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) 324 afd.close(); 526 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); 528 .setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()) 535 afd.close();
|
/frameworks/base/core/java/android/view/textclassifier/ |
D | TextClassifierImplNative.java | 59 TextClassifierImplNative(AssetFileDescriptor afd) { in TextClassifierImplNative() argument 60 mModelPtr = nativeNewFromAssetFileDescriptor(afd, afd.getStartOffset(), afd.getLength()); in TextClassifierImplNative() 277 AssetFileDescriptor afd, long offset, long size); in nativeNewFromAssetFileDescriptor() argument
|
/frameworks/base/media/tests/EffectsTest/src/com/android/effectstest/ |
D | SimplePlayer.java | 118 … AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(mFileResId); in playOrPause() local 119 … mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in playOrPause() 120 afd.close(); in playOrPause()
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | AnimatedImageDrawable.java | 80 State(long nativePtr, InputStream is, AssetFileDescriptor afd) { in State() argument 83 mAssetFd = afd; in State() 294 InputStream inputStream, AssetFileDescriptor afd) in AnimatedImageDrawable() argument 312 inputStream, afd); in AnimatedImageDrawable()
|
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/ |
D | ScoAudioTest.java | 369 … AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(mFileResId); in playOrPause() local 370 … mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in playOrPause() 371 afd.close(); in playOrPause()
|
/frameworks/base/core/java/android/provider/ |
D | DocumentsContract.java | 1075 AssetFileDescriptor afd = null; in getDocumentThumbnail() local 1078 afd = client.openTypedAssetFileDescriptor(documentUri, "image/*", openOpts, signal); in getDocumentThumbnail() 1080 final FileDescriptor fd = afd.getFileDescriptor(); in getDocumentThumbnail() 1081 final long offset = afd.getStartOffset(); in getDocumentThumbnail() 1123 final Bundle extras = afd.getExtras(); in getDocumentThumbnail() 1134 IoUtils.closeQuietly(afd); in getDocumentThumbnail()
|
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/ |
D | CodecTest.java | 578 public static boolean resourcesPlayback(AssetFileDescriptor afd, int expectedDuration){ in resourcesPlayback() argument 582 mp.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(), afd.getLength()); in resourcesPlayback()
|
/frameworks/base/core/java/android/content/ |
D | ContentResolver.java | 1148 AssetFileDescriptor afd = openAssetFileDescriptor(uri, mode, cancellationSignal); in openFileDescriptor() local 1149 if (afd == null) { in openFileDescriptor() 1153 if (afd.getDeclaredLength() < 0) { in openFileDescriptor() 1155 return afd.getParcelFileDescriptor(); in openFileDescriptor() 1161 afd.close(); in openFileDescriptor()
|