Home
last modified time | relevance | path

Searched refs:afd (Results 1 – 13 of 13) sorted by relevance

/frameworks/base/media/java/android/media/
DSoundPool.java224 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()
DRingtone.java469 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd( in playFallbackRingtone() local
471 if (afd != null) { in playFallbackRingtone()
473 if (afd.getDeclaredLength() < 0) { in playFallbackRingtone()
474 mLocalPlayer.setDataSource(afd.getFileDescriptor()); in playFallbackRingtone()
476 mLocalPlayer.setDataSource(afd.getFileDescriptor(), in playFallbackRingtone()
477 afd.getStartOffset(), in playFallbackRingtone()
478 afd.getDeclaredLength()); in playFallbackRingtone()
489 afd.close(); in playFallbackRingtone()
DMediaExtractor.java217 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()
DJetPlayer.java228 public boolean loadJetFile(AssetFileDescriptor afd) { in loadJetFile() argument
229 long len = afd.getLength(); in loadJetFile()
234 afd.getFileDescriptor(), afd.getStartOffset(), len); in loadJetFile()
DRingtoneManager.java1050 AssetFileDescriptor afd = null; in openDefaultRingtoneUri() local
1052 afd = resolver.openAssetFileDescriptor(cacheUri, "r"); in openDefaultRingtoneUri()
1053 if (afd != null) { in openDefaultRingtoneUri()
1054 return afd; in openDefaultRingtoneUri()
1058 afd = resolver.openAssetFileDescriptor(actualUri, "r"); in openDefaultRingtoneUri()
1060 return afd; in openDefaultRingtoneUri()
DMediaPlayer.java965 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resid); in create() local
966 if (afd == null) return null; in create()
975 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in create()
976 afd.close(); in create()
1101 try (AssetFileDescriptor afd = resolver.openAssetFileDescriptor(uri, "r")) { in attemptDataSource() argument
1102 setDataSource(afd); in attemptDataSource()
1201 public void setDataSource(@NonNull AssetFileDescriptor afd) in setDataSource() argument
1203 Preconditions.checkNotNull(afd); in setDataSource()
1207 if (afd.getDeclaredLength() < 0) { in setDataSource()
1208 setDataSource(afd.getFileDescriptor()); in setDataSource()
[all …]
/frameworks/base/media/tests/EffectsTest/src/com/android/effectstest/
DSimplePlayer.java118 … 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/
DAnimatedImageDrawable.java81 State(long nativePtr, InputStream is, AssetFileDescriptor afd) { in State() argument
84 mAssetFd = afd; in State()
295 Rect cropRect, InputStream inputStream, AssetFileDescriptor afd) in AnimatedImageDrawable() argument
313 extended, cropRect), inputStream, afd); in AnimatedImageDrawable()
/frameworks/base/core/tests/coretests/src/android/content/
DContentResolverTest.java83 final AssetFileDescriptor afd = new AssetFileDescriptor( in initImage() local
85 when(mProvider.openTypedAssetFile(any(), any(), any(), any(), any())).thenReturn(afd); in initImage()
/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/
DScoAudioTest.java369 … 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/media/apex/java/android/media/
DMediaPlayer2.java954 AssetFileDescriptor afd;
957 afd = RingtoneManager.openDefaultRingtoneUri(context, uri);
958 if (attemptDataSource(isCurrent, srcId, afd, startPos, endPos)) {
963 afd = resolver.openAssetFileDescriptor(actualUri, "r");
965 afd = resolver.openAssetFileDescriptor(uri, "r");
967 if (attemptDataSource(isCurrent, srcId, afd, startPos, endPos)) {
977 private boolean attemptDataSource(boolean isCurrent, long srcId, AssetFileDescriptor afd,
980 if (afd.getDeclaredLength() < 0) {
983 ParcelFileDescriptor.dup(afd.getFileDescriptor()),
991 ParcelFileDescriptor.dup(afd.getFileDescriptor()),
[all …]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/
DCodecTest.java578 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/
DContentResolver.java1338 AssetFileDescriptor afd = openAssetFileDescriptor(uri, mode, cancellationSignal);
1339 if (afd == null) {
1343 if (afd.getDeclaredLength() < 0) {
1345 return afd.getParcelFileDescriptor();
1351 afd.close();
3590 final AssetFileDescriptor afd = content.openTypedAssetFile(uri, "image/*", opts,
3592 final Bundle extras = afd.getExtras();
3594 return afd;